LCD Display of Same Specification shoes blocks instead of characters...

Thread Starter

yugant

Joined Sep 27, 2014
15
Replaced LCD part number
Newhaven NHD-0216XZ-FSW-GBW with the Hantronix display HDM16216L-5-Z1BS. The specification are the same but this gives me blocks as output on LCD screen.
I also tried the Lumex LCM-S01602DSF/A display but again the result is the same.
I am using microchip PIC16F627A microntroller for this. As this is a old program I only have assembly language (.asm) and .hex file for this. .hex was the original file. I somehow converted it to .asm using mplab.
Any suggestions guys?
 

Attachments

MrSoftware

Joined Oct 29, 2013
2,273
Compare the data sheets for the displays, be sure the pins are the same. If they are then next check the communication protocol and make sure they are both the same.
 

Thread Starter

yugant

Joined Sep 27, 2014
15
I tried controlling the contrast with the pot that I have but it only controls the contrast of those blocks which I am getting. I am still not getting any characters
 

JWHassler

Joined Sep 25, 2013
308
Some of the 14-pin LCD control programs that I've seen in the past, ( those that do not read back the unit's status-register, ) have several delays in the startup section.
The required length of these delays varied greatly: maybe you could make them all really long, then tweak.

(with the proviso that this advice may be worth exactly what you paid for it)
 

jpanhalt

Joined Jan 18, 2008
11,087
It looks like the NHD generates its Vee; whereas, the Hantronix doesn't. If you have a negative supply, try it as shown in the datasheet. If not, you can generate it easily using one pin of your MCU.
 

Thread Starter

yugant

Joined Sep 27, 2014
15
This is .asm program. I converted the .hex to .asm in mplab. I don't have any knowledge about assembly language problem. If anyone can guide me how to change delay in .asm it would be a great help.
 

Attachments

AlbertHall

Joined Jun 4, 2014
12,637
I believe the LCD initialisation begins at LADR_0x0083 and most, though not all delays are implemented by calling CALL LADR_0x006E
with the delay being set by loading a value into LRAM_0x35.

It would take some considerable effort to fully understand this code and what value produces what delay. This is the problem with reverse engineering the hex file.
 

spinnaker

Joined Oct 29, 2009
7,830
Begin at beginning. Write a small program to toggle each of your control/data connections. Verify that each of your connections is correct. If that isn't working it doesn't matter if your code is correct or not.
 

jpanhalt

Joined Jan 18, 2008
11,087
This is .asm program. I converted the .hex to .asm in mplab. I don't have any knowledge about assembly language problem. If anyone can guide me how to change delay in .asm it would be a great help.
1) Why do you think it is one of the delays? Which ones? That seems like an unlikely source to me, if your code works on the other device. Those delays are pretty well standardized for that Hitachi controller.
2) Are you certain Vo (Vee) is correct? (As mentioned above, the displays do not appear to be identical in that respect.)
3) What else does the source code do? It seems awfully complicated for just doing initialization. Attached is an initialization I have used for 4-bit mode. It also prints "Hi" reads the ready flag rather than using a fixed delay. One can eliminate the WNB (WaitNotBusy) code and insert a 40 us or so delay.
 

Attachments

ericgibbs

Joined Jan 29, 2010
21,509
hi y,
I would go with John's suggestion of trying a -Vee at the bottom end of the Contrast pot.
If you have a 1.5V battery you could easily build a simple -1.5V source for testing.

Do you know what MCU operating frequency the original ASM code was written for.? you may be using a higher frequency, which would make the LCD delays too short.?

E
 
Top