User manual

Monitor12 (MON12) User Manual 05/30/01
3
PROGRAM DESCRIPTION
The monitor program supplied for the EVB is called MON12. This program is
firmware based and communicates via the HC12 Serial Communications Interface
(SCI0) port. User must be aware that the monitor will initialize the hardware to
operate this port and that user programs can override proper operation of the
port to support the monitor. The monitor uses polling methods to determine port
status so interrupt operation with the SCI port would cause an interference with
the monitor.
The monitor program is contained in EPROM (external to the MCU). Having the
monitor program in EPROM external to the MCU at locations $COOO-$FFFF is a great
advantage because it allows the user to add instructions to customize the
monitor for specific requirements.
The main module of the monitor program includes all the parts required by any of
the individual command modules. Therefore the main module is a kernel of the
BUFFALO monitor program, and consists of five parts which are as follows:
a. Initialization
b. Command interpreter
c. I/O routines
d. Utility subroutines
e. Command table
INITIALIZATION
This part of the main module contains all of the reset initialization code. In
this section, internal RAM locations are set up, and the I/O channels for the
terminal is set up. The monitor will adjust the memory map of the HC12 device
for maximum use. The HC12D60 version of the monitor moves the Register space
from the Reset default address of $0000 to $0800 hex and disables the internal
Flash memories. This provides maximum user memory space in external ram memory
for debugging.
COMMAND INTERPRETER
The next section of the main module is the command interpreter. American
Standard Code for Information Interchange (ASCII) characters are read from the
terminal into the input buffer until a carriage return or a slash (/) is
received. The command field is then parsed out of the input buffer and placed
into the command buffer. A table of commands is then searched and if a match is
found, the corresponding command module is called as a subroutine. All commands
return back to the command interpreter upon completion of the operation.