150 likes | 419 Views
PIC Microcontroller. What is PC LATH?????. Memory Classification. Memory. Program Memory (Flash). Data Memory. General Purpose RAM. Special Function Registers. Program Memory Organization. 8k x 14 program memory space Divided into 4 pages of 2k words each 0H to 7FFH
E N D
PIC Microcontroller What is PC LATH?????
Memory Classification Memory Program Memory (Flash) Data Memory General Purpose RAM Special Function Registers
Program Memory Organization • 8k x 14 program memory space • Divided into 4 pages of 2k words each • 0H to 7FFH • 800H to FFFH • 1000H to 17FFH • 1800H to 1FFFH • Program PCLATH to switch between pages
Program Memory Organization PCLATH<4:3> = 00 PCLATH<4:3> = 10 0000h Reset Page 2 1000h 0004h Interrupt Page 0 07FFh 17FFh PCLATH<4:3> = 01 PCLATH<4:3> = 11 Page 3 Page 1 1800h 0800h 1FFFh 0FFFh
Vectors • Reset Vector • Reset forces PC to 0x0000 H • Clears the PCLATH So? • Interrupt Vector • Interrupt forces PC to 0x0004 H • PCLATH is not modified
Program Counter • PC is 13 bits wide • Low byte – PCL is readable & writable • High byte – PCH is not directly readable or writable • All updates to PCH goes through PCLATH
Stack • 8 level deep x 13 bit wide • Not part of either program space or data space • Stack pointer is not readable or writable
Stack • PCLATH is not modified with a stack operation • No status bits to indicate status overflow or underflow conditions • No instructions called PUSH or POP