Asynchronous Mode Programming - Intel 80C188EC User Manual

Hide thumbs Also See for 80C188EC:
Table of Contents

Advertisement

Due to internal synchronization requirements, the maximum input frequency to BCLK is one-half
the CPU operating frequency. See "BCLK Pin Timings" on page 11-18 for more information. Ta-
ble 11-1 shows the correct BxCMP values for common baud rates.
Table 11-1. BxCMP Values for Typical Baud Rates and CPU Frequencies
Baud
Rate
BxCMP
Value
19,200
80A2H
9,600
8145H
4,800
828AH
2,400
8515H
1,200
8A2BH
A zero or one value for BxCMP is illegal and results in unpredictable
operation. Programming BxCMP during a transmission or reception causes
indeterminate operation.

11.2.2 Asynchronous Mode Programming

The serial port operation is controlled by two registers. The Serial Port Control (SxCON) Register
controls the mode of operation of the serial port (see Figure 11-13). The Serial Port Status
(SxSTS) Register acts as the flags register, reporting on errors and the state of the RX and TX
machines (see Figure 11-14). Depending on the serial port mode, these registers can have differ-
ent functionality. This section outlines how to use SxCON and SxSTS to obtain the desired op-
eration from the serial port.
11.2.2.1
Modes 1, 3 and 4 for Stand-alone Serial Communications
When using these modes for their respective seven, eight or nine bit data modes, operation is fair-
ly straightforward. The serial port must be initialized correctly (through SxCON), then SxSTS
needs to be interpreted.
To configure the serial port, first program the baud rate through the BxCMP register, then pro-
gram SxCON (Figure 11-13 on page 11-15) as follows.
1.
Determine the values for M2:0 for the desired serial port mode.
2.
If parity is used, enable it with the PEN bit. Set the sense of parity (even or odd) with the
EVN bit. Note that parity is not available in Mode 4 (seven bit data).
CPU Frequency
25 MHz
20 MHz
%
BxCMP
Error
Value
–0.14
8081H
–0.14
8103H
0.00
8208H
0.00
8411H
0.00
8822H
NOTE
SERIAL COMMUNICATIONS UNIT
16 MHz
%
BxCMP
%
Error
Value
Error
0.16
8067H
0.16
0.16
80CFH
0.16
–0.03
81A0H
–0.08
–0.03
8340H
0.04
0.01
8682H
–0.02
8 MHz
BxCMP
%
Value
Error
8033H
0.16
8067H
0.16
80CFH
0.16
81A0H
–0.08
8340H
0.04
11-13

Advertisement

Table of Contents
loading

This manual is also suitable for:

80c186ec

Table of Contents