Serial vs Parallel Interface
LCDs, TFTs, and OLEDs can offer both serial and parallel modes. A multi-interface LCD board is designed to display information on the LCD using different parallel or serial protocol interfaces. Only one protocol will write to the LCD at a time. Some controller IC's have more than one user-selectable interface option. No matter which protocol is being used to interface to the LCD, it must be initialized prior to normal use. There are two ways of transmitting a byte between two digital devices. We can either transmit the byte in PARALLEL or we can transmit the byte in SERIAL form.
This drawing illustrates the differences between these two types of communication mechanisms. In parallel mode, each bit has a single wire devoted to it and all the bits are transmitted at the same time. In serial mode, the bits are transmitted as a series of pulses.
Serial Interface (One bit at a time)
Serial interface consists of an I2C bus, SPI bus, or synchronous serial control and data lines. The biggest advantage of the serial interface displays is they use fewer pins. You save connection pins, board traces and I/O pins. Although a downside is that you usually can't read from the display in serial mode, only write. Also, it's normally slower in serial interface than writing in parallel.
Serial Interface Types
- Synchronous Serial - Serial Data In, Register Select, Reset, & Serial Clock
- Custom - Various configurations - may include Chip Select
- SPI (Serial Peripheral Interface)
- SPI (3 wire) uses Serial Data Out, Serial Data In, and Serial Clock
- SPI (4 wire) adds Chip Select
How Serial Displays Work
Serial LCD modules have three unique interfaces selectable by soldering jumpers onto the back of the display's PCB. These displays also have an on-board PIC microprocessor that initializes the LCD on power up and translates RS232, SPI or I2C protocol into standard parallel HD44780 protocol. All standard LCD commands are available in each interface protocol.
Like any traditional character LCD, text is displayed on the screen by sending each character's ASCII value to the display's controller. With the addition of the on-board interface translator IC, not only does it eliminate the need for an additional board or logic device, it also allows for easy adjustment of the LCD's contrast and backlight brightness through use of software commands.
Serial Interfaces
LCD serial displays feature 3 unique selectable interfaces:
- RS232
-
5V TLL non-inverted
-
300-115.2K baud rate (9600 default)
-
- I2C
-
100KHz max clock rate
-
Definable bus address (0x50 default)
-
Pull-up resistors are built-in
-
- SPI
-
100KHz max clock rate
-
High level idle clock, active low slave select
-
Parallel Interface (multiple bits at a time)
Parallel interface consists of 8 data pins and 3 control lines. The control lines used are Enable (E), Register Select (RS), and Read/Write (R/W). RS is used to signal when a command or data is being sent to the display. Enable tells the display that the data or instruction in the register is ready to be interpreted by the display. The Read/Write tells the display whether to write data or read data from the register. 4-bit parallel interface works exactly like the standard 8-bit interface, only each byte of data sent or received is clocked into the display one nibble at a time. After every two clock cycles, the entire byte is combined and executed like an 8-bit command.
In addition to the following common interface connection examples, some displays may include additional control lines.
- V0 - Contrast Adjustment
- CS - Chip Select
- BUSY - Typically a low state indicates busy state
Parallel Interface Types
- 16 Bit Data - Not Common - used on some TFT controllers
- 8 Bit Data - Most Common - used on graphic and character controllers
- 4 Bit Data - A common option on character controllers
- 8080 type - Parallel Data with Write Line and Read Line
- 6800 type - Parallel Data, with Read/Write Line and Enable Line
SPI Interface
SPI interface operates in full duplex mode, meaning that the devices can communicate with one another simultaneously. For this to work, two data lines are required. With this standard, devices communicate in a master/slave mode, where the master device (host processor) initiates the data and the clock. The LCD/OLED display is the peripheral slave device(s) attached to the data bus. Multiple peripherals are addressed on the same serial data bus. But keep in mind, the display will only listen to the data it sees when the Chip Select line is active (usually low). If the Chip Select line is inactive (usually High), the display listens to the data on the bus, but ignores it. During this state, the SDO line isn't active.
Timing and Operation May Differ From Usual SPI
- I2C uses Serial Data Line and Serial Clock
- LCD controller has certain usable I2C bus addresses
- Requires pull-up resistors
- May not function correctly with other devices on same bus