LCD expert

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi all in this forum. Please I have a problem with an LCD and I want an expert reply. I have pic tha controls an LCD from which I do not have the code. The LCD is a 16x2 LCD hd44780 compatible with datasheet LCD1602A (LCD1602A datasheet pdf, CA - LCD Module :: datasheet4u.net). Because I wanted to use bigger LCD i bougt an 20x2 lcd and paid attention looking in the datasheets to be compatiple with the first (initialization routine, contrast and hd44780 compatiple). So I bought JHD202C with a datasheet (http://www.egochina.net.cn/eBay/Download/JHD202C.pdf). I connected everything a it should and I tripled checked everything. Th backlight it opens and the first line of the LCD i displayed full, but no data is written. I thought maybe was broken and Itried another one but the same. I am stuck here. Any helpful idea anyone, Please?
 
Sorry, I'm no expert! But...

Any chance the PIC isn't allowing long enough between the various commands to the new display - more characters means longer required maybe? I have found that if you don't leave long enough after, say, the mode setting or screen clears etc., the screen may not display anything subsequently.
 
Thank for the reply but I do not have the code so no control there. If this is the case you sugest then I do not have a chance there. The think is that the code it seems compolicated enough doing many thinks so I doubt timing problems

Well, looking at the data sheets, the new display needs ever so slightly longer following the screen clear command (1.64 ms as opposed to 1.53 ms) and other commands (40 us as opposed to 39us), so it is just possible that this is where the problem lies. Could you check using an oscilloscope? If you are using an external crystal or clock generator on the PIC, you could try slowing the clock down as an experiment.
 
In my experience there is quite a variation among manufacturers as to what the term "HD44780 Compatible" means - and a lot of it is timing related.

I have also found that many LCD's are VERY susceptible to glitches and noise on the power supply lines as well as their signal lines. The slightest power supply disturbance will send them back to the "power on" state, cancelling any initialization that may have occurred. This is something to consider if your new LCD was cobbled onto an existing project using jumper wires, etc.

Dale
 
Thanks for the replies. Look what I found. After the comment of CopperTop that he found some differences in times I started played with the crystal 4mhZ, i Changed to 3,...Mhz but didnt start at all. I used a trimer parallel withe crystal and suddenly I saw something. Anyway the wholw thing was very unstable. I examined the circuit and I found that as soon as PIC starts trigers a relay that powers LCD. i THOUGH THIS IS NOT FAST ENOUGH. i CONNECTED THE POWER OF lcd directly to the power and it WORKS fluessly. I suppose this is my solution.
Thank you all
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.