Programming The Serial Port; Configuring The Serial Port Pins; Programming The Control Register - Intel 8XC196MC User Manual

Table of Contents

Advertisement

8XC196MC, MD, MH USER'S MANUAL
7.4

PROGRAMMING THE SERIAL PORT

To use the SIO port, you must configure the port pins to serve as special-function signals and set
up the SIO channels.
7.4.1

Configuring the Serial Port Pins

Before you can use the serial port, you must configure the associated port pins to serve as special-
function signals. Table 7-1 on page 7-2 lists the pins associated with the serial port. Table 7-2 on
page 7-2 lists the port configuration registers, and Chapter 6, "I/O Ports," explains how to con-
figure the pins.
7.4.2

Programming the Control Register

The SPx_CON register (Figure 7-6) selects the communication mode and enables or disables the
receiver, parity checking, and nine-bit data transmissions. Selecting a new mode resets the serial
I/O port and aborts any transmission or reception in progress on the channel.
SP x _CON
x = 0–1 (8XC196MH)
The serial port control (SP x _CON) register selects the communications mode and enables or disables
the receiver, parity checking, and nine-bit data transmission.
7
8XC196MH
M2
Bit
Bit
Number
Mnemonic
7
M2
6
DIR
5
PAR
4
TB8
Figure 7-6. Serial Port Control (SP x _CON) Register
7-10
DIR
PAR
TB8
See description for bits 0 and 1.
Synchronous Clock Direction
This bit determines the direction of the clock during synchronous mode.
0 = output
1 = input
Parity Selection Bit
This bit selects even or odd parity.
0 = even parity
1 = odd parity
Transmit Ninth Data Bit
This is the ninth data bit that will be transmitted in mode 2 or 3. This bit is
cleared after each transmission, so it must be set before SBUF x _TX is
written. When parity is enabled (SP x _CON.2 = 1), this bit takes on the
even parity value.
Get other manuals https://www.bkmanuals.com
Address:
Reset State:
REN
PEN
M1
Function
1F83H, 1F8BH
00H
0
M0

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents