Shawn, you need to use "unsigned long" this is how I did it. unsigned long prg_meml; unsigned long prg_memh; BYTE prg_meml; BYTE prg_memh; prg_meml=prg_mem>>8; prg_memh=prg_mem & 0x00FF; Andre -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf Of Shawn Wilton Sent: Tuesday, November 14, 2006 6:08 PM To: Microcontroller discussion list - Public. Subject: [EE] Bit shifting OK, I must be doing some ridiculous here and I'm just not catching it. Does anyone see anything wrong with this code: //Set page 103 for details regarding the +2 tmr0l = (unsigned char)65000; tmr0h = (unsigned char)(65000 >> 8); //Right shift so the top byte becomes the bottom byte All I'm trying to do is split the 65000 across the two variables, tmr0L and tmr0H. tmr0L is being assigned correctly the lower 8 bits of the 16 bit value, but the tmr0H is being assigned 0. -- Shawn Wilton (b9 Systems) -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist