Ok, have a 4x20 J204A LCD that im connecting to my Mega 2560 R3.
I have followed this tutorial
but also connected the backlight through a 470R resistor.
I'm fairly sure i have it wired up correctly (checked it multiple times).
This is my code
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
//LiquidCrystal lcd(33, 31, 35, 37, 39, 41, 43, 45, 47, 49);
//LiquidCrystal lcd(33, 31, 43, 45, 47, 49);
LiquidCrystal lcd(33, 31, 43, 45, 47, 49);
void setup() {
// set up the LCD's number of columns and rows:
delay(5000);
lcd.begin(20, 4);
// Print a message to the LCD.
}
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("hello, world!");
}
Yes, the pin assignment is a little weird, im using a breakout board and they are the easiest pins to solder too ![]()
I assume the 6/10 pins that i use can be any pins on the Arduino, i don't need to use any SPI/PWM pins or anything?
I have even tried using all 8 data pins, this also does not work.
looking on the screen , i can see it 'refreshing' with the loop.
On each 'square' i can see horizontal lines running up each one randomly.
any ideas on what the problem could be?