So very strange situation:
I have 2 16x2 displays (w/ & w/out a backlight) which have both worked perfectly fine with the arduino before (and through some brute force a PIC as well). However now, in a wiring configuration essentially the same as all previous times, the backlit display doesn't seem to be working, and I'm beginning to think it's a hardware issue.
Specifically, no matter which functions from the LiquidCrystal Library I use, I don't get any kind of response. I have linked the code and two (rather messy) pictures for each display. FYI, I am using a knockoff Arduino, but like I said, it (seems to be) currently working/has worked before. Any ideas?
Other info:
Windows x64, IDE v1.8.5
Images:
/* Using the std HelloWorld sketch
// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 2, en = 3, d4 = 4, d5 = 5, d6 = 6, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}
jarrettmonty:
So very strange situation:
I have 2 16x2 displays (w/ & w/out a backlight) which have both worked perfectly fine with the arduino before (and through some brute force a PIC as well). However now, in a wiring configuration essentially the same as all previous times, the backlit display doesn't seem to be working, and I'm beginning to think it's a hardware issue.
Specifically, no matter which functions from the LiquidCrystal Library I use, I don't get any kind of response. I have linked the code and two (rather messy) pictures for each display. FYI, I am using a knockoff Arduino, but like I said, it (seems to be) currently working/has worked before. Any ideas?
Other info:
Windows x64, IDE v1.8.5
The images did not display. firefox really does not like the hosting site.
Make and model of the two displays.
make of the knockoff Arduino board.
wiring diagram
w/out backlight: LUMEX LCM-S01602DSR/A
w/ backlight: NEWHAVEN NHD-0216K1Z-NSW-FBW-L
arduino: INLAND - UNO R3 BOARD
I don't have a schematic though, I'm not sure which is preferred on this site. I can make one though if you give me a name; But it will be just like the sample schematic on the arduino site (just using (lcd(2,3,4,5,6,7) and r/w grounded)
I can't see the power and ground connections to the Arduino board in your photos; they are off the top of the photos.
I'm assuming that the are correct.
The NHD-0216K1Z-NSW-FBW-L-ND datasheet states the backlight has an onboard resistor.
Maybe the 220 ohm resistor you are using is too much and the backlight isn't lighting because it drops the voltage too much or it is very dim.
Get out your voltmeter and check the voltage going the anode and cathode of the backlight.
I'd also look at the LCD PCB to make sure that there is a resistor and if so, try it without it as it shouldn't be necessary.
--- bill
bperrybap:
I can't see the power and ground connections to the Arduino board in your photos; they are off the top of the photos.
I'm assuming that the are correct.
The NHD-0216K1Z-NSW-FBW-L-ND datasheet states the backlight has an onboard resistor.
Maybe the 220 ohm resistor you are using is too much and the backlight isn't lighting because it drops the voltage too much or it is very dim.
Get out your voltmeter and check the voltage going the anode and cathode of the backlight.
I'd also look at the LCD PCB to make sure that there is a resistor and if so, try it without it as it shouldn't be necessary.
--- bill
Hey bill, appreciate the response; I should mention that usually (when it has worked) I do not use the 220 ohm resistor, but in this case I was double checking, I've tried with and w/out. I did check the voltage and it is 4.91, just like the supply. I tried checking the resistance placing both probes on the +/-, but got no response from 20k - 200(?). I also added back the +/- connections and the display on my voltmeter dimmed (I imagine this is irrelevant).. Anyways that being said, I want to clarify that the backlight is working, though in my picture you can only tell by the light on the side; Usually I am able to see the text without the light anyways though.
Ah. I had assumed the backlight was not working.
If the backlight is working, then you should be able to adjust the pot to see something.
At one end, you'll get full blocks on every character on the display and turning towards the other end, start seeing any characters on the display and eventually see nothing.
bperrybap:
Ah. I had assumed the backlight was not working.
If the backlight is working, then you should be able to adjust the pot to see something.
At one end, you'll get full blocks on every character on the display and turning towards the other end, start seeing any characters on the display and eventually see nothing.
Yeah, no response as far as that goes.. I was also considering a problem of the initialization; the boxes show up after the display is properly initialized right?
If the backlight is on, the boxes can show up if the LCD and the backlight have power.
Initialization is not required.
The LCD puts box characters on the 2nd row at power up.
If initialization is not done, then the 2nd row will have boxes on it from the LCD power up.
However, if you adjust the pot all the way to the end you can force all the pixels on the display to turn regardless of initialization and what is actually supposed to be on the display.
If you don't see any boxes when adjusting the pot, then there is some kind of h/w issue.
While it is possible that the LCD is dead, more than likely it is a power issue to the LCD (pins 1 & 2) or there is a pot issue or the connections to it.
i.e. you can get the boxes to show up with only pins 1,2,3, 15, and 16 hooked up.
--- bill
bperrybap:
If the backlight is on, the boxes can show up if the LCD and the backlight have power.
Initialization is not required.
The LCD puts box characters on the 2nd row at power up.
If initialization is not done, then the 2nd row will have boxes on it from the LCD power up.
However, if you adjust the pot all the way to the end you can force all the pixels on the display to turn regardless of initialization and what is actually supposed to be on the display.
If you don't see any boxes when adjusting the pot, then there is some kind of h/w issue.
While it is possible that the LCD is dead, more than likely it is a power issue to the LCD (pins 1 & 2) or there is a pot issue or the connections to it.
i.e. you can get the boxes to show up with only pins 1,2,3, 15, and 16 hooked up.
--- bill
yeah I get nothing end-to-end, so I'm guessing it's hardware. I also noticed that some underscore-type characters showed up as I was pulling it out one time.. Other than that I'm pooped, and I might just try with a power supply from my school
Measure the voltage on pin 3 of the LCD. It should swing from gnd to Vcc as you move the pot.
Maybe you just have a bad pot. On many LCDs, if you ground pin 3 you can see pixels on the display.