i think one solution would be to use unions 
u store one uint in the union 
and one array of uchar in the same union
then u can easily manipulate the two bytes try some search on unions u will get 
what am i trying to say

anup

bdrmachine <[EMAIL PROTECTED]> wrote:                                  Can 
someone give me a C example of how to combine 2 unsigned chars (msb 
 and lsb) and store as a unsigned int (L)? It seams the technique I'm 
 using is more involved then it should be. Would "L= msb<<8 + lsb;" 
 work?  I'm working on a program for a 8 bit microcontroller. Unsigned 
 char's are 8 bits long and unsigned int's are 16 bits.
 
 Thanks
 Brian  
 
 
     
                       

       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.

[Non-text portions of this message have been removed]

Reply via email to