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.

Inputs and Outputs<br />

6<br />

Inputs and Outputs<br />

So far, our BASIC-52 circuit consists of the 8052-BASIC microcontroller, RAM, nonvolatile<br />

memory for permanent program storage, and a serial interface to a host computer. Now<br />

it’s time to add inputs and output interfaces that enable the system to monitor and control<br />

devices outside of these circuits. <strong>The</strong> options include low-cost buffers and latches, as well<br />

as programmable chips with features like individual bit control, automatic generation of<br />

control signals, and the ability to configure a port as input, output, or bidirectional.<br />

<strong>The</strong> Memory Map<br />

But before we start adding components, it’s time to draw a memory map for the system.<br />

<strong>The</strong> memory map is a diagram that shows the range of addresses a microcontroller or other<br />

computer can access, along with each component that the computer reads or writes to and<br />

the addresses where each component resides. <strong>The</strong> components may be memory chips like<br />

RAM or EPROM, or they may be other components that the computer accesses by specifying<br />

an address. Drawing a memory map helps to ensure that each component has a unique<br />

address or range of addresses.<br />

Figure 6-1 shows the memory map for our design. Each 64K area of external memory<br />

consists of eight 8K blocks. Remember that 8 kilobytes equals 8192 in decimal, but 2000<br />

in hexadecimal.<br />

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

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

Saved successfully!

Ooh no, something went wrong!