• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

CFAG12864A-TMI-V noob questions

axmanjr

New member
I just purchased the CFAG12864A-TMI-V and have a few questions for it. What are the CS1 and CS2 pins for? The datasheet doesn't really specify much about these two pins, except that their level is HIGH.

Also, I read elsewhere on this forum that you could connect a potentiometer (~10k pot) to Vdd (pin 2) and Vee (pin 18), with the wiper on Vo (pin 3). So adjusting the pot could basically give me a contrast control, if used within the range (7.6V to 10.6V max). But what about pins 19 and 20? Couldn't I just place a pot there, to adjust the contrast of the screen? Thanks in advance.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
The CFAG12864 has 2 controllers, for the left half (col 0-63) and the right half (col 64-127) of the screen. The CS1 and CS2 select which half of the screen you are accessing. The level is 'high' to enable the chosen half, low to disable access.

Yes, the pot to Vo gives you the contrast control. Pins 19 and 20 are for the backlight, so that would affect brightness more than contrast. The backlight must have a current limiting resistor to set the current to 60 mA (or not more than 90 mA), and using a pot to control it is not a good idea. If you want backlight brightness control, its better to use a PWM output to control the duty cycle.
 

axmanjr

New member
Thanks!

But I'm still a little confused about the CS1 and CS2 pins. Wouldn't I want to always have them enabled (high), so as to have access to both sides of the display?
 
Not simultaneously. You would control each one with its own I/O pin, and only enable the side that contains the pixels you are writing. They get switched by your software dynamically as you cross from one side to the other. Otherwise you'd get the same byte written to both sides.

The only time you might want them both active is a quick way to clear both sides.
 

axmanjr

New member
what if I was writing text to both sides of the screen at the same time, constantly? The data that needs to be written to my screen expands to both sides of the screen, therefore I would always have to have both sides active...
 
No, I think you are misinterpreting this. "active" means access for writing and reading. The content of the display will still be visible, even when the chip selects are not active. You are writing to only one side of the screen at any instant.
 
Last edited:

axmanjr

New member
it's starting to make sense a little bit... :rolleyes:
What about writing text that expands across both sides of the screen (a short sentence)? Wouldn't I have to enable both CS pins to write to both screens? Or only the left-side, since that's where the text starts writing?
 
Wouldn't I have to enable both CS pins to write to both screens?
Yes, but only one at a time. How can I make this plain? When you are writing the text bits on the left side, CS1 is active. Then when you reach the end of the left side (col 63), then CS1 is disabled and CS2 is activated to write col 64 and higher.

Are you actually writing any code, or is this all hypothetical?
 

axmanjr

New member
yes, i am trying to write code for this in C. I just don't understand how I would anticipate whether to activate the right side or not.
 

axmanjr

New member
I can't open the zipped file. I get an "invalid file..."-type message. I've tried it on 2 different computers. I had problems with other files found in this forum the other day as well.
 
Are you trying to 'right-click' and 'save as'? Don't do that. The link is a script, and just 'left-click' it, and it should prompt you for where to save.
 

axmanjr

New member
Okay, so I got the LCD working a bit now... I am just sending sample stuff to the screen, such as a rectangle box, a circle, and some text. I notice whenever I turn the board off for a short period of time (a minute maybe) and then on again, the text won't display. Everything else will (box and circle). If I flicker the on/off a few times, then it'll work again.

One weird solution I found was to hardwire the LCD Vdd directly to power, so that when the rest of the board is OFF, the LCD is still receiving connected to power. Is this the way it should work? I can't find anything in the provided datasheets that state otherwise.:confused:
 
Are you actively using the reset signal (RST pin 17) each time you power cycle and init the display? Or is it just tied high?
 
Top