Page 158 - Programming Microcontrollers in C
P. 158
Coding Tips for Microcontrollers 143
A firmware monitor is placed on the evaluation board. A serial
port is added, and the board, under the control of the monitor,
communicates with a host computer. As a matter of fact, the host
need only be a terminal in the most basic case. The monitor provides
several important debug and development functions. Code can be
downloaded from the host computer into the memory of the evaluation
board. The monitor contains a single line assembler/disassembler
module. With this software available, the user can examine the code
in the microcontroller memory in either hexadecimal or mnemonic
form. Also, memory contents can be changed in either hexadecimal
or mnemonic form. Breakpoints can be inserted into the code, and
the operation of the program can be observed from the terminal of
the host computer.
In addition to the evaluation capability of these boards, they also
each have extension headers that allow the board to be plugged into
a target system. When operated in this manner, the target system
operates as if it has a programmed microcontroller in its socket. Of
course, the code in the microcontroller is that in the memory on the
evaluation module. The emulation of the microcontroller in this case
is excellent. The microcontroller on board the evaluation module is
executing the code for the target system. The microcontroller re
sources used in the target system are those found on board the
microcontroller in the evaluation module. In most cases, the lines
connected to the target system are connected directly to either the
evaluation module microcontroller or PRU. The PRU is designed to
emulate the pin operation of the microcontroller as well as possible.
Therefore, the loads presented to the target system by the emulator
and the signal responses of these pins very nearly duplicate those of
the microprocessor being emulated.
Figures 3-2 and 3-3 are photographs of the MC68HC05EVM
and the MC68HC05EVS, respectively. Note that Figure 3-2 shows a
single-board system while Figure 3-3 shows a two-board device. All
of the development devices discussed here require an external power
supply. Any device suffixed “EVM” needs a +5 volt supply as well
as +12 and -12 volt sources. The higher voltage supplies are needed
only to drive the RS232 communications signals necessary to com
municate with the host computer. On the EVS and the
MC68HC16EVB boards, only a +5 volt supply is needed. Most of
the components being emulated by these boards can have some on