0

LCD 20, 4 wont work. What am I doing wrong?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

LCD 20, 4 wont work. What am I doing wrong?

by mradjuster on Mon May 06, 2019 12:29 pm

I have the RGB backlight negative LCD 20x4 + extras - RGB on black with a Uno. I have rewired at least 4 times to no avail. I simply can't get it to work. Here is the code I used. Can anyone help me and tell me what im doing wrong. Attached are photos and code... Thank you for any advise

Code: Select all | TOGGLE FULL SIZE
// 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 = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(20, 4);
  // 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);
}
Attachments
thumbnail_IMG_1370.jpg
thumbnail_IMG_1370.jpg (184.25 KiB) Viewed 172 times
thumbnail_IMG_1369.jpg
thumbnail_IMG_1369.jpg (184.48 KiB) Viewed 173 times

mradjuster
 
Posts: 3
Joined: Mon May 06, 2019 9:50 am

Re: LCD 20, 4 wont work. What am I doing wrong?

by adafruit_support_carter on Mon May 06, 2019 2:53 pm

Try turning the trim pot to adjust contrast and see if that helps.

adafruit_support_carter
 
Posts: 14404
Joined: Tue Nov 29, 2016 2:45 pm

Re: LCD 20, 4 wont work. What am I doing wrong?

by mradjuster on Mon May 06, 2019 3:09 pm

I tried. Nothing. The Sketch compiles and uploads but nothing is outputted to the screen. I went by two or three wire schemas but nothing ever printed to the screen. It has to be something simple cause I did everything I could with my basic knowledge...

mradjuster
 
Posts: 3
Joined: Mon May 06, 2019 9:50 am

Re: LCD 20, 4 wont work. What am I doing wrong?

by adafruit_support_carter on Mon May 06, 2019 3:20 pm


adafruit_support_carter
 
Posts: 14404
Joined: Tue Nov 29, 2016 2:45 pm

Re: LCD 20, 4 wont work. What am I doing wrong?

by mradjuster on Mon May 06, 2019 3:27 pm

I tried that one already only to realize I have an 18 pin and the last four are reserved for the back lighting. I even shifted them over two spots on the left for the data pins and I get lighting but nothing is being written to the board. I know I coded the RS correct but is it in the right spot on the uno... I feel like I’m close but no ah hah moment...

mradjuster
 
Posts: 3
Joined: Mon May 06, 2019 9:50 am

Re: LCD 20, 4 wont work. What am I doing wrong?

by adafruit_support_carter on Mon May 06, 2019 3:49 pm

Correct, the extra pins are for the backlight. Treat them the same as pin #16 in the wiring linked. But for the others, match to what is shown.

adafruit_support_carter
 
Posts: 14404
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.