Page 29 - Embedded Microprocessor Systems Real World Design
P. 29
you give up the flexibility and programmability of having the design in firmware,
at least as far as hardware costs go.
ln-Circuit Programming
This is not a consideration for every design, but you sometimes need the capabil-
ity to program the parts in-circuit-to perform field upgrades of the firmware, for
instance. This can be a powerful feature, but the capability (or the lack of it) can
affect which processor you choose. To use in-circuit programming, you must have
a processor with the program stored in flash memory. You need a way to erase and
program the memory without removing the device from the board.
I once developed a system that needed incircuit programming. The microcon-
troller I wanted to use was available in an EPROM version, which must be erased
using UV light. I needed to program the parts without taking them off the boards.
There was a flash version of the microcontroller that could be erased and repro-
grammed incircuit, but it ran at only half the speed of the part I wanted to use.
Another version was available with flash memory and was capable of running at the
right speed, but it had additional, unneeded features that tripled the cost of the
part. I had to compromise on cost or performance or give up incircuit program-
ming. Check this carefully if you need that capability.
Nonvolatile Storage
Sometimes your application requires internal nonvolatile storage. If you are build-
ing a television, you might want to remember what channel the set was on last, even
if power is removed. For this, you will need some kind of nonvolatile storage that
can be written and read by the processor. Many microcontrollers, such as the PIC
and Atmel ATSOS series, include a small amount of EEPROM on-chip.
Memory Architecture
Microprocessor memory architectures are divided into two broad camps: von
Neumann and Harvard. The von Neumann architecture permits data and code to
be intermixed. You can put a data table in PROM with the code, and you can move
code to RAM and execute it there. If the code is in RAM, it can modify itself by
writing to the code area of RAM.
The Harvard architecture has separate code and data areas. Code executes from
PROM (usually), data comes from a separate RAM, and you cannot get data from
the code space. Most microprocessors that use the Harvard architecture actually
use a modified Harvard architecture in which the code and data areas are separate,
but a limited ability exists to get data from the code area. This allows tables or other
information to be compiled into the code for use at runtime. This usually is
14 Embedded Micr@rocessw Systems