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.

Table 8-1. LCD modules containing the HD44780 controller often use this<br />

14-line interface.<br />

Displays<br />

Pin Symbol Input/<br />

Output<br />

Function<br />

1 VSS Input Signal Ground<br />

2 VDD Input Supply Voltage (+5V)<br />

3 V0 Input Contrast adjust<br />

4 RS Input Register select (1=data; 0=instruction<br />

register, busy flag/address counter)<br />

5 R/W Input Read (1)/write (0) select<br />

6 E Input Enable<br />

7 D0 I/O Data bit 0<br />

8 D1 I/O Data bit 1<br />

9 D2 I/O Data bit 2<br />

10 D3 I/O Data bit 3<br />

11 D4 I/O Data bit 4<br />

12 D5 I/O Data bit 5<br />

13 D6 I/O Data bit 6<br />

14 D7 I/O Data bit 7<br />

Memory Areas<br />

<strong>The</strong> HD44780’s on-chip memory includes a CG (character-generator) ROM, CG RAM, DD<br />

(display data) RAM, an instruction register, and a data register.<br />

<strong>The</strong> CG ROM stores the segment patterns for generating 192 different characters, including<br />

the Roman (English) alphabet in upper and lower case, numbers, some math and other<br />

special symbols, and Japanese kana characters. <strong>The</strong>se are fixed in ROM and can’t be altered.<br />

<strong>The</strong> CG RAM stores segment patterns for up to 16 user-designed characters such as logos,<br />

special symbols, or other simple graphics characters that you design on the 5 X 8 matrix.<br />

To create a custom character, you write a series of 5-bit words to the CG RAM. Each word<br />

represents the segment pattern for one row in the desired character. <strong>The</strong> patterns stored in<br />

CG RAM disappear on powering down, so you must reload them on each time you power<br />

up.<br />

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

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

Saved successfully!

Ooh no, something went wrong!