SECTION II-3: General-Purpose Registers or RAM in PIC micro-controller

The general purpose registers are a group of RAM locations in the file register that are used for data storage and scratch pad. Each location is 8 bits wide and can be used to store any data we want as long as it is 8 bit. Again, the number of RAM locations in the file register that are set aside for general purpose registers can vary from chip to chip, even among members of the same family. In the PIC micro-controllers, the space that is not allocated to the special function registers is used for general purpose registers. That means in a PIC chip with a thousand-byte file register, no more than 100 bytes are used for special function registers are the rest are used for general purpose registers. A larger GPR size means more difficulties in managing these registers if you use assembly language programming. In today's high performance micro-controllers, with a over of thousand bytes of GPR, the job of managing them is handled by the C compilers. Indeed, the C compilers are the very reason we need a large GPR since it makes it easier for C compilers to store parameters and perform their jobs much faster.

 

File Register Size for PIC Chips
file-register-size-pic-chips.jpg

 

File Register of PIC12, PIC16 and PIC18
file-registers-pic12-pic16-pic18.jpg

 

More From Iamtechnical.com

Advertisement: