hi friends....
i m using TH0 and TL0 in my program..at the end i need to combine the values of TH0 and TL0 in 16 bit variable...plz tell me wat is logic
unsigned int tvalue = 0x00;
tvalue = TH0; // Insert the TH0 byte into the lower byte of tvalue
tvalue <<= 8; // Left shift the lower byte into the higher byte of tvalue
tvalue += TL0; // Insert the TL0 byte into the lower byte of tvalue
You can combine a few of these steps together, however this should give the general idea of how to accomplish the task.