LCD displays
- LiquidCrystal: official library included with the Arduino software (w/ 4- and 8-bit modes)
- Suggested Character based LCD API by dwentz
- The Arduino controls Serial LCD's over a simple four-wire connection, by djmatic.
- About Printing Number
- SparkFun serial LCD
- ioBridge Serial LCD
- Optrex IM050240 Serial LCD Driver (PCB marked with PWB50240-CEM). These are super cheap 4 digit displays, with no decimal points, and the words "CLEAR" and/or "SECURE". They must have been made for a security alarm. These are not smart, and must be continually refreshed (supplied software driver does this). They can be purchased as surplus for as little as $1.95. This software requires the use of library MsTimer2.
- display values on LCD screen - Translating analogRead(values) into ASCII code to display the value on a LCD screen.
- Philips PCD8544 (Nokia 3310) driver - Simple example of interfacing with the Nokia 3310 LCD.
- Parallax Serial LCD's - Library for controlling Parallax 3-wire serial LCD's
- Using 4-bit mode with Hitachi LCD controllers. There are now various code examples for how to talk to an HD44780-compatible LCD in 4-bit mode (in order to save arduino pins):
- Using Arduino via shiftregisters to connect to LCDs (in order to save even more output pins)
- Using i2C to connect LCDs to Arduino
- Connecting LCDs using 1 pin, SoftwareSerial, and simple controller
- Use an external serial interface Put a small PCB ($14 kit/more assembled) between your Arduino and any HD44780 compatible LCD, and you free pins and memory in the Arduino for things which are more fun than the details of driving the LCD. SoftwareSerial is one of the standard libraries.(Anderson/ ModernDevice/ Wulfden LCD117)
- Graphics LCD
- Links
Troubleshooting
- LCD display is too dark or too pale. All LCDs have a contrast setting, whether it is available to you for adjustment or not. Many have backlights. The latter parts of the guide to using an external serial controller address these issues in general terms, mostly independently of controller issues.
Printing Numbers
The itoa() stdlib C library function can be used to convert a number into a string, in a variety of bases (e.g. decimal, binary). The buffer must be large enough to hold the largest number, plus sign and terminating null: e.g. 32 bit base-10: "-2147483648\0" = 12 characters.
The stdlib itoa() library routine adds around 600 bytes, the roll-your-own K&R implementation, which includes string.h, adds around 670 bytes. Using snprintf() from stdio.h adds just over 2200 bytes.
e.g.
char buf[12]; // "-2147483648\0"
lcd.printIn(itoa(random(1024)-512, buf, 10));
Page maintenance:
- would an admin please
- delete the attachment "LCD4BitLibrary", but KEEP LCD4BitLibrary.zip
- delete the page Code.LCD4Bit