Global Sources
EE Times-India
Stay in touch with EE Times India
EE Times-India > Memory/Storage

Designing a humble UI

Posted: 13 Oct 2015     Print Version  Bookmark and Share

Keywords:embedded systems  LED indicator  graphical display  RAM  RTOS 

There is a better way: flash the LED at a modest rate (a "heartbeat") normally, but faster to indicate that a problem has been detected. One way to do this is to make the LED flash task a little more sophisticated so that it performs the functions of a "watchdog". In this example, the task sets a bank of 8 event flags each to 1. It is expected that other, critical tasks, check and clear down these flags regularly. If the watchdog task observes that an event flag has not been cleared down, it sounds the alarm—i.e. starts flashing the LED faster. Here is the basic logic:


I am sure that this code could be optimised, but hopefully it illustrates the idea, which is that, broadly, a humble LED can be used to convey quite a lot of information. Here, just two flash rates are used, but more sophistication is possible.

More indications

The range of possible indications using a single LED may be expanded in several ways:

 • More than two flash rates could be used. Maybe slow for a "heartbeat", faster flash for a non-critical problem and very fast for something more serious. It is unlikely that a human observer could usefully differentiate between more than three flash rates.
 • The duty cycle can be varied. Normally the LED would be on and off for equal periods of time (a 50% duty cycle), but a short on time followed by a long off time (and vice versa) is another possibility, thus:

 • The LED may be pulsed several times and then turned off for a period. The number of pulses could signify specific statuses or error conditions. Perhaps the greater the number of flashes the more severe the error. The waveform looks like this:

 • The limit of complexity with flashing a single LED is probably to employ flashes of differing duration – maybe just short and long flashes. This approach can actually reduce documentation, because a well-known, international communications standard can be used: Morse Code. A few letters may be flashed in order to describe a wide range of statuses or error conditions. Here is an example that reports a serious problem:

 • Some LEDs support multiple colour displays. These are interfaced with two bits (3 colours) or three bits (7 colours). The difference between a green heartbeat and a fast flashing red LED would be hard for any operator to ignore.
 • If more than a single LED is available, the possibilities are extended further. In an ideal world, if there are multiple LEDs available, they might be labelled (on the board or control panel) with their meaning. However, this takes away some of the possible software flexibility.

Although an LED is no substitute for a graphical display, which can communicate in very user-friendly terms, the possibilities available as a simple diagnostic indicator are quite extensive, just requiring a little imagination.

About the author
Colin Walls has over thirty years experience in the electronics industry, largely dedicated to embedded software. A frequent presenter at conferences and seminars and author of numerous technical articles and two books on embedded software, Colin is an embedded software technologist with Mentor Embedded (the Mentor Graphics Embedded Software Division), and is based in the UK.

 First Page Previous Page 1 • 2

Comment on "Designing a humble UI"
*  You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.


Go to top             Connect on Facebook      Follow us on Twitter      Follow us on Orkut

Back to Top