FEATURE DISPLAYS
GIVE SMALL DEVICES A BIGGER VISUAL IMPACT D
Upgrading the user interface of a small, microcontroller-based device can be achieved cost-effectively, says Christian Madella, senior development engineer, andersDX
esigners of small devices are under pressure to keep costs down while
setting the bar higher in terms of performance and features. Colourful, fast- moving graphics could help upgrade the user experience, but the options could be limited if the system is hosted on a low- cost or low-power microcontroller (MCU). Understanding the interactions between the MCU and TFT-LCD can help engineers achieve an optimal trade-off between factors such as MCU power and performance, screen resolution and size, refresh rate, colour depth and BOM cost.
HARDWARE CONSIDERATIONS 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 sharper, more dynamic and vibrant the desired user interface, the greater the demands placed on the display interface, system memory and microcontroller CPU.
THE DISPLAY INTERFACE Typical TFT-LCD interfaces tend to range from a simple I²C, SPI or 8080 interface 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 units suitable for use with an MCU.
BUFFER SIZE AND FRAME RATE In addition, the display resolution and colour gamut influence the number of pixels per frame and the number of bits per pixel, which must 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 used to working with basic dot-matrix or segment displays. 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.
30 MARCH 2018 | INSTRUMENTATION
Engineers can achieve an optimal trade-off between factors such as MCU power and performance, screen resolution and size, refresh rate, colour depth and BOM cost
Another factor to consider is that even
more RAM may be needed 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.
DESIGNERS’ CHOICES 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 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 hence place a limit on display resolution and colour depth. The microcontroller 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 user interface, 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 user experience, 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. If upgrading the MCU is not an option,
a bridge chip may be inserted between the MCU and the display to translate data from the serial I²C/SPI bus into RGB signals. The bridge chip also integrates frame-buffer RAM, thereby relieving demands on the MCU bus speed and on-chip RAM to give extra freedom to select the display resolution, colour depth and frame rate. Alternatively, a more sophisticated graphics controller chip provides most of the capabilities of a dedicated GPU in a single external device that can communicate with the MCU via I2
C/SPI
and connect to almost any type of display including those with LVDS or MIPI-DSI inputs thereby allowing the widest possible choice of displays. Taking it one step further, if space
Table 1. Frame buffer sizes for TFT displays
limitations prevent the use of an external bridge IC or graphics controller, or if an existing board is to be used without redesign, a smart display can be
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34 |
Page 35 |
Page 36 |
Page 37 |
Page 38 |
Page 39 |
Page 40 |
Page 41 |
Page 42 |
Page 43 |
Page 44 |
Page 45 |
Page 46 |
Page 47 |
Page 48 |
Page 49 |
Page 50 |
Page 51 |
Page 52