Page 54 - Embedded Microprocessor Systems Real World Design
P. 54
directly from the microprocessor. Of course, a l6bit EPROM would connect to all
16 bits of the data bus.
Types of PROM
Three types of memory ordinarily are used as PROMs in embedded systems. The
first of these is the EPROM. An EPROM consists of an array of transistors that can
be programmed. The code to be executed is programmed into the device, and it
is read out by the microprocessor. EPROMs have a quartz window in the top
through which the IC die can be seen. This allows the EPROM to be erased using
ultraviolet light and then reprogrammed.
One special case of EPROMs is OTP (one-time programmable) PROMs. As men-
tioned in Chapter 1, these are EPROMs in a plastic package with the quartz window
missing. They can be programmed once, but because there is no erasure window,
they cannot be erased and reprogrammed. EPROMs and OTP PROMs are pre
grammed using a tool called a PROM programmer. EPROMs and OTP PROMs can
be either part of a singlechip microcontroller IC or general-purpose parts for use
with any multichip microprocessor design.
Another type of memory is flash memory. Flash memory is similar to the EPROM
in that a transistor array is programmed. However, flash memory can be erased
electrically, which means it can be reprogrammed without taking it out of the
microprocessor circuit. Flash memory often is used when the product requires that
the firmware be upgraded in the field. Early flash memories were expensive com-
pared to EPROM, but the pricing is such that nearly all new designs are flash based.
The advantage of flash memory is that it can be programmed incircuit, usually
by the microprocessor that uses it. The programming procedure requires that the
memory first be erased. This can present a problem-if the code to program the
flash memory resides in the flash memory itself, how do you reprogram it? This
was often a real problem for designers using early flash memories. One way to fix
the problem is to move the programming code into RAM and execute it from there.
Another approach is to use a newer block type of flash memory. These devices do
not require that the entire memory be erased, instead permitting the memory to
be erased in blocks. So the programming code can reside in a section of memory
that is not erased, while the operating code resides in another part of memory that
is erased and reprogrammed as needed.
The Atmel AT49FO80 is a 1MB x 8 flash memory with a 16Kboot block. Two versions
are available, one with the boot block at the bottom of the memory (starting at 00000)
and one with the boot block at the top of memory (starting at FCOOO) . Normally, you
would put your initialization code and flash erase/programming code in the boot
block. This allows you to reprogram the rest of the memory to update the firmware.
Hardware Design 1 39