Feature
Hidden insight: graphics displays
With growing device complexity, embedded-system designers are turning to graphics to differentiate their products and cope with the inevitable field changes.
By Warren Webb, Technical Editor -- EDN, 10/28/2004
|
Graphics displays are already prominent in high-volume consumer products, such as cell phones and PDAs, yet too many embedded-system users are still struggling with a confusing array of dedicated switches and numeric indicators to operate their systems. Much of the increasing complexity is due to normal product evolution, as designers respond to technological changes and consumer demand for more functions. The lowly television remote control, for example, started out with a few buttons for power, channel, and volume but has now grown to a foot-long behemoth with as many as 50 pushbuttons to provide built-in support for an array of set-top boxes and audio/video accessories. Along with a host of other benefits, a graphics display offers relief from this creeping complexity by hiding auxiliary features until you need them.
A graphics display allows users to simulate almost any front-panel configuration and still retain the ability to add or change some features with simply a firmware modification. In fact, a well-designed embedded device with a GUI (graphical user interface) may survive many product changes and updates without hardware modifications. Designers can use graphics to create a unique look and feel for their products and deliver a similar theme across an entire product line. With similar displays common on consumer devices and PCs, new users are comfortable with graphical interfaces, which they find unintimidating. You can also use graphics to reduce operator- and maintenance-training costs with built-in instructions, contextual help, schematics, diagrams, and troubleshooting charts.
Product design is always a compromise between first to market and the best set of features. A flexible graphics interface, along with a built-in network connection, offers the option of shipping the product with an initial set of features and then upgrading firmware over the network to meet competitive pressures or to fix problems. Another marketing strategy is to offer a limited-function device at a low price and then offer to sell users optional, remotely activated features or services. Either approach requires a well-designed, general-purpose hardware platform with an adaptable graphics unit and sufficient system resources to accommodate future software applications.
Regardless of the benefits of a GUI, integrating one into an embedded product is a major undertaking that affects the development and recurring-cost models. A task that once required an 8-bit processor may need a second CPU or an upgrade to 16 or 32 bits when you consider graphics. A graphics subsystem also consumes substantial memory and mass-storage resources. Combining graphics processing with a legacy embedded-system task may also require the addition of an RTOS to maintain timing performance. You also need a new mechanical packaging design to house and protect the somewhat-fragile display unit.
Some vendors today are also incorporating multiple microprocessors and DSPs into their graphics devices and other equipment, according to Ken Klask, president and co-founder of Amulet Technologies. "We are seeing everything from professional-audio equipment with more than 20 DSPs down to the lowly washing machine with only a couple of dedicated microcontrollers. In each case, adding a pretty face to these products was as easy as adding another processor to the mix—a GUI coprocessor dedicated to the single task of bridging between man and the other machine-specific microprocessors," he says.
Graphics optionsYou can consider several design alternatives when integrating a graphics subsystem into an embedded device. The most comprehensive approach is to redesign the device with a new processor section that can support both the embedded-system task and the graphics elements. The software team can then develop a custom graphics library that it optimizes for the embedded-system application. Although this method probably requires extensive nonrecurring engineering, it should produce the most efficient system with the least expensive production hardware. Another approach is to treat the graphics section as a stand-alone peripheral with a communications channel to the embedded processor. This technique allows developers to choose off-the-shelf graphics elements or buy a complete drop-in graphics board with software.
LCD screens are the most popular graphics-output devices for embedded systems because of their low power requirements, reduced weight, and custom configurations. LCDs comprise cells of a light-polarizing liquid sandwiched between two perpendicularly polarized glass panels. An electric current changes the polarization characteristics of the liquid and blocks light transmission though that cell. Expanding on this basic principle, manufacturers offer an array of high-resolution monochrome and color LCD panels to fit most embedded-system applications. Many designers combine an LCD panel with a resistive touchscreen or several variable-function input switches to form the complete user interface.
Software plays a big part of any graphical-display system and has the potential to consume much of the development budget. To conserve funds and shorten the development schedule, many designers look to third-party, off-the-shelf software packages to draw common graphics elements. Simple drawing libraries include subroutines to render lines, circles, boxes, and a limited selection of text-type styles. These basic drawing packages generally have no memory, so you cannot change an attribute such as color or line width without redrawing the object. The next step up is an object-oriented graphics library that includes a built-in set of widgets that maintain their programmed state. Pushbuttons, sliders, gauges, graphs, and drop-down menus are typical graphics objects. If you make a change to one or more objects on the screen, library routines will automatically redraw them. The third level of software is the graphics manager, such as Microsoft Windows or X Windows, in which individual applications can independently control their portions of the display screen. Obviously, the complexity and software footprint grow depending on the library model you select.
The PEG (Portable Embedded GUI) library and development-tool set from Swell Software targets embedded-system applications. The library provides all of the GUI control, indicators, and other objects you need to build custom graphics, including windows, toolbars, menus, dials, bars, dialogue and status boxes, button charts, lights, and scales (Figure 1). A minimum PEG footprint occupies 50 kbytes of code space and 6 kbytes of temporary memory, and a typical full-featured graphical interface requires 100 kbytes of code space and 12 kbytes of dynamic memory. PEG interacts directly with display and input hardware for maximum performance and supports popular RTOS target processors, video controllers, and I/O devices. Swell bases the package on an event-driven programming model familiar to Windows developers and includes the complete C++ source code. The PEG development-tool set also includes WindowBuilder for creating custom windows and dialogs, FontCapture for capturing TrueType fonts and BDFs (bit-map-distribution fonts) or developing your own fonts, and ImageConvert to transform bit-map, GIF, and JPEG images into compressed format. PEG is available directly from Swell Software or with third-party development tools. For example, Enea Embedded Technology offers a royalty-free project license for PEG at $7995 to support its OSE RTOS.
Library artMetrowerks also offers a library of C++ source code and functions, PowerParts, to generate graphics primitives, such as lines, rectangles, bit maps, circles, ovals, arcs, text, and regions of arbitrary shape (Figure 2). The hardware-independent PowerParts graphics system supports 32-bit color, double-buffered drawing, and LCD-screen rotation. It draws an image by manipulating a frame buffer in memory while video hardware and firmware transfer the image to the display device. The PowerParts library footprint varies from 50 to 500 kbytes of code, depending on the features you use. The library supports ARM, PowerPC, DragonBall, MIPS, Hitachi SH, and Intel x86 microprocessor architectures. PowerParts also supports multiple operating systems, including Linux, MacOS, Windows, the Motorola PPSM (Personal Portable Systems Manager), and Japan's ITRON (Industrial Real-time Operating System Nucleus).
Several vendors offer complete evaluation platforms that combine the LCD screen, display controller, graphics library, and touchscreen to minimize the development effort. To assess the ease of operation and possible project savings, EDN evaluated off-the-shelf graphical-interface units from Reach Technology, Earth LCD, and Amulet Technology. These units allow you to add graphics to a device with a simple serial interface. Each kit delivers unique size, resolution, and performance specifications to fit a range of embedded projects.
Reach Technology offers several development kits that provide graphical interfaces for embedded systems using QVGA-resolution (320×240-pixel) or smaller LCD panels (Figure 3). Reach bases all of these kits on the 3×4.5-in. Reach SLCD (serial-LCD)-controller card, and kits require no special operating system or library on the host processor. Supporting both 3.3 and 5V displays, the SLCD controller allows you to access a graphics LCD as an intelligent serial device. It writes text and graphics images to the display by issuing one of more than 50 high-level commands. A built-in touch interface allows you to define graphic buttons on screen that return a serial string when you push them. The SLCD microprocessor code includes a graphics library, text fonts, predefined bit maps, and a command interpreter. You can download user-defined bit maps to the SLCD flash memory via the serial port. The board has connectors for multiple LCD types, including passive, active, monochrome, or color displays.
Reach Technology sent two versions of its SLCD-evaluation kits for this project. The first, the Kyocera TFT (thin-film-transistor) kit includes the SLCD-controller board; a Kyocera 5.7-in., transmissive, color LCD with a built-in resistive touchpanel; a dc-to-ac backlight-inverter module; a power- and communications-interface module; a 12V, 1A, dc power source; and several interconnecting cables. Although Reach supplied detailed connection instructions, including pictures, we failed to seat a high-voltage connector and were rewarded with smoke and a bright flash. Luckily, the circuitry was tough enough to survive our misdeed, and the kit functioned properly thereafter. Reach anticipated these concerns because it also sent along a preassembled version of its kit in a rugged NEMA-4 metal enclosure. The preassembled version came with a Hitachi STN (super-twisted-nematic) touchscreen LCD. Although both LCDs would be acceptable for many embedded-system applications, the Kyocera panel is significantly brighter and exhibits a wider viewing angle. Both units arrived with a demonstration program that runs automatically on power-up to exercise the display and the touchscreen. You can use the HyperTerminal communications program in Microsoft Windows to send commands to the controller board from a standard PC. The Reach Technology evaluation kits range from $295 to $575 depending on LCD-screen and enclosure options.
Kits, kits, kitsGraphical LCD-controller kits save months of development time and produce a better product, according to Jonathan More, president and co-founder of Reach Technologies. "Developing an intuitive interface requires trial and test cycles. What looks good on paper can turn out to be clumsy and confusing. Using a kit, a functional interface can be developed in days, giving time to test, tweak, and get it right," he says.
EarthLCD delivered two products for evaluation. Its ezLCD-001-EDK evaluation kit features a Sony 2.7-in. 240×160-pixel TFT Color LCD, a built-in Earth LCD controller card, and an interface board for external USB and serial ports (Figure 4). The LCD controller includes SPI and I2C serial interfaces and 20 discrete inputs and outputs. The controller's internal dc/dc converter accepts a supply-voltage range of 3 to 7V dc that a USB port or an external power supply can provide. You can drive the ezLCD-001-EDK with a limited set of drawing, text, and system instructions, including download the bit map, set the color, select a font, draw a line, draw a circle, draw a point, and set the baud rate. The controller module features 96 kbytes of flash and 4 kbytes of EEPROM for custom fonts and graphics. The ezLCD-001-EDK currently lacks a touchpanel interface. The evaluation kit comes with a PC-based demonstration program that allows you to issue commands or download bit maps over the serial port. The ezLCD-001-EDK sells for $199 (one).
EarthLCD also offers the MDK-002 mARMalade ARM 720 development kit powered by Sharp's 32-bit ARM720T RISC color LCD controller and including a 7.8-in. Panasonic flat-panel color-STN touchscreen LCD. The mARMalade also includes compact-flash and smart-media memory slots; 4 Mbytes of flash; 16 Mbytes of SDRAM; and parallel, serial, Ethernet, and IR ports. The MDK-002 comes with embedded Linux and a VGA 640×480-pixel color touchscreen LCD, targeting applications such as electronic picture frames, digital visual messaging, home automation, and industrial controls. We had some trouble assembling the components of the development kit, but, after a quick call to the factory and correcting an upside-down cable, we were able to run the demonstration slide show. The MKD-002 includes no graphics library, and, even though the Panasonic LCD includes a touchpanel, the demo software does not use it. The company suggests that users join the Yahoo mARMalade user's group for the latest patches, drivers, and support. You can purchase the MDK-002 for $399 at the vendor's Web site.
For applications requiring monochrome screens, Amulet Technologies' Easy GUI Starter Kit provides a well-integrated, 5.7-in. quarter-VGA display panel along with an attached controller board. Amulet bases its products on a proprietary IC containing a graphics library, a dedicated microprocessor, and an LCD controller. You create a graphical image with a standard text editor using a special set of HTML tags in the same fashion as you would create an Internet Web page. The starter kit includes a compiler for converting HTML pages, fonts, and bit-map graphics into a compressed format suitable for uploading to the controller. The kit comes with a series of pages that demonstrate the graphics and touchpanel capabilities of the unit and also provide instructions for operating the compiler software. The graphics software includes a full complement of widgets, such as check boxes, sliders, bar graphs, radio buttons, and gauges (Figure 5). The Amulet starter kit was easy to set up and included the most comprehensive demonstration software of all the evaluation units. The Easy GUI Starter Kit costs $399 and is available now. You can also purchase the Amulet LCD for integration into your product for $125 each in high production volumes.
With all of the advantages of a graphical interface, many deeply embedded products are too cost-sensitive to justify the extra development and recurring costs needed for an integral LCD and touchpanel. In these cases, you can create a remote graphical interface using a general-purpose device, such as a PC, PDA, or cell phone. A short-range communications link, such as Bluetooth, 802.11, infrared, or even a hard-wired connection, enables graphical interaction with less development effort and minimal hardware cost. With an Internet connection, you can also create a GUI that you can access from any browser worldwide.
No matter which approach you take, a GUI can often transform a cluttered and confusing embedded device into a simpler, streamlined product with easy-to-update features. Although these graphical interfaces traditionally present complex hardware and software problems, falling hardware costs, new off-the-shelf evaluation platforms, and growing graphics libraries promise to intensify interest in GUI development for embedded devices.
You can reach Technical Editor Warren Webb at 1-858-513-3713, fax 1-858-486-3646, e-mail wwebb@edn.com.
| For more information... | ||
| For more information on products such as those discussed in this article, contact any of the following manufacturers directly, and please let them know you read about their products in EDN. | ||
| Amulet Technologies www.amulettechnologies.com |
ARM www.arm.com |
EarthLCD www.earthlcd.com |
| Enea Embedded Technology www.ose.com |
Intel www.intel.com |
Hitachi www.hitachi.com |
| Kyocera www.kyocera.com |
MetroWerks www.metrowerks.com |
Microsoft www.microsoft.com |
| MIPS Technologies www.mips.com |
Panasonic www.panasonic.com |
Reach Technology www.reachtech.com |
| Sharp Microelectronics www.sharpsma.com |
Sony www.sony.net |
Swell Software www.swellsoftware.com |


