Page 169 - Programming Microcontrollers in C
P. 169
154 Chapter 4 Small 8-Bit Systems
Most microcontroller applications require more program memory
space than RAM space. The smallest microcontroller usually has about
512 bytes of ROM, while the largest can contain as much as 32,000
bytes (32 kilobytes, or 32k) or more. Sometimes, the programmer
will find it desirable to have a small amount of ROM that can be
accessed from the computer base page. To meet these requirements,
the microcontroller designers will place a few bytes of ROM in the
base page memory map.
Erasable Programmable Read-Only Memory (EPROM)
EPROM is a form of programmable memory that permits the
programmer to change the program contents and, if necessary, re
turn and change it later after testing. As the name implies, it is possible
to reprogram EPROM. First, this memory must be erased. The eras
ing procedure involves allowing ultraviolet light to fall upon the
memory area of the die. This high-energy light removes stored charge
that is placed on each memory gate during programming.
EPROM programming requires that a higher than normal volt
age be applied to the chip, and the code be systematically placed in
each memory location. The procedure is slow because the code must
be left in place for several milliseconds for each memory location
stored. Often, a separate programmer board is used to transfer code
from an EPROM to the microcomputer EPROM. These program
ming boards can program as many as one to eight parts at a time.
EPROM requires a larger silicon die area than the corresponding
amount of ROM. Therefore, it is somewhat more expensive. Also,
the window package that allows the EPROM to be erased is expen
sive. This additional expense makes it impractical to use normal
EPROM for production volumes. The window package EPROM de
vices are excellent for development purposes, though. The modestly
higher cost of these devices is not a serious impediment to their use
in development programs.
The economics of production sets the smallest production vol
ume for a masked ROM microcontroller at about one to five thousand
units. An alternative to the use of masked ROM at smaller levels of
production is called the one-time programmable (OTP) chip. These
devices use the standard EPROM technology for their program memo
ries. They are programmed in the same manner as EPROM chips.