What Is A Register In Microcontrollers
Register (General Purpose Register, Special Function Register)
Only put, a Register is a kind of memory. Then what is information technology and then special to accept unlike name for information technology. It is considering they are special memory which is different from what we normally call a Memory (e.g, Wink RAM, Programme Memory etc). Usually Annals is located inside a CPU or MCU (Microcontroller) very near to Arithematic unit or directly continued to various I/O ports. Due to this location or special design, Register is much faster in terms of Read / Write speed comparing to other types of retentivity. Amongst the register there are roughly two groups of Registers. I is mostly used for storing (or assigning) a specific values that are used by ALU (Arithmatic Logic Unit of measurement). These registers are called General Purpose Registers . The other type of the registers is more often than not used to command the diverse I/O pins or to read / write to those I/O pins. The one related to I/O pins are generally called I/O registers or Special Role Registers(SFR) . Every CPUs and MCUs have various Registers in it but nosotros don't usually intendance much of these registers when we are working on high level awarding programming. However, if you lot are an embedded organisation engineer working with Microcontrollers, you should be very familiar with the details of those Registers for the specific MCU (Microcontroller) that is used on your embedded board.
Then yous may ask 'where/how I can get the annals information about the MCU / CPU that is on my embedded Board ?'. The first certificate you need to encounter is the information canvas of the chipset. For case, if you are using Arduino lath, the board is using the MCU called ATmega family. If you open up the ATmeaga datasheet you would be able to find a diagrams as shown beneath (I combined three unlike diagrams from the document to create this picture). The parts loftier lighted blueish and cerise are all a kind of memory. The parts highlighted red are registers. Whenever you want to programm on a certain microcontroller, this kind of diagram would be the first one you take to visualize in your brain. When you actually write a program, just this kind of big moving picture volition not be enough. You have to read the details of each and every of these registers in the datasheet.
< Cake Diagram of the AVR Compages >
Source : Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf
Next Step :
Now you might accept general feeling about what a Register is, just you would not get a existent / deep insight on this unless you utilise the concept in your daily programming. And then the adjacent step is to utilize various registers in your program. Here goes some of my examples.
- Arduino : I/O Registers
- Beaglebone : Programming in C
Reference :
[i]
What Is A Register In Microcontrollers,
Source: http://www.sharetechnote.com/html/EmbeddedSystem_Register.html
Posted by: jeffreyhimse1987.blogspot.com
0 Response to "What Is A Register In Microcontrollers"
Post a Comment