Command Interpreter; I/O Routines - Motorola M68HC11EVBU User Manual

Universal evaluation board
Hide thumbs Also See for M68HC11EVBU:
Table of Contents

Advertisement

MONITOR PROGRAM
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 to accumulator A. If no character is received, a logic zero (0) is returned to accumulator
A. This routine does not wait for a character to be received before returning (that function is
performed by the INCHAR utility subroutine).
The OUTPUT routine takes the ASCII character in accumulator A and writes the character to the
specified I/O port. This routine waits until the character begins transmitting before returning.
3-2
M68HC11EVBU/D

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

M68hc11evbdM68hc11evbu/d

Table of Contents