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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 8<br />

segments tall. (<strong>The</strong> HD44780 can also control matrices that are 11 segments tall, for better<br />

display of characters with descenders, like g, p, and q.)<br />

<strong>The</strong> module forms characters by turning on the appropriate segments in a character position.<br />

For example, to display an L, the module turns on one vertical column and one horizontal<br />

row of segments. For most characters, the bottom row is reserved for displaying a cursor,<br />

which leaves 35 segments to form the character.<br />

Displays are available in several sizes. Popular sizes are 1 x 16 (1 line of 16 characters), 2<br />

x 16, and 2 x 20. Displays larger than 80 characters require supplemental driver chips along<br />

with the HD44780, but the displays can use the same interface.<br />

Table 8-1 summarizes the signals in the 14-line interface.<br />

Power Supplies and Backlights<br />

<strong>The</strong> power supply (pin 2) is a simple +5V DC. <strong>The</strong> modules contain their own oscillators<br />

to drive the LCD segments. Typical power consumption for an entire module is just a couple<br />

of milliamperes. A contrast input (pin 3) allows you to adjust for best viewing under varying<br />

light conditions, viewing angles, and temperatures.<br />

Some LCD modules use backlighting to allow viewing in dim light. A module may be<br />

reflective (which does not use backlighting), transmissive (which must use backlighting),<br />

or transflective (which may use backlighting or not). With a transflective display, you can<br />

add a switch to enable users to turn the backlighting on or off as desired.<br />

One popular type of backlight is an electroluminescence (EL) panel behind the LCD<br />

segments. An EL panel emits a diffuse light that provides a bright background for the LCDs.<br />

Electroluminescent backlighting requires first of all, a module that contains an EL panel,<br />

and second, an inverter module to provide the high-voltage alternating signal required to<br />

power the panel. <strong>The</strong> inverters typically convert +5 volts to around 100 volts RMS at 400<br />

Hertz. Inverters are usually offered along with the modules that use them, so you shouldn’t<br />

have to construct your own. <strong>The</strong> backlighting requires several milliamperes.<br />

Incandescent and LED backlights are other options for illuminating LCDs.<br />

Inside the Display Controller<br />

<strong>The</strong> HD44780 LCD controller is actually a small, specialized microcontroller in itself. It<br />

contains its own RAM and ROM, and executes the 11 instructions shown in Table 8-2. <strong>The</strong><br />

instructions perform tasks like clearing the display, writing a character to the display,<br />

selecting a position on the display, and reading information from the display. To use the<br />

controller, you need to be familiar with what it contains and the instructions that control it.<br />

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

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

Saved successfully!

Ooh no, something went wrong!