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

Basic questions about CFAH2002A

rtarbell

New member
Howdy!

Brand new with LCDs, I just wanted to ask a few very basic questions (I'm using the CFAH2002A):

For intialization using the 8-bit interface, I'm looking on page 16 of the datasheet.
The first "string" I have to send out is 0 0 0 0 1 1 * * * *
In fact, I have to send this out 3 times for proper initialization. Can I just hold this string on the pins for ~20 milliseconds? Why is it listed that I have to send the string three successive times? What pin do I use to "strobe" each string?

In the "entry mode set" instruction, what are pins DB1 and DB0? They are labeled as I/D, and SH, but what do these mean?

In both of the read and write operation timing diagrams, the E enable signal is returned low "somewhere" during the DB0-DB7 valid data changes. Is the E pin like the "strobe" pin used to tell the LCD when to sample the 8 data pins?

Thank you very much!
-RT
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
Last edited:
The first "string" I have to send out is 0 0 0 0 1 1 * * * *
In fact, I have to send this out 3 times for proper initialization. Can I just hold this string on the pins for ~20 milliseconds? Why is it listed that I have to send the string three successive times? What pin do I use to "strobe" each string?
The E signal is the data strobe for writes. You can leave the data static on the bus, and just toggle the E pin 3 times, with the appropriate delays between each strobe.
In the "entry mode set" instruction, what are pins DB1 and DB0? They are labeled as I/D, and SH, but what do these mean?
I/D means Increment or Decrement the cursor position after a write. SH enables shifting the display.
In both of the read and write operation timing diagrams, the E enable signal is returned low "somewhere" during the DB0-DB7 valid data changes. Is the E pin like the "strobe" pin used to tell the LCD when to sample the 8 data pins?
Yes. The 'somewhere' is the "data setup delay" timing parameter. See page 14 of the data sheet for the timing requirements.
 

rtarbell

New member
THank you for your reply!

Okay, so the E enable pin is the "strobe", and it "clocks" data into the LCD on a negative edge.

==> For the Entry Moded Set instruction, what exactly does enabling the SH (shift) bit do? I don't exactly understand what shifting the display means.



If I can step through a sequence of writing characters to the screen, after I have initialized the LCD, I think I would do this:

"set ddram address" (for first position) ==> E strobe ==>
Write Data to Ram (using the character I want to print) ==> E strobe ==>
"set ddram address" (for second position) ==> E strobe ==>
Write Data to Ram (using the character I want to print) ==> E strobe ==>
etc. etc. etc.

Am I missing any steps or commands?
 
==> For the Entry Moded Set instruction, what exactly does enabling the SH (shift) bit do? I don't exactly understand what shifting the display means.
I can't explain it because I never use this feature. When you get things working, set the SH bit and see what effect it has.
"set ddram address" (for second position) ==> E strobe ==>
Write Data to Ram (using the character I want to print) ==> E strobe ==>
If you are writing to consecutive character cells, you don't need to set the ddram address for each character after the first. The cursor position (where the data will be written, regardless of whether the cursor is visible or not) will increment (or decrement, depending on the I/D bit) to the next cell address, after the write.

At the end of line 1, the addr will keep incrementing into 'no mans land' beyond the visible cells, so you have to set the addr again to continue on line 2. See the addressing scheme on the bottom of page 8 in the data sheet.
 
Top