Quote:
|
Originally Posted by Astronouth7303
A few questions:
a. What's EEADRH, EEADR, EEDATA, EECON2, and the rest of it?
b. what's the >> in "EEADRH = ((address>>8)&0x03);"?
And yes, I should probably know already.
|
Those EE names are defined in ifi_picdefs.h.
EEADRH is the high byte of the EEPROM address to be read or written
EEADR is the low byte of the address
EEDATA is the data going in or out of EEPROM
EECON1 and EECON2 are control registers used to do EEPROM operations
>> is shift right, << is shift left
((address>>8)&0x03 says divide address by 256 (that's the shift right 8 part) and zero out all but the lowest two bits (that's the &0x03 part).
Bill