Lessons
2012 Microchip Technology Inc. DS41628B-page 85
3.13.4.1.2 PCLATH:
The contents of PCLATH and PCLATU (if using the PIC18) are transferred to the pro-
gram counter by any operation that writes PCL. Similarly, the upper two bytes of the
program counter are transferred to PCLATH and PCLATU by an operation that reads
PCL. This is useful for the computed offsets to the PC that are used in this lesson.
For the PIC18, the PC increments by two to address sequential instructions in program
memory. The PC increments by one in the enhanced mid-range core. This can be seen
in previous lessons’ assembly where there was a dollar sign ($) with an offset literal.
The enhanced core assembly uses a $-1 to go back one valid program instruction in
program memory. Likewise, the PIC18 uses a $-2.
FIGURE 3-18: FIVE SITUATIONS FOR THE LOADING OF THE PC ON THE
ENHANCED MID-RANGE CORE