electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

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


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Displaying the TH0, ThL0 value of at89s52 on 2x16 LCD
Author Message
eehero



Joined: 23 Nov 2005
Posts: 232
Helped: 9
Location: Libya


Post17 Oct 2006 9:35   

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


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
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6490
Helped: 1542
Location: West Coast


Post17 Oct 2006 11:39   

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


Here is a tutorial on 8051 and 2 x 20 LCD ..
http://www.8052.com/tutlcd.phtml

Using examples of codes from this tutorial compose the top line as: TH0 = "value from R6" and the bottom line as: TL0 = "value from R7" , or whichever way you like ..

Regards,
IanP
Back to top
Google
AdSense
Google Adsense




Post17 Oct 2006 11:39   

Ads




Back to top
BABESH



Joined: 27 Sep 2005
Posts: 118
Helped: 10


Post17 Oct 2006 12:02   

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


First u need to convert hex value to decimal and then to ASCII
then display it.

It seems it is a 16 bit value so 16-bit hex to decimal conversion need to be done.
all the best


-- babesh
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Displaying the TH0, ThL0 value of at89s52 on 2x16 LCD
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Displaying degree character in the LCD... (5)
sending the charcter by keyboard and displaying in the lcd (13)
2x16 LCD module (3)
2x16 LCD Datasheet (8)
2x16 lcd connection (3)
2x16 LCD and PIC16F877A (8)
displaying temperature on LCD (6)
displaying temperature on LCD (12)
Displaying time on LCD (18)
2x16 LCD To LED multiplex display (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS