Presentation is loading. Please wait.

Presentation is loading. Please wait.

PIC Microcontroller What is PC LATH?????.

Similar presentations


Presentation on theme: "PIC Microcontroller What is PC LATH?????."— Presentation transcript:

1 PIC Microcontroller What is PC LATH?????

2 Memory Classification
Program Memory (Flash) Data Memory General Purpose RAM Special Function Registers

3 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

4 Program Memory Organization
PCLATH<4:3> = 00 PCLATH<4:3> = 10 Reset 0000h Page 2 1000h 0004h Interrupt Page 0 07FFh 17FFh PCLATH<4:3> = 01 PCLATH<4:3> = 11 Reset vector at 0, Interrupt vector at 4h In 2K Program memory, PCLATH has no impact In 4K Program memory, PCLATH bit 3 selects 2K page. Since PCLATH is not ininialized on reset (POR or otherwise), user must initialize PCLATH after reset. Page 1 0800h Page 3 1800h 0FFFh 1FFFh

5 Program Memory Map

6 Vectors Reset Vector Interrupt Vector Reset forces PC to 0x0000 H
Clears the PCLATH So? Interrupt Vector Interrupt forces PC to 0x0004 H PCLATH is not modified

7 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

8 Program Counter

9

10

11 Program Counter

12 Stack 8 level deep x 13 bit wide
Not part of either program space or data space Stack pointer is not readable or writable

13 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


Download ppt "PIC Microcontroller What is PC LATH?????."

Similar presentations


Ads by Google