Go Down

Topic: EA-DIP204 4NLW Initialising (Read 960 times) previous topic - next topic

Juergen_S

Jul 25, 2011, 07:34 pm Last Edit: Jul 25, 2011, 09:13 pm by Juergen_S Reason: 1
Hello,

i have a new init-sequence for this EA-DIP204-4NLW display.

Here is the code:
Code: [Select]
LiquidCrystal lcd(9, 8, 7, 6, 5, 4);

void setup() {

 // set up the LCD's number of columns and rows:
 lcd.begin(20, 4);
 {
   lcd.command(0x01);//clear display lcd.command (0x01) / / clear display
   delay(02);
   lcd.command(0x24);//function set RE=1 lcd.command (0x24) / / function set RE = 1
   delay(50);
   lcd.command(0x09);//extendet function set, 4 lines, 5-dot fontwith
   delay(50);
   lcd.command(0x20);//function set RE=0 lcd.command (0x20) / / function set RE = 0
   delay(50);
   lcd.command(0x0C);//control, display on, cursor off, blinken off
   delay(50);
   lcd.command(0x01);//clear display lcd.command (0x01) / / clear display
   delay(20);
   lcd.command(0x06);//entry mode segment bidirectional

 }
 
}


you must also modify the cpp.file inside the LyquidCrystal Libray:

change int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
    to   int row_offsets[] = { 0x00, 0x20, 0x40, 0x60 };

Thats all.

J├╝rgen

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy