I'm pretty new to all of this, I do however have a electronics and programming background.
I had an LCD connected to my MEGA and it worked flawless. I tried to connect a button to PIN 13 and implimented it into my code. When ever i hit the button the MEGA would reset. It happened 2-3 times and after that the LCD won't display anything anymore. I verified with an LED that the digital ports still work and the arduino still accepts code and send serial data.
Any suggestions on how to troubleshoot this? I bought a second display thinking that i somehow broke the first one but that was not it. Any help would be appreciated.
I don't have any better pictures than below right now. I mean the wiring is pretty simple. The display does not show anything. No weird characters, nothing. I adjusted the poti from end to end for the contrast but that doesn't change anything.
Display -> Arduino
pin 1 - GND -> 10k poti and from the same pin(outer) to GND on the MEGA
pin 2 - VCC -> 10k poti and from the same pin(outer) to 5V on the MEGA
pin 3 - VO -> 10k poti middle pin
pin 4 - RS -> pin 23
pin 5 - RW -> pin 1 on the display (GND)
pin 11 - DB4 -> pin 24
pin 12 - DB5 -> pin 25
pin 13 - DB6 -> pin 26
pin 14 - DB7 -> pin 27
pin 15 - Backlight+ -> 5V on MEGA
pin 16 - Backlight- -> GND on MEGA
Code is the simple Hello world again for right now.
// include the library code: #include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(23, 22, 24, 25, 26, 27);
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);
}