I'm relatively new to working with displays on Arduino boards and I would appreciate if anyone would have any suggestions to my problem that I'm working on.
I have bought several 8x2 LCD displays from eBay that look like this:
I found one thread where someone got it working with I2C backpack: Arduino Forum
I would like to get it working bare-bones on an Ardunio Nano. Here's what I've tried so far:
I tried 'Hello world' from LiquidCrystal library tutorial without success. Then I found this really simple code snippet to try to get it to display at least something:
Did you set the contrast ?
Page 18 of that datasheet tells how to do that.
Mentioned J1, J2 and R7 are unpopulated on the picture you've shown, but i'm sure that's not a picture you took yourself of the actual modules you've got.
It has 14 pins but a backlight, so presumably the backlight is connected to the HD44780 supply pins 1 and 2 - if it is alight then presumably the power is correct.
Your "Wiring" makes no sense with the "A" 7 to 12. Pin 5 - "RW" must be grounded, and pin 3 - "Vo" should connect to ground via a resistor of between 0 (!) and 470 Ohms to set the contrast. Even without code, that should produce a line of "blocks" on the display.
I'm relatively new to working with displays on Arduino boards and I would appreciate if anyone would have any suggestions to my problem that I'm working on.
I have bought several 8x2 LCD displays from eBay that look like this:
I found one thread where someone got it working with I2C backpack: Arduino Forum
I would like to get it working bare-bones on an Ardunio Nano. Here's what I've tried so far:
I tried 'Hello world' from LiquidCrystal library tutorial without success. Then I found this really simple code snippet to try to get it to display at least something:
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); // put your pin numbers here
void setup()
{
lcd.begin(8, 2); // put your LCD parameters here
lcd.print("hello,");
lcd.setCursor(0,1);
lcd.print("world!");
}
void loop()
{
}
Either way I'm stuck with a bright yellow blank screen with nothing printed on the display. Am I missing something?
Would anyone have ideas for further troubleshooting?
Your pin numbers show connection to analog pins.....should be digital pins !!
Sorry for the confusion on the 'Wiring' part, it was a long night.. It was wired to the Nano via digital pins 7-12, my bad on the write-up.
Paul__B:
Well, that's a bit of an odd display to be sure!
It has 14 pins but a backlight, so presumably the backlight is connected to the HD44780 supply pins 1 and 2 - if it is alight then presumably the power is correct.
Your "Wiring" makes no sense with the "A" 7 to 12. Pin 5 - "RW" must be grounded, and pin 3 - "Vo" should connect to ground via a resistor of between 0 (!) and 470 Ohms to set the contrast. Even without code, that should produce a line of "blocks" on the display.
I think you are right that the backlight is connected to the supply pins. I tried it with the supply only from Nano 5V, GND -> to display VDD, VSS and I got the same result, blank screen and the backlight turned on.
Thanks for the suggestion. I'll need to get some resistors and I'll give it a go.
You see, there are no such things as analog pins A8 to A12 on a Nano!
case112:
Thanks for the suggestion. I'll need to get some resistors and I'll give it a go.
Actually, you don't need to get the resistors to see if it works. Just connect pins 3 (Vo) and 5 (RS) to ground and you should get at least the block display.
Of course, you must have pins or wires soldered to the display to make it work. Quite often we have people complain about non-working displays when they are not actually connecting to them,
I got a few resistors for adjusting the contrast and it seemed like 430 ohm was the best option for me.
Since I'm making a basic thermostat I made a Github repo for it that's a work in progress. There's a bit more details there about setting the LCD up.
Looks like this display has the backlight turned on by default. Would there be a way to turn it off if needed? There's two more pins on the other side of the 14 pins marked A and K
case112:
Looks like this display has the backlight turned on by default. Would there be a way to turn it off if needed? There's two more pins on the other side of the 14 pins marked A and K
Well, the fact that the backlight is automatically lit tells you that it is connected to pins 1 and 2 in common with the LCD. The datasheet you cite does not seem to adequately describe the module you have and contains various common blunders but suggests there are links to control this and allowing for the poor photograph of the module from eBay, it appears that you can de-solder "J3" and connect the side which connects to "RA", to an Arduino pin to control the backlight given that the total of resistors "RA" and "RK" is at least 100 Ohms.
As it is not legible on the picture, can you tell me what the values of these two resistors are?
Oh, never mind! I found it!
Expand
So RA is indeed 100 Ohms and RK is a jumper. An Arduino pin can directly power the backlight with that resistor in series; it will draw something of the order of 20 mA.
Thanks Paul__B for your detailed answer. I followed through as you suggested and tried to do some de-soldering. Since I didn't have proper tools for that I ended up scraping the connection gently with a stanley knife and managed to cut it off. Then I soldered a wire to a connection just below the J3. Now I'm able to control the backlight with an Arduino pin setting it via digitalWrite(PIN, HIGH) and digitalWrite(PIN, LOW).
That implies a danger of breaking the circuit trace.
You need a finer (insulated) wire to solder to it and then cover the connection with a blob of hot melt glue or epoxy to reinforce it. You can of course use a PWM pin to vary the brightness.
You have however connected to the wrong end of "RA" and bypassed the current limiting resistor. That is very bad! You need to either re-solder to the top end of "RA" (when you find the lighter gauge wire) or add a 100 Ohm resistor in series to avoid damaging the LED and/ or Arduino.