 Okay, so let's understand a little bit more about this ARM technology now so You know these Texas instruments has developed this You know ARM Cortex-M4 series MCUs which are like you know quite popular for a lot of Industrial kind of usage and applications. Okay, some of the usages if you go to the data sheet you will find You know their gaming interfaces and a lot of this is Some mobile chips we may have like no say additional chips as these Controller chips and things like that. Okay, so there are many many devices in which you will find this kind of And then the application note will give like no these small details Maybe it Okay, maybe not now, but like no maybe we can go through some of these You know Details in the in the data sheet between maybe if it may be we can get first I go over view of the of this technology itself and then maybe we can go into little more details of the data sheets of This okay, like let's do that first. Okay, not jumping to like no say so this arm technology has like a lot of these different You can just kind of appreciate for now that This technology has like a lot of families of microcontrollers, which are used in many many different kind of industrial applications and devices and The main kind of a crux of this technology is Like this arm stands for this advanced risk machine. Okay, RISC RISC stands for reduced instruction set computer. Okay, so so this is reduced instruction set computer is is Is having the main idea or main philosophy here To develop this kind of a technology is to reduce the number of clock cycles required to execute Whatever instruction is to be executed Okay, each of the instructions that you execute say you want to move some contents of one register to other register It takes some finite number of clock cycles now this clock cycles Determine like you know, how much is a time taken for execution of the command and Clock frequency would determine how fast that that will happen. Okay So if you if you have say 80 megahertz kind of a clock, okay, which is there in diva And say you're taking like no 15 clock cycles to execute some command Okay, so you can find out what is a time taken to kind of execute that come kind of command. Okay, so So as compared to the normal microcontrollers where this arm technology is not there and when this arm technology is there Each of these commands, whatever are designed in this arm technology They they will have like no the reduced number of clock cycles to execute Okay, so that's why I like no this this they can do it really really fast kind of You know execution of your hardware Programs, okay, so that is a main kind of advantage of this arm technology And it is some kind of industrial standard now like no for a lot of industrial Machines okay, mechatronics systems. This is people are using this arm based Okay, and The other thing is that like The programs that you write, okay here, even if I'm now the chip is upgraded here. You'll you'll execute those those Like no programs with with much not much of a modification. Okay, so here again the programming is also based on like the base I See see level program, okay, so we'll see like, you know, what kind of a way how do you kind of really go ahead and program this Okay So let's move on to this You know this these are different different technologies and corresponding features of the the Technology, okay, so this is a cortex for cortex M4 kind of a technology And now like no that more kind of modern is cortex R4 technology Okay, so so there are there's some kind of a you know more details are given. This is what is this architecture? So this is version seven We seven M kind of a creature. So we seven are some some differences are here. We may not understand everything at this stage It's okay But one can kind of like no see there are some things that are They are in the advanced Say for example cash memory is there in this cortex R4 series, but not there in this earlier series So so as as the as people use this and then the demand, you know, the Manufacturer demand that okay, we want some kind of this feature people start developing like no the company start developing The next versions of the microcontroller and that's how like no, there's the the evolution of these different Microcontrollers takes place the way you see the evolution that have happened in the In your computer systems. Okay. Similarly, like you know, there are these kind of evolution that happen Keep on some developments keep on happening Okay, so so so the microcontroller that we will be using or we'll be looking at is this No Cortex M4 kind of a series microcontroller. Okay, and it has this 32-bit kind of architecture Okay, 32-bit data processing will be will be there Okay So one can look at some of these details some details I may also not be able to kind of tell you detail I'll have to kind of read more about it and I'll be able to tell you but you can try to kind of find out and like no see if you can Understand some of the parts at least Okay Say for example interrupt latency here is is 12 cycles here. It is 20 cycles. It will have some kind of a Delay in the interrupt Coming in execution. Okay, so this is increased here because of some advance Saving something like that may be there Which is I don't think this is a good thing to happen I mean we want interrupts who kind of like no get executed very fast But anyway, so as I said like no, this is typically like no These are the features that are given and I know some advanced features will be there in the in the higher series Be from me catwin's perspective you may or may not need to kind of get into too many details about this any way But okay, so unless very specific application comes we should be able to kind of you know dig into that and see okay Otherwise we probably from a catwin's engineers, you know, we don't need to really bother too much about okay see this floating point unit is is There inside this cortex, so this is one can appreciate it. Okay. You have this floating point built-in kind of a unit and Here it is No single and double precedence are also there So this is a more precise kind of a calculations can be done with the cortex R4 series than M series Okay, fundamentally like you know, so so even if you don't know In the specific data sheet of the microcosm microcontroller as long as you know that okay It is it belongs to this cortex M4 series. It's fine. Like no, you know that okay It cannot do like you know the double precision as a Built-in in the future in the microcontroller one has to one has to write a separate program that means like no one has to expand more kind of a number of clock cycles to execute double precision in the in the single precision inherent microcontroller platform So those are kind of like no things one can see from me catwin's perspective So now if you come to this diva arm cortex microcontroller It's features if you see the in the data sheet are given in this kind of a format And then there'll be some block diagram to kind of explain these like more in detail Okay, so you have this 80 megahertz operation. So these 80 megahertz means like you know your clock is running at that kind of a frequency and Then depending upon like know what is the length of your program or number of clock cycles that your program may take you can have a sampling time which is More or less, you know based on this and this can you know determine your sampling time actually Then some memory details are there and there are communication details there and there is a See water for my catwin's system perspective is more important for us is this advanced motion control So they have these PWM interfaces Okay Two modules we each with four PWM generators. So there are eight PWMs in these Macrocontroller and For total 16 PWM outputs and and so two PWM modules each with four PWM generator blasts Okay, so actually it should be eight. I don't know why they're calling these 16 PWM outputs So there may be something more we need to see in Then there are these two quadrature encoder interfaces modules, okay And the encoder which is having A and B pulses. Okay, so that encoder can be now directly connected to this Quadrature encoder interface. Okay, you remember why it is called quadrature because it's Anything about Yeah, it gives like notice and we pulses which are phase shifted by 90 degree and the combination of that gives over one cycle for different Pulsates can be possible. So For for it refers to a quad Okay, so that's why it called quadrature four different pulses you get over one cycle because of this cascade of like A and B signals by shifted by 90 degrees So that phase difference is what gives you the direction also so that's how like no this this entire thing like no how to read these pulses and Convert them into count and Increment account if it is direction positive and decrement account if it is direction negative everything is done by this dedicated interface So you don't need to kind of like no do any of the operations of this You know more this kind to to get the number for the encoder count Into your micro control system that will be directly given by this if you configure in this interface appropriately You'll be directly getting the output reading and that's what we'll do Will we are sending you this motor and Along with this encoder, so we'll interface this encoder with diva and like see How it can give this counts That all we Will do as a part of the lab So we'll focus on on this motion control kind of a part and then some part of an analog inputs, okay, and So these other things are in useful a package and other things will be useful from if you want to kind of now with a dedicated Kind of a embedded system board for your application, okay, which we will not have a question if you could win this course Okay, we'll have to do a PCB manufacturing for that and it's not a part of this course Okay, so we'll move on from here. This is like no more details about about the diagram So this is a tag refers to communication interface which is typically used for You know downloading the the C level program Compiled version to to the microcontroller Memory and exchange the the variables from the memory to the to this kind of a you know There's software program in which you like the right the codes, okay, which in this case will be code composer studio Okay, so there'll be some interface that is needed. Okay, which will share some kind of a memory locations to Real-time know. Okay. What is happening to different resistors? What is happening to different variables in what we what you have used in program? Okay, they'll they all will be exchanged to this kind of a interface to your computer system to be displayed on your desktop So that you'll be see, okay Or you run some program in the microcontroller and like no you see okay Oh, like, you know When I execute this command this happens it with this register all this thing you can see on the other thing And also you may be able to register Say say if you want to record some signal, okay in time, okay You'll be able to do that to this such a kind of interface. Okay, so this is a tag or a sub to D those kind of interfaces are there and then these are like different you can see this bus system is there and then like These are memories That are interface so say some some party to have a unidirectional some party to have a bi-directional memory then there is some so this is like, you know the interrupt vector interrupt kind of a interface then Like that you just read some part may make sense some part may not make sense. It's okay. It doesn't matter Okay, so as so part which doesn't make sense You go through and like no need a little more and like no things that start making sense There is a wrong in which like no read read on the memory if you know Sure, you know it has some driver libraries Okay, so it has you see, you know this wrong has like the bootloader That means like no the system boots for this microcontroller through this wrong the way when you start your computer system Also, you'll have some kind of a Small part of the program that you get executed that is a return in the wrong So that like no your system is at the for the first time it starts booting from there Okay And then like no it it cuts off other routines to kind of like no execute and like no get a get a computer Ready for you to kind of work the way the same way it happens in my phone They're like no it starts off with the execution of this commands in the wrong And then like no the microcontroller is ready for for your programming and The important part is that there are drivers libraries already like no recorded into this wrong So those libraries are not kind of fetched and burned separately like no through these JTAG interface I know they are kind of taken and like no burned here every time the program So so that saves you a lot of what you say Programming time partly and also the the execution time Okay, so the memory of your application will not have any of the libraries is there Okay, then because they are already coded into this wrong and they'll be kind of like no call from the wrong to To be used and that that's one of the other reasons like no things Are are are fast in some sense in this Microcontrollers Okay, especially the programming is faster. You'll be fine. Okay very quickly like no this this program gets loaded on to this Microcontroller and so now you're ready to execute Okay, when you start programming like no, you notice this difference You know as compared to what you are doing with XC P 100 or your I don't know or any in the previous thing You'll find that you know the program will get very fast downloaded on to this Microcontroller platform team of that Okay, again here also as I said for the way it was there for XC P 100 if you see the pins here, this is our GPIO pins. Now. This is the general purpose input output or one can one can say Understand this as a digital input output interface. So they have alternate functions Okay, this is important to know that okay pins can have alternate functions So for example here if you see this PC for PC I PC 6 these are the pins here. They they have You know they are shared between like you know this phase A1 phase B1 and phase or index one Okay, so these are the pins for the Encoder interface Remember that I know we had a phase B phase and you had index pulse also Okay, so these pins so when you interface your encoder like no you'll use these three pins or like no There are two intercooler encoder interface is one of the interface is this and some other interface you'll find like no for a 2 idx 2 PHA 2 phb 2 like that you may find some other pins. Okay, so so in this case like no there they fall as PC so these are the And the names of general purpose input output PC 6 PC 5 and PC PC 4 Okay, these pins you connect to your Encoders and then like no you hope that okay where you configure this appropriately So so so naturally then there'll be somewhere you need to kind of say that okay Oh, I'm using these pins not as general purpose input output, but I'm using these pins as encoder outputs Okay, so that configuration like no reconfiguration of the pins need to be done somewhere. There'll be some commands to do that Okay, so this is how one can understand. Okay by looking at these pin diagrams or some other kind of a details Okay, what it means when I start programming, okay in programming also it will be given there, but like no if if We know what we are looking for then it's much easier to find out what we are looking for and then figure out and like Go ahead with programming. So So so there are you know, it's a skill Okay, I would say to develop and that comes through your previous background of whatever microcontroller programming And you start programming a new microcontroller use some philosophical ideas And then like no some of these cues from somewhere or like some previous examples of some some programming And I know you need to kind of like no finally make sure that your application is is running fine So that is exercise We all have to go through we'll understand a little more about this, you know, um context technology Okay, so Let's see. Maybe you want more slides to go through so So So this will talk a little bit at a philosophical level about the programming is important and This see this see once you have this philosophy No firm up in your mind then Actually what to expect what not to expect is is is is very clear. You don't so I like no We don't need to teach learn our syntax. Okay syntax is not a big deal to learn Okay, so You might have like we might appreciate that by now like no We might have done two three computer languages see or some other kind of thing and You know, the syntax is not but ideas and the philosophy or like no the the way of doing things Or the way of thinking Okay, how do I like to create a logic around this? Okay, that is what is more important. Okay So so we need to shift that for, you know, um microcontroller programming Okay, the way you think In the in the domain of normal computer programming cc language programming Although there are a lot of similarities, but there are some certain distinct features that one needs to be very clear about okay, so So we will not talk about much about assembly level program. We will not use it at all actually Uh, but this is like the most fundamental way to program stuff. Okay So you you know all the registered Details and like no, you say, okay for this command to be executed I know I need to move something from this register to that register from then then like no I need to do something like that You need to know the sequence of operations to be carried out and you are programming each of the operations for Just like you know doing some simple task Okay, that is too much of a tragedy. So that nowadays is all done by the libraries So libraries will do this task of like, you know, whatever is to be done to get your interface working And your your task is to now know like know the the libraries how the how to use the libraries and like, you know How do you um Make sense of different things that are that are there in the In the libraries or in the register level programming so, uh Suppose like no, we we we are doing like a register level programming Okay, so so see one of the ways is the most kind of a basic way is assembly level programming Then little higher than that is like this register level programming which like, you know, you are So in the assembly level, you are actually writing assembly code. You are not using c Okay, so so actually c programs Finally, we'll kind of convert the code into assembly level only but you are directly writing that Okay, but that is not the way that I've just listed it just for the sake of completeness of this But um, we'll not use that So the next high level programming is where like, you know, you um have the registers And uh, each of the registers, uh, you know their functionality Okay, the functionality. How do we know the functionality functionality will come from the datasheet In the programming of xcp100 for example, okay, so for programming, uh, say digital input output interface There is a register called ddr Okay, the direction data direction register. Okay, ddr x or ddr Uh, whatever a b c d there are different, uh, you know, registers Now these registers you need to write something Okay in those as As some data and that will have some meaning And what what data return has what meaning is given in the datasheet of the programming for that microcontroller And that's how like, no you initiate different registers to achieve different things. Okay, for example in xcp100 specifically to Have those registers as a output registers. Okay, so I want a Register as a port as a output port then I use ddr a to be equal to some ff number Okay, so then all the pins of this port a will be configured as a output pins. Okay In other cases, they can be configured as input pins as well Okay, so like that, uh, you write these as a c level commands. Okay So this ddr a is equal to zero x ff is a command in the c that you write and uh, When it is compiled it will like, you know, do all these jobs about whatever it needs to be done to At assembly level to get the make sure that you know these Port a is configured as a as a output port Okay, so that is so there are these these registers are called come control registers And then there are some other registers called data registers Okay, so you need to understand, uh, that, um, functionality of this register Okay, we need to control register or it is a data register and write appropriate kind of values According to the data sheet in those registers and your programming is done. Okay, so that's how, uh, you You go ahead programming, uh, next level of program for microcontroller Okay, where you have access you are directly like, you know, writing these registers in in some sense Okay, and, um So, so let let let us see So, so, so this is next level of like, no programming where you are doing the register level programming control registers and data registers separately You are initiating and doing some some kind of operation. So some of you are familiar with XP 100 it will be kind of a very Easy thing to understand or those who are not like, you know, you need to kind of see those things and see the data sheet And then you can make sense of some of the things. Okay, so so the idea here is not to kind of like, no Understand everything from all the details. No, what we want to kind of like, you know, get a point here is that You have these registers names available as a variables and those variables are initiated to some kind of a Data values depending upon what is a function ID that is needed. That is a one higher level of programming for Microcontroller, okay, and then there is yet another level of programming where you are now heavily dependent upon the Libraries, okay, so there are commands that are there in the in the libraries That kind of carry out the operation that you want to do and you have to kind of supply There are those functions some appropriate data as a as arguments. Okay, so that is a way like, you know, the The diva based or like no ARM context-based microcontrollers will be programming We'll be programming in that kind of way Okay, so we'll we'll we'll get into more details about that as we go down But for now, maybe we'll we'll stop here. We have some more details about the programming philosophy coming up next Different kinds of things that We need for specifically for our Mechatronics kind of application from the Microcontroller what we should what we what we should have in microcontroller which will use which will use for Mechatronics for this, okay, so that's what will be coming up the next Okay, and That's how we will move on, okay So maybe we'll stop here for now