In this article, firmware changes for compatible graphic display controllers will be discussed. When deciding on a replacement graphic LCD the engineer must account for any firmware changes if the new display uses a different controller. Many graphic controller chips for monochrome displays are fundamentally compatible with each other. Minimal changes to firmware can be achieved if a display with a compatible controller is selected.
Figure 1: Focus LCDs G12864A1-FTW-LW63 Graphic LCD
Graphic LCDs come in many sizes, but the more common sizes include 128 x 32 and 128 x 64 pixels. These displays typically come with a controller designed to drive up to 132 x 64 pixels. This information can be found in the controller datasheet.
Included in the datasheet is the table of commands, which is how the display is configured and controlled. In the display above, the controller for the G12864A-FTW-LW63 is the NT7534 and the table of commands can be found on page 41, table 16. When looking at a display with a different controller, besides the electrical and optical characteristics, the command set can inform the engineer if the firmware will be reusable.
Figure 2: G12864A-FTW-LW63 with NT7534 Display Controller
The microcontroller firmware developed for a 128 x 32 pixel display with the ST7565 controller was reused in a couple of examples here. The command sets for the NT7534 and ST7565 are the same. This allowed driving the G12864A-FTW-LW63 with the ST7565 firmware. There were a few code changes to get the display to operate correctly. The changes are shown in the code below:
As shown, these minor changes for Bias and Contrast were all that was necessary for the same code to be used with a different display. In most instances, the only adjustment required would be the contrast level.