wannaBinventor
Member
I don't really understand the difference in defining a memory location and a constant. With a memory location, you can either use the cblock directive or "equ". How does MPLAB know which is assigning a memory location and which is just defining a constant? I'm trying to migrate over some application notes codes for the PIC16C over to the PIC18F and I'm running into some errors that I think may have to do with this.
If I'm doing this:
With the above, how did it know that the name of location 00h is not ACC0 and B0?
Thanks!
If I'm doing this:
Code:
cblock 00h
ACC0
ACC1
ACC2
ACC3
TEMP0
TEMP1
TEMP2
TEMP3
AEXP
AARGB0
B0 equ 0
B1 equ 1
B2 equ 2
B3 equ 3
B4 equ 4
B5 equ 5
B6 equ 6
B7 equ 7
MSB equ 7
LSB equ 0
With the above, how did it know that the name of location 00h is not ACC0 and B0?
Thanks!