Access to 16 bit SFR

16 bit SFRs (Special Function Register) are made of two 8 bit registers. You can access them as single 16 bit variables located at same address than the low part of the data. For example, AD converter specific registers are defined as

unsigned int ADRESL@0xfc3 ;
unsigned int ADRESH@0xfc4 ;

In order to access the result of an AD conversion as single 16 bit value, just declare the following:

unsigned long  ADresult@0xfc3 ;



AG 2013-04-10