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

20x2 CFAH2002A-NYA-JP 4-bit interface problems

LedBit

New member
Hi


I recently bought at CFAH2002A-NYA-JP. I am trying to get it working using the 4-bit interface. I have followed the instructions in the HD44780U manual very closely but still can't get it to initialize properly. The initialization process seems to go fine up to the DISPLAY_OFF instruction, that is the display is truned off (so wiring is OK). The next two instructions, the display clear and the entry mode set, seem to skrew things up, after they are executed the first line of the lcd is all black, also the top 3 pixels of the second row a dark. After each instruction sent to the LCD I check the busy flag, wait untill it is 0, then send the next intstruction.
Has any one gotten the 4-bit interface working on the 20x2 LCD? Can any one point to me what I might be doing wrong?


Thanks in advance
Ledion
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

LedBit

New member
Thanks for your reply. I did check the code, it all seemed identical. I do not have the previous problem anymore, I did rewire the LCD again since one of the pins seemed to be loose and now I am getting all the characted boxes clear, but I cannot get to display anything, I tried to turn the lcd on with the display command, but nothing comes. How should the LCD look like after a correct initialisation, before running the display ON command?
 

CF Support

Administrator
Well, here's the problem. If you merely have the power and contrast hooked up correctly, you will get the top row (or alternating rows) of full-on characters. You need not even have any of the data lines hooked up to get that supposed "test screen" on the display.

If you're still unable to send data to the display after verifying your wiring, I would check to make sure that you didn't lift any traces when you were rewiring the display, so that it's not making good electrical contact. If only one data line is not connected properly, the entire display will do nothing (that I'm aware of) and will be non-functional.

I assume that you're using a micro to talk to the display, so I would make sure that the control lines are as you would expect, as I've seen/had similar difficulties with a different (non HD44780 controlled) LCD that also gave unexpected behavior. I'm pretty sure that for 4 bit mode you have to initialize the display twice (or three times?) in order to get it going, but as I don't do much application development using the parallel displays, your mileage may vary beyond the demo code.
 
Top