char is signed, so that the max value is 127 (the min value is -128) -- unsigned char would be a bit better description for "byte". But anyway, I'd rather use a union so that the compiler do not have to figure out how to optimise the code to pick up low and high values. I am not familiar with C in PIC environment, but there may be some macros that can do this trick. Tamas On 11/15/06, Alan B. Pearce wrote: > > > //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 > > Doesn't this need to be an unsigned integer (possibly long integer, > depending on default length of integer) because a char is only 8 bits, so > max value is 255 ???? > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- unPIC -- The PIC Disassembler http://unpic.sourceforge.net -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist