And your compiler does not have it, try to define something like #def BYTE1(n) ((uint8)((n) )) // low byte #def BYTE2(n) ((uint8)((n) >> 8)) // high byte Tal > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Mccauley, Daniel H > Sent: Saturday, April 26, 2003 9:39 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: How to split a 16bit into two (2) 8bits > > > Actually, just found the answer I was looking for: > > CCS C has two commands: > > MAKE8() > MAKE16() > > That will definilty do it! > > Dan > > > > > I have a few 16 bit variables i would like to split into two 8-bit > > numbers which I will then write to an I2C EEPROM device (24xx00 > > EEPROM). Any suggestions on what the best way to do this is??? > > > > Thanks > > Dan > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > -- > http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu