You have elected to have the RW pin controlled by the Arduino. This means that your program will have to tell the Arduino to do so. In setup you will have to set pin 11 as an output and then drive it low.
It will be easier to disconnect LCD pin 5 from the Arduino and connect it to ground. You will then have to change the constructor to eliminate the reference to RW.
floresta:
You have elected to have the RW pin controlled by the Arduino. This means that your program will have to tell the Arduino to do so. In setup you will have to set pin 11 as an output and then drive it low.
It will be easier to disconnect LCD pin 5 from the Arduino and connect it to ground. You will then have to change the constructor to eliminate the reference to RW.
Don, the sketch doesn't have to control the pin connected to the r/w pin.
The LiquidCrystal library uses the optional rw pin provided as a grounding output to control the LCD rw pin.
i.e it sets it to be an output and and then sets the output to LOW.
It is effectively using an Arduino pin as a wire to ground so it is a waste of an Arduino pin.
But I do agree that it is simpler & better to just wire the LCD r/w pin to ground when using that library.
VSS - GND
VDD - 5V
VO - GND
RS - 11
RW - GND
E - 9
D4 - 6
D5 - 5
D6 - 4
D7 - 3
A - 5V
K - GND
And the new code uploaded to the board:
#include <LiquidCrystal.h>
LiquidCrystal lcd(11,9,6,5,4,3);
void setup() {
// put your setup code here, to run once:
lcd.begin(16,2);
lcd.print("HELLO");
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(0,1);
lcd.print("CODE");
}