Controlling an LCD display with the Arduino

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche

2009-09-25 After a short setback due to the misunderstood role of the poti that drives the contrast of the lcd panel, I tried it again and I was now successful in driving my LCD panel. I'd never have believed that it is so simple. If you don't see anything on your display but lit characters (nothing black), use a poti and feed a voltage between 0 and 5V into the contrast pin. I found out that in my case, the contrast will be there if I give it exactly 5V. So in my case no need for a poti. But keep in mind that LCDs are very sensitive to heat, so there might be a need to care for that once you mount it into a stable case.

Arduino controls LCD.jpg

Note that I didn't use a resistor to reduce the LCD backlight voltage from 5.0 to 4.2 V. The display can stand that at least for the test.

#include <LiquidCrystal.h>

// Wiring pattern: LiquidCrystal(rs,rw,enable,d0,d1,d2,d3,d4,d5,d6,d7)
LiquidCrystal lcd(12,11,10,9,8,7,6,5,4,3,2);

void setup() {

void loop() {}