[Menu]>[Guide to use the PIC]>[873 Hardware]>[SFR]

SFR explanation for PIC16F873(3)

PCLATH ( Program counter Upper register ) 0Ah,8Ah,10Ah,18Ah
    This is the register which stores the upper 5 bits of the program counter.
As for the program area of the PIC16 series, a maximum size is 8K words, and program address is specified by 13 bits. The upper 5 bits of the program address are stored in the PCLATH register. The program memory size of PIC16F873 is 4K words.

In case of GOTO or Call instruction, 11 bits of lower of the program address are specified by the operand of instruction. So, in the case, higher 2 bits of the program address are specified by PCLATH.

In case of usual processing, PCLATH and PCL are automatically set. However, when using RETLW instruction, it need to calculate a program address by the processing. In such case, PCLTAH and PCL should be set by the processing.