Escolar Documentos
Profissional Documentos
Cultura Documentos
Connections:
Pin 1 (Vss) Connect it to GND
Pin 2 (Vdd) Connect it to 5V
Pin 3 (V0) Connect it to middle leg of 10K potentiometer (variable resistor). Connect the other end of
potentiometer to GND.
Pin 4 (RS) Connect it to GPIO pin
Pin 5 (RW) Connect it to GPIO pin
Pin 6 (E) Connect it to GPIO pin
Pin 7 to 14 (D0 to D7) 8 Data pins Connect it to 8 GPIO pins
Information sent to LCD display is classified as Control (Example: Clear screen) and Data (Example: 'A').
To send a command:
-> Put the command value in pins connected to D0...D7 [D0 LSB and D7 MSB]
-> Make RS pin LOW and RW pin LOW
-> Make E pin HIGH and after a delay (say delay(10)) make it LOW
To send a data:
-> Put the ascii value of character (say 67 for diplaying A) in pins connected to D0...D7 [D0 LSB and D7
MSB]
-> Make RS pin HIGH and RW pin LOW
-> Make E pin HIGH and after a delay (say delay(10)) make it LOW
int rspin=____, rwpin=_____, epin=____;
int dataPins[] = {__________};
// Make E pin HIGH and after a delay (say delay(10)) make it LOW
}
// Make E pin HIGH and after a delay (say delay(10)) make it LOW
}
int j=100;
void setup() {
// initialize dataPins, rspin, rwpin, epin as output pins.
void loop() {
// Send Data ‘A’ and give a delay
}
Hex Code Command to LCD Instruction Register
02 Return home