Giving small devices a bigger visual impact
16 March 2018
Affordably upgrading the UI of a small, MCU-based device can be achieved using skilful management of hardware resources and software design. Understanding the interactions between the MCU and TFT-LCD helps achieve an optimal trade-off between factors such as MCU power and performance, and screen resolution and size.
After all, moreover, designers of small devices (such as remote controls, meters, wearables and appliance displays) are under pressure to keep costs down, while setting the bar higher in terms of performance and features. Colourful, fast-moving graphics can help upgrade the user experience (UX), but the options could be limited if the system is hosted on a low-cost or low-power microcontroller (MCU).
While displaying information on a dot-matrix or segment display is relatively straightforward, a TFT-LCD requires more intensive commands and pixel data, to display images accurately and in the correct position. The more sharp, dynamic and vibrant the desired UI (user interface), the greater the demands placed on the display interface, system memory and MCU CPU.
The display interface
Typical TFT-LCD communication protocols tend to be simple I²C, SPI, or 8080 interfaces that are natively supported or can be easily implemented on many types of MCUs. To connect with these types of interfaces, the display integrates suitable controller and driver chips. Higher resolution (or larger) displays may have an RGB interface, or a more sophisticated parallel
LVDS or serial MIPI-DSI interface. Although some high-end MCUs now provide a DSI port (expressly to satisfy demands for more sophisticated displays with MCU-based products), RGB displays are typically the largest and most sophisticated units suitable for use with an MCU.
Buffer size and frame rate
In addition, the display resolution and colour gamut influence both the number of pixels per frame and the number of bits per pixel; these must each be considered in relation to the MCU’s on-chip RAM available for frame buffering and the maximum possible frame-refresh rate.
Managing a frame buffer can be unfamiliar territory for developers more accustomed to basic dot-matrix or segment displays, which usually only require a few bytes of data to run the display. Depending on the required colour depth, a frame buffer of a few hundred kilobytes – or more for a high-resolution display – will be needed. This could exceed the on-chip RAM density of some MCUs.
Another factor to consider is that even more RAM may be needed – depending on the frame size in relation to interface speed – to prevent unwanted visible effects such as tearing. This can occur if new data starts writing to the frame buffer before the current data has been fully read out.
Table 1 shows the frame buffer sizes for common TFT displays, in relation to resolution and colour depth. If the MCU has insufficient on-chip RAM, then an external RAM would be required, which increases both complexity and BOM cost. The MCU may also need to provide a high speed interface and controller for the off-chip memory.
Of course, the number of bits per frame includes not only the bits per pixel data, but additional bits associated with horizontal and vertical syncs and front-porch/back-porch. These need to be considered in relation to the available frame-buffer RAM and the frame-refresh rate. A high frame rate is desirable, to ensure smooth, fluid animation, but may be limited by the speed of the MCU and the type of interface.
Overall, the desire to add a large, high-resolution display, with rich colours and smooth, responsive animations, on a low-cost, low-power MCU-based embedded system, is tempered by typical MCU limitations – namely on the type of interface that can be supported, the maximum bus speed and the available frame-buffer RAM.
Typical MCU-to-display interfaces are I²C/SPI, 8080 or RGB, and only a small number of high-end MCUs can support LVDS or MIPI-DSI interfaces. This can restrict the choice of displays that are suitable for direct connection to an MCU and may preclude the use of more sophisticated, high-resolution units.
Limited on-chip RAM can restrict the maximum frame size and effectively place a limit on display resolution and colour depth. The MCU CPU frequency and I/O clock speeds can restrict the interface bandwidth and hence the frame rate, depending on the number of bits per frame. By understanding the nature of these limitations, the MCU’s capabilities can be assessed to make an informed decision about the type of display to select and the graphical design (including colours and animations).
The resolution, frame rate and colour depth can all be optimised to achieve a solution that satisfies the priorities of the application: if the product marketing strategy calls for a particularly colourful UI, or exciting animations, the colour depth and frame rate could be boosted if a smaller display or lower resolution are acceptable. If the colour depth could be reduced without adversely affecting the UX, a higher resolution display could be chosen.
If the MCU simply cannot deliver the visual performance required, with the chosen display, several other options could be considered. Upgrading to a higher specification MCU could give access to larger RAM or allow higher bus speeds. Choosing an MCU with an LVDS or DSI interface can broaden the choice to more sophisticated high-end TFT-LCDs.
Contact Details and Archive...