Music Playing Alarm Clock

 by frank26080115
Contest WinnerFeatured

Step 9: Big Number Clock on LCD

lcdbignum_pic.png
lcdbignum_ramexplaination.png
Well this is a clock, and the characters on the LCD are not that great for a clock, they are just too small.

We will use custom characters to create big number fonts on the LCD, making it look much better.

The LCD datasheet talks about two RAM sections, DDRAM which is for "display data", meaning the text on display, and CGRAM, which is the "character generator" data, containing the custom font.

So during initialization of the LCD, we load up the CGRAM with some custom characters. The commands we need are the ones needed to set the CGRAM address, and then write to the CGRAM.

So what I've done is create several "block-like" characters, which can be arranged into numbers that are two lines high.

Please see the attached demonstration, it should cycle through the possible numbers for you.

The idea is from http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213319639
 
Remove these adsRemove these ads by Signing Up
ZachyKras says: Feb 20, 2011. 7:00 PM
I'm really interested in doing something like this in my ongoing clock project, but I'm pretty new to this sort of DIY electronics. I've taught myself the basics and some intermediate programming stuff but I'm not too sure how to go about adding these big letters to my project. If someone could just explain it a little better for me it would be greatly appreciated.
frank26080115 (author) in reply to ZachyKrasFeb 20, 2011. 7:25 PM
What part are you having trouble with? Are you already comfortable using HD447800 compatible LCD displays (refer to step 8, where the source code and analyzer waveforms show you exactly how to send commands both from a software point of view and electrical point of view) ? Like I have explained (in step 9) and illustrated, you simply write a "bitmap" into the CGRAM. There is a table that shows an example of what to write into the CGRAM, and what CGRAM address each byte goes to, illustrating the final displayed results.

By now you know how to write data to the LCD and what to write into it. The example source code in step 9 shows you my technique for storing the bitmap into your microcontroller's memory as arrays of bytes, and then sending them over during initialization of the LCD. Each custom block character is 8x5 pixels and is stored as an array of 8 bytes, and are sent into the CGRAM of the LCD during initialization.
frank26080115 (author) in reply to frank26080115Feb 20, 2011. 8:03 PM
typo correction to my comment: HD44780, not HD447800
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!