AVR-Based Serial Enabled LCDs Hookup Guide

Contributors: QCPete
Favorited Favorite 9

Hardware Overview


The AVR-based SerLCD has some new features that make it even more powerful and economical:

  • AVR microcontroller utilizes 11.0592 MHz crystal for greater communication accuracy
    • Adjustable baud rates of 1200, 2400, 4800, 9600 (default), 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600, 1000000
  • The AVR ATmega328P (with Arduino-compatible bootloader) is populated on the back of each LCD screen and handles all of the LCD control
  • 3 communication options
    • Serial UART, I2C and SPI
  • Adjustable I2C address controlled via software special commands ****(0x72 default)****
  • Emergency reset to factory settings (Jumper RX to GND on bootup)
  • Operational backspace character
  • Incoming buffer stores up to 80 characters
  • Pulse width modulation of backlight allows direct control of backlight brightness and current consumption
  • Pulse width modulation of contrast allows for software defined contrast amount. The previous backpack versions of this product required adjusting the contrast via a hardware trim-pot which was less precise and less accessible in most enclosed projects.
  • User definable splash screen
  • Open-sourced firmware and Arduino-compatible bootloader enables updates via the Arduino IDE

AVR-Based Serial Controller (3.3V Logic Only)

Using these screens, it is easy to connect to any microcontroller that has a serial UART, I2C, or SPI. You could also use a single board computer such as the Raspberry Pi if you wanted. Whatever you choose, please make sure you convert to 3.3V Logic! In our examples below, we chose to use our RedBoard with a Logic Level Converter.

Logic level converter between the 5V RedBoard and the 3.3V LCD Screen

Example setup including 5V Redboard and Logic Level Converter

Connection Options

Both sizes of these screens (16x2 and 20x4) have a row of headers along the top side. This is where you can connect power and your choice of communication protocol (Serial UART, I2C, or SPI). It also has our 6-pin Arduino Serial port available for convenient firmware updates.

Power, I2C, SPI, and Serial pins are highlighted

Main header pinouts

Note, if you choose Serial UART, there is a handy 3-pin JST footprint. This includes the minimum connections needed: RX, GND and VIN. Our JST Jumper 3 Wire Assembly is a good way to go:

Location on screen JST Jumper 3 Wire Assembly

Input Voltage (VDD) and Logic Levels

All of these screens can be powered by 3.3-9V. You have two pin options for connecting up power. One is labeled "RAW" and the other (on the 3-pin JST) is labeled "3.3-9V". Note, the pin labeled "+" is NOT a power input pin! This is connected to the VCC of the ATmega329P (3.3V).

VIn and 3.3V input

Power Input pin options and ATmega328 VCC pin

Pro tip: If you plan to run 100% brightness on all three colors (red, green, blue), then it would be best to keep your power input voltage low. As close to 3.3V as possible is best. This will keep the on-board linear 3.3V voltage regulator nice and cool. It can accept up to 9V and power all three backlights at 100%, but it will get a little warm, and over years of use, potentially damage the vreg. For more information about vregs and why they heat up sometimes, please check out our tutorial: Power and Thermal Dissipation

Contrast Control

The on-board ATmega328P controls the contrast of the screen using a PWM signal. This can be adjusted by sending a command via Serial UART, I2C, or SPI. The screens ship out with the contrast setting set to 10, which we have found works well for most environments. Temperature and supply voltage can affect the contrast of the LCD, so you may need to adjust it accordingly. For more info about contrast and a detailed example, please see the section below called: Serial UART: Example Code - Contrast Control with a Trimpot.