Connecting LCD 16x4 directly to Arduino Mega

Hi, there!

I’m trying to connect a 16x4 LCD display to the pins 25~53 of the Arduino (the odd pins), without using wires, directly to the board, but I don’t even know if this is possible. I only saw one tutorial of a guy who did this, but all others just teach how to connect them in the usual way.

The pins are connected this way: LCD pin 1 to GND, LCD pin 2 to 53, LCD pin 3 to 51, …, LCD pin 16 to 25.

The pins that should be +5V (Vdd and contrast) I setted as digital outputs HIGH, and those that should be at ground (RW, k contrast) I setted as digital outputs LOW.

I didn’t use any potentiometer or resistor, just setted the Vo pin to LOW. The code can be seen below, but in fact the only thing that worked is the backlight, i can’t write anything to the LCD.

Any help??

#include <LiquidCrystal.h>

LiquidCrystal lcd(49, 45, 35, 33, 31, 29);

void setup()
{
  pinMode(53, OUTPUT); //Vdd
  pinMode(51, OUTPUT); //potentiometer
  pinMode(47, OUTPUT); //RW
  pinMode(27, OUTPUT); //CONTRAST A
  pinMode(25, OUTPUT); //CONTRAST K

  digitalWrite(53, HIGH); //Vdd
  digitalWrite(51, LOW);  //potentiometer
  digitalWrite(47, LOW);  //RW
  digitalWrite(27, HIGH); //CONTRAST A
  digitalWrite(25, LOW);  //CONTRAST K
    
  lcd.begin(16, 4);
  lcd.setCursor(1,0);
  lcd.print("ABCDE");
}

void loop()
{

}

Exactly what does the display show? Anything at all? If so, a picture please!

Paul__B:
Exactly what does the display show? Anything at all? If so, a picture please!

It doesn't display anything. Only the backlight is on. I attached the images of the LCD and the pins I'm using.

Does this mean anything to you?

LiquidCrystal lcd(49, 45, 35, 33, 31, 29);

LCD pins: RS EN DB4 DB5 DB6 DB7

No images seen :(.

larryd:
No images seen

Yes, you must post URLs to images, not to private googleusercontent.com pages. :cold_sweat: See the forum instructions.