ABL electronic PIC12 Personal Computer User Manual


 
PIC16 Specifics
Breaking Through Pages
In applications targeted at PIC16, no single routine should exceed one page (2,000
instructions). If routine does not fit within one page, linker will report an error.
When confront with this problem, maybe you should rethink the design of your
application – try breaking the particular routine into several chunks, etc.
Limits of Indirect Approach Through FSR
Pointers with PIC16 are “near”: they carry only the lower 8 bits of the address.
Compiler will automatically clear the 9th bit upon startup, so that pointers will
refer to banks 0 and 1. To access the objects in banks 3 or 4 via pointer, user
should manually set the IRP, and restore it to zero after the operation. The stated
rules apply to any indirect approach: arrays, structures and unions assignments,
etc.
Note: It is very important to take care of the IRP properly, if you plan to follow
this approach. If you find this method to be inappropriate with too many variables,
you might consider upgrading to PIC18.
Note: If you have many variables in the code, try rearranging them with linker
directive
absolute. Variables that are approached only directly should be moved
to banks 3 and 4 for increased efficiency.
MikroElektronika:
Development
tools
-
Books
-
Compilers
31
page
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...