Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 15th September 2003, 05:49 AM   #1
Default LCD clock display

how to give a timing that is exactly same as clock? should i use 3.579545MHz crystal?
Can any body tell me how to interface LCD using 4-bit mode, i know how to use 8-bit mode or you can give me some information. I do my own research...
:shock:
monkeyxp is offline  
Old 15th September 2003, 08:56 PM   #2
Default

Check out www.8052.com for tutorial on interfacing LCD with 8051. Both in 4-bit and 8-bit mode. It also has tutorial for software RTC using internal Timer of 8051.
__________________
"There is no way to peace, peace is the way!"
kinjalgp is offline  
Old 17th September 2003, 01:08 AM   #3
Default

If i was doing this, i would use a TMR0 register, (okay, i love these) on an interupt been triggered every second, set to incriment some fileregisters, test on overflow from 60, imcremint mins, test again, inc hours, etc.

The main loop of the code itself would constantly be updating the LCD HD44780 is soooooooooooooooo easy. and i left out some "o"s showing my contempt for any one that buys a maxtrix orbital etc. </RANT>

So HD44780 is very forgiving about timing when comunicating with it, so just keep spaming the values in the file register to the LCD (use a lookup table to convert 60d into the correct two byte ASCII codes). The TMR0 overflow interupt would interupt each time on exactly a second.

(using a pre-scaler its easy to get a crystal that will do this for you, better to go for the slower side for better accuracy).
TheAnimus is offline  
Reply

Thread Tools
Display Modes




All times are GMT. The time now is 03:23 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker