MONITOR PROGRAM
3-2
M68HC11EVB/D
BUFFALO recognizes a carriage return from a port, that port is then used for all subsequent
terminal I/O operations.
3.2.2
Command Interpreter
The next section of BUFFALO 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 control
back to the command interpreter upon completion of the operation.
3.2.3
I/O Routines
The I/O section of BUFFALO consists of a set of supervisor routines, and three sets of driver
routines. The supervisor routines are INIT, INPUT, and OUTPUT. These routines determine
which driver subroutine to call to perform the specific action. Each set of driver routines consists
of an initialization routine, an input routine, and an output routine. One set of drivers is for the
SCI port and these routines are called ONSCI, INSCI, and OUTSCI. The second set of drivers is
for a DUART and these routines are called ONUART, INUART, and OUTUART. The third set
of drivers is for an ACIA and these routines are called ONACIA, INACIA, and OUTACIA.
All I/O communications are controlled by three RAM locations (IODEV, EXTDEV, and
HOSTDEV). EXTDEV specifies the external device type (0=none, 1=ACIA, 2=DUART).
HOSTDEV specifies which I/O port is used for host communications (0=SCI, 1=ACIA,
3=DUARTB). IODEV instructs the supervisor routine which port/driver routine to use (0=SCI,
1=ACIA, 2=DUARTA, 3=DUARTB).
The INIT routines set up a serial transmission format of eight data bits, one stop bit, and no
parity. For the SCI, the baud rate is set to 9600 for an 8 MHz crystal (2 MHz E-clock). A
different baud rate can be achieved by modifying address location $102B (refer to MCU data
sheet, SCI baud rate selection).
The INPUT routine reads from the specified port. If a character is received, the character is
returned in accumulator A. If no character is received a zero (0) is returned in accumulator A.
This routine does not wait for a character to be received before returning (function is performed
by the INCHAR subroutine).
The OUTPUT routine takes the ASCII character in accumulator A and writes to the specified I/O
port. This routine waits until the character is transmitted before returning.
Summary of Contents for M68HC11EVB
Page 9: ...CONTENTS x M68HC11EVB D ...
Page 35: ...MONITOR PROGRAM 3 8 M68HC11EVB D ...
Page 81: ...OPERATING INSTRUCTIONS 4 46 M68HC11EVB D ...
Page 97: ...SUPPORT INFORMATION 6 12 M68HC11EVB D Figure 6 3 EVB Schematic Diagram Sheet 2 of 2 ...
Page 103: ...APPLICATIONS B 2 M68HC11EVB D Figure B 1 Single Chip Mode Configuration ...