Go Down

Topic: Control 1602A LCD with 0/1 on Arduino (Read 267 times) previous topic - next topic



I try to control LCD with 0/1 on Arduino.

I wired 1602A display to Arduino and tried first command:
0 RS | 0 RW | 0 D7 | 0 D6 | 0 D5 | 0 D4 | 0 D3 | 0 D2 | 0 D1 | 1 D0

Code: [Select]

#define D0 9
#define D1 8
#define D2 6
#define D3 7
#define D4 5
#define D5 4
#define D6 3
#define D7 2
#define RS 10
#define RW 11
#define E 12

void setup() {
    for(int i = 2; i <= 12; i++) {
        pinMode(i, OUTPUT);
    digitalWrite(D0, HIGH);
    digitalWrite(D1, LOW);
    digitalWrite(D2, LOW);
    digitalWrite(D3, LOW);
    digitalWrite(D4, LOW);
    digitalWrite(D5, LOW);
    digitalWrite(D6, LOW);
    digitalWrite(D7, LOW);
    digitalWrite(RW, LOW);
    digitalWrite(RS, LOW);
    digitalWrite(E, HIGH);
    digitalWrite(E, LOW);

void loop() {

I see blinking cursor on the left side (first line), but I also see basic white boxes, which should disappear.

What is wrong?


Sending wrong instructions, of course!  :smiley-lol:

Just go read the instruction manual, starting at page 39.

Remember the old, old saying - "when all else fails, read the instructions!"


What does * in step 2 on DB0 and DB1 mean?


Nov 21, 2018, 03:00 pm Last Edit: Nov 21, 2018, 03:06 pm by floresta
Why don't you try a Google search for the phrase 'LCD programming Examples' and see what pops up?  You should also search for 'LCD Initialization'.

You will not see anything on your LCD (other than the row of boxes) until you send the entire initialization sequence followed by the ASCII codes representing the desired message.



What does * in step 2 on DB0 and DB1 mean?
It means that it doesn't matter whether you use a 0 or a 1, the information must be there but it is ignored.


Go Up