Graphic LCD tutorials?

hgboy

New member
I just purchased a CFAG12864F display, and need some info on how to interface it with a pic18f4550 microcontroller. I have never used a microcontroller to drive a display, so just reading the datasheet is a little bit overwhelming. Can anyone offer any advice or links to tutorials on the subject?
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Support2

Administrator
One place to start is in this thread:

https://forum.crystalfontz.com/showthread.php?t=3257

It is geared toward using a parallel port, but the concept is basically the same. You'll need to make sure you have the data and control lines configured. I did a quick search and found several other resources that should get you up and running:

http://www.melabs.com/products/books/mabook.htm

http://www.rentron.com/pic.htm

http://www.nabble.com/MicroControllers---PIC-f2059.html

http://www.robotbuilder.co.uk/Resources/Articles/146.aspx

Another good source is our user base here on the forums -- I am sure that there will be several other posts with more, and likely better information for you.
 

hgboy

New member
Ok, after searching around osme more, I think a little of this information is starting to make sense. There are 8 data lines, five control lines, power, ground and negative voltage for contrast. Which pins are for the operation of the backlight, and can I use a pot to adjust the brightness on this?
 

CF Support2

Administrator
All of our CFAG12864F series modules have on-board negative voltage and temperature compensation for the contrast. The suggested contrast control is a 10K pot. across Vdd (+5v source) and Vee (negative V out) with the wiper going to Vo (contrast).

For the backlight, you have a couple of options.

There are A (anode) and K (cathode) connectors on the module that will allow you to power the backlight separately. Or, if you choose, you can power the backlight from Pins 1 and 2. To do this, you will need to close Jumper J1 to connect the cathode to Vss / Pin 1 / Ground, and load a current limiting resistor in RA to connect the anode to Vdd / Pin 2 / +5v.

To calculate the value of RA:

(Vdd - Forward voltage) / Iled (use typical values.

So, for example, the CFAG12864F-YYH-TZ would work out to:

5 - 4.2 / .330 = 2.42 Ohms.

If you want to, you can use a pot directly in line with the anode to adjust the backlight. You will want to be careful and ensure that you do not exceed the backlight's maximum current.
 

Attachments

hgboy

New member
thanks for the info. I believe I have it all wired up correctly, now to write some code for the thing.
 
Top