> int i_eeprom; > char EEADR_L; > char EEADR_H; > EEADR_L = (char) (i_eeprom & 0x00FF); > EEADR_H = (char) ((i_eeprom / 256) & 0x00FF); > > And it works, but I think there is a better way to do this. > Any thoughts? unsigned int i_eeprom; unsigned char EEADR_H, EEADR_L; EEADR_L = (unsigned char) (i_eeprom & 0xFF) EEADR_H = (unsigned char) (i_eeprom >> 8); I don't know if this is "better", but the EEADR_H assignment should generate less code. michael brown -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads