This document presents a method of implementing a segment LCD controller via a software method. This method can be utilized to bring segment LCD capabilities to devices that do not have hardware modules available for controlling segment LCDs. This document explains the software method used in detail; however, details on how segment LCDs operate and the different implementation available are outside the scope of this document.
The software associated with this document can be found under the "Demos" folder for a given MSPM0 MCU in the MSPM0 SDK.
All trademarks are the property of their respective owners.
A glass segment LCD typically has two glass plates joined together with a small gap in between the plates. This gap contains a liquid crystal fluid, which is transparent under normal conditions. However, if an electric field is applied through a voltage differential, the molecules arrange themselves to align with the field direction and a black segment is visible on a clear background. The potential difference is applied to the segment LCD through an alternating, and repeating signal through the segment (SEGy) and common (COMx) lines attached to the display. COMx and SEGy lines are driven in opposite polarity in order to create said voltage differential. The voltage applied between COMx and SEGy lines is typically alternated to limit DC offset levels, thus extending LCD lifetime. Consult the segment LCD’s manufacturer’s specifications for max DC offset allowed.
The optical contrast, or how dark a segment is compared to the background, is controlled by how large of a differential between the RMS voltage of an ON segment, and an OFF segment. Since a repeating signal is used, the frequency of the signal has a visual effect as well. If the frequency used is too slow, then one would perceive a “flickering” of the screen. Faster frequencies do not have this issue, but consume more power. Most segment LCDs have a typical driving frequency between 30 Hz to 200Hz, which is well within the range of a software based solution.
Inside the LCD assembly, the COMx and SEGy lines are arranged in a grid pattern. The COM lines are typically referred to as the back-plane of the LCD. This software solution implements a quadruplex back-plane, which means there are four COMx lines that are driven in sequence. To turn a particular segment on, the particular coordinate is activated by ensuring the associated COMx and SEGy lines are driven opposite of each other, and then alternated as shown in Figure 1-1. To keep a segment off, the appropriate SEGy line is driven in the same pattern as the COMx line that is currently being cycled through.
From an MCU perspective, the appropriate pins need to be driven high, low, or floating in a repeated pattern to display an image or message. An example of one LCD update cycle is shown in Figure 1-1. When a COMx line is active, it is first driven low for an update period, then high the following period. When inactive, the pin is set to floating and thus driven to VDD/2 via the external resistors described in Section 2. To turn a SEGy on, it is driven high, then low over two periods, and follows the same pattern as the COMx signal to keep it off.