how to merge TL0 and TH0 value to an integer | Microcontroller › 8051 › how to merge TL0 and TH0 value to an integer This topic has 2 replies, 3 voices, and was last updated 11 years, 4 months ago by lakshmeesha. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts May 29, 2013 at 8:55 am #2452 ahsanParticipant helo sir, i want to merge LSB and MSB value of an unsigned integer with timer low and high byte.. TL0=0x00; TH0=0x00; unsigned int a; is it possible? a=0xTL0TH0; May 29, 2013 at 12:40 pm #9861 SagarParticipant unsigned int a; a=TH0; a<<=8; //left shift higher byte by 8 bits a|=TL0; //merge lower bytes using OR May 31, 2013 at 8:05 pm #9875 lakshmeeshaParticipant in one line,,, a=(TH1<<+TL1; //shifting TH1 left to 8 bit, adding TL1 Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In