The Adafruit Negative RGB 2x16 LCD is a versatile display module capable of showing text and graphics in a 2-row by 16-character format. Its negative RGB backlight allows for a wide range of color customization, making it suitable for various applications such as user interfaces, status displays, and simple animations in hobbyist projects or professional devices.
Pin Number | Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | VCC | Power supply (4.5V to 5.5V) |
3 | VO | Contrast adjustment |
4 | RS | Register Select (High for data, Low for command) |
5 | R/W | Read/Write (High for read, Low for write) |
6 | E | Enable signal |
7-14 | D0-D7 | 8-bit data bus |
15 | LED+ | Anode for RGB backlight (connect to 5V through resistor) |
16 | LED- | Cathode for RGB backlight (connect to GND) |
#include <LiquidCrystal.h>
// Initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// Set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Hello, World!");
}
void loop() {
// Set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// Print the number of seconds since reset:
lcd.print(millis() / 1000);
}
Q: Can I use this LCD with a 3.3V system? A: Yes, but ensure that the logic levels are compatible. You may need a logic level converter.
Q: How do I change the backlight color? A: The backlight color can be changed by using PWM signals on the RGB backlight pins. This is not covered in this basic documentation, but Adafruit provides guides on their website.
Q: What is the maximum current draw for the backlight? A: The maximum current draw for the backlight is 120mA. Always use a current-limiting resistor to prevent damage.
Q: Can I display graphics on this LCD? A: Yes, the LCD can display custom characters and simple graphics by defining custom character patterns.