Following the "Hello world" tutorial on this site (here), I wired up a 16x2 LCD (datasheet), and achieved desired results, with the exception of being able to control contrast of the display. Full CW and CCW showed no change in contrast of display, when viewed from different angles, with backlight on or off.
A couple specifics of the display...pixels are yellow-green kinda on blue backlit field. Datasheet describes V0 as "Power supply for LCD drive" rather than something like "contrast control".
Is contrast control on a display of this color scheme not used, in contrast (he he) to displays that present black pixels on green? At present, I have the lead from V0 just hanging off to side. Can it be eliminated?
It's a nice display, and it's telling me what I am telling it to tell me, but, maybe I could learn a bit more here.
I have the lead from V0 just hanging off to side. Can it be eliminated?
I am surprised that you can see any display at all with V0 floating.
If your potentiometer is connected correctly and is functioning properly the display should be blank with the potentiometer at one end (the end where V0 = 5V) and you should see characters and/or rectangles in every location with the potentiometer at the other end.
If you suspect the potentiometer is bad then disconnect it and try connecting pin 3 to GND but don't leave pin 3 floating.
I made thorough continuity and wiggle checks of my connxns, and tried 10k trimmer and larger spline shaft pots to no avail at altering contrast of display. I sent V0 (pin 3) to GND, 5V, and then let hang, with same result, a brightly lit and legible 16x2 LCD. Attached photo shows screen with lead floating, I would attach two other photos, of lead sent to GND, and alternatively 5V, but the images are similar by my scrutiny here.
Project details are: ATMega 328P-PU on a bboard, standard setup with ceramic resonator. DS-1307 on I2C, and LM35Z on A0. A slight departure from tutorial is that I removed RS and Enable leads over to D6 & 7, in order to vacate PB1-5 for a radio module. I have not chosen a humidity sensor so displayed as "n/a".
This is an STN-type display, which further research revealed little in re contrast control. I think this is something important, but am not certain why. Nothing pertinent was found browsing through Hitachi's website, assuming this model is generic equivalent.
Thanks Don.
BTW, I am considering wiring a voltage divider with CdS cell onto pins 15 & 16 of display, to change backlight brightness to respond to changing ambient light level, as the screen is really bright in a darkened room. Then there are phototransistors. In your opinion, which might you choose for this. My datasheet states an Isubf of backlight as a whopping 100mA, though does not give a Vf (bummer).
My datasheet states an Isubf of backlight as a whopping 100mA, though does not give a Vf (bummer).
What makes you suspect that the datasheet you have actually corresponds to your LCD module?
Are there any markings on the LCD module that would help identify it?
Is there a resistor connected between pin 15 or 16 and the backlight? If there is then you can measure the voltage across it to determine the current and you can measure Vf as well.
Don
Note: The X2 button will let you print If instead of Isubf.
What makes you suspect that the datasheet you have actually corresponds to your LCD module?
Where I purchased the LCD and where I obtained the datasheet is same source, the vendor.
Are there any markings on the LCD module that would help identify it?
The display is a 1602D01 model, as inscribed on reverse of pcb.
Is there a resistor connected between pin 15 or 16 and the backlight?
Yes, a 130ohm (131) resistor.
If there is then you can measure the voltage across it to determine the current and you can measure Vf as well.
Following your suggestions I believe the datasheet I was working with contains a typo of a missing decimal point in reporting the If. What I measure for If here conforms more to what is reported in this datasheet (here) from Sparkfun. I measure 9.45mA, with a Vf of 1.21V, this because I have a 100ohm resistor over on the bboard, wired in series with the power supply to the backlight (4.06V). Thank you for illuminating me in re the backlight. This will guide me in choosing a reasonable choice for an auto-dimming feature.
I am using a reclaimed phone charger wall wart supplying 5.08V/700mA no-load, with a 10uF electrolytic on power rail smoothing things out. On pins 2 & 3 of LCD I measure 4.99V with respect to GND at pin 1. Alternatively, when I send pin 3's lead to a GND rail I observe no change in contrast of LCD character boxes.
The 100ohm resistor is "...over on the bboard, wired in series with the power supply to the backlight (4.06V)."
First, this is a nice display, there is just a lack of documentation on this model. Extensive web and image searches revealed nothing pertinent to this make/mfr. I just started poking around on the back of the pcb.
For attaining contrast control on 16x2 LCD, Tayda Electronics A-1748, model 1602D01 VER03, mfr. p/n HXF1602D01 (here). Note typo in datasheet referenced above, where given If should be reported as 10mA.
Solution: Solder over J2 jumper on reverse of board, upper right. Photo attached.
Resuming the correct wiring in of 10k pot for contrast control, reasonable contrast is achieved with voltage of 1-1.3V applied to V0. Depending on wiring of pot, wiper position is either at 10 or 2 o'clock. At wiper extremes observe no character blocks, or all blocks lit fully.
Thanks everyone for weighing in on topic. Looks like my problem is peculiar to this mfr. I will be posting link to this thread at review of this display on vendor page.