18.11.2014 Views

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Displays<br />

8<br />

Displays<br />

In addition to switches and keypads for user input, most projects also include a display to<br />

let users know what’s going on inside. <strong>The</strong> type of display depends on the kinds of<br />

information you want to show. For simple status indicators, discrete LEDs will do the job.<br />

For numbers, you can use 7-segment displays. And if you need to display text or other<br />

symbols in addition to numbers, character-based LCD modules are a good solution. This<br />

chapter will show how to use each of these in an 8052-BASIC system.<br />

Using LEDs<br />

Discrete, or individual LEDs (light-emitting diodes) are an easy way to indicate status, such<br />

as On, Ready, Mode selected, and so on. <strong>The</strong>y are colorful, eye-catching, and easy to interface<br />

to 5-volt logic. Available colors now include blue as well as red, green, and yellow. Some<br />

individual LED packages can emit red, green, or amber light, depending on the voltages<br />

applied.<br />

Like other diodes, current passes through an LED in one direction only. When a positive<br />

voltage is applied to the anode, current flows and electrons migrate across an energy gap in<br />

the LED, causing it to emit light. <strong>The</strong> size of the energy gap determines the voltage drop<br />

across the LED, as well as the color of light emitted. A tinted case can also vary the color.<br />

<strong>The</strong> <strong>Microcontroller</strong> <strong>Idea</strong> <strong>Book</strong> 125

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!