11-10-2012, 04:17 PM
The PIC Microcontroller Architecture
The PIC Microcontroller.ppt (Size: 985.5 KB / Downloads: 70)
The PIC Registers
Known as “data memory space” and is a read/write SRAM (Static RAM) memory
Consists of Special Function Register (SFR) and General Purpose Register (GPR)
GPR – Used for temporary data storage (user
defined)
SFR – Dedicated to specific functions (i.e. ALU status, Timers, SCI, I/O Ports, ADC, etc..)
Instructions With the Default Bank
The access bank of the file register is the default bank upon powering up.
The F letter in mnemonics means file register
The W letter means WREG
The location of F register can be anywhere in SFR or GPR
File Register for PIC18
The file register is divided into 256-byte banks.
The areas are the default access bank upon powering up
To access to area, bank switching method is required.
The Program Counter (PC)
Used by CPU to point to the address of the next instruction to be executed.
As CPU fetches the opcode from the program ROM, the PC is incremented automatically and point to the next instruction.
The wider the PC, more memory location can be accessed by the CPU.
PIC18 has 21-bit program counter and can access program address from 000000 to 1FFFH.