Displaying the TH0, ThL0 value of at89s52 on 2x16 LCD

Status
Not open for further replies.

eehero

New Member
Hi all, i am going to use timer 0 of At89s52 as an event counter, after counting i have to read the timer value using the following code:

loop: mov a,th0
mov r6,tl0
cjne a,th0,loop
mov r7,a

finally i get 16 bit data in r6, r7.
how i can display the counting value in r6, r7 on a 2x16 LCD
 
Do you want the display to be in the binary, octal, decimal, or hexadecimal number base.

Second question is can you tell the display to show ASCII characters or is this a graphics display where we have to figure out the blanking codes?
 
step1:
convert 16 bit in to 5 decimal digits.
step2:
store the 5 decimal digits in to 5 regi.
step3:
Add each regi. value with 30h.
step4:
And send it to lcd.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…