
80C196KB USER’S GUIDE
10.2 Serial Port Interrupts
The serial port generates one of three possible inter-
rupts: Transmit Interrupt TI(2030H), Receive Inter-
rupt RI(2032H) and SERIAL(200CH). When the RI
bit gets set an interrupt is generated through either
200CH or 2032H depending on which interrupt is en-
abled. INTÐMASK1.1 controls the serial port receive
interrupt through location 2032H and INTÐMASK.6
controls serial port interrupts through location 200CH.
The 8096BH shared the TI and RI interrupts on the
SERIAL interrupt vector. On the 80C196KB, these in-
terrupts share both the serial interrupt vector and have
their own interrupt vectors.
When the TI bit is set it can cause an interrupt through
the vectors at locations 200CH or 2030. Interrupt
through location 2030 is determined by INTÐ
MASK1.0. Interrupts through the serial interrupt is
controlled by the same bit as the RI interrupt(INTÐ
MASK.6). The user should not mask off the serial port
interrupt when using the double-buffered feature of the
transmitter, as it could cause a missed count in the
number of bytes being transmitted.
10.3 Serial Port Modes
MODE 0
Mode 0 is a synchronous mode which is commonly
used for shift register based I/O expansion. In this
mode the TXD pin outputs a set of 8 pulses while the
RXD pin either transmits or receives data. Data is
transferred 8 bits at a time with the LSB first. A dia-
gram of the relative timing of these signals is shown in
Figure 10-2. Note that this is the only mode which uses
RXD as an output.
Mode 0 Timings
In Mode 0, the TXD pin sends out a clock train, while
the RXD pin transmits or receives the data. Figure 10-
2 shows the waveforms and timing.
In this mode the serial port expands the I/O capability
of the 80C196KB by simply adding shift registers. A
schematic of a typical circuit is shown in Figure 10-3.
This circuit inverts the data coming in, so it must be
reinverted in software.
MODE 1
Mode 1 is the standard asynchronous communications
mode. The data frame used in this mode is shown in
Figure 10-4. It consists of 10 bits; a start bit (0), 8 data
bits (LSB first), and a stop bit (1). If parity is enabled
by setting SPCON.2, an even parity bit is sent instead
of the 8th data bit and parity is checked on reception.
270651 – 28
Figure 10-2. Mode 0 Timing
49
数控原理与维修
http://www.agreenleaf.cn
Содержание 80C196KB Series
Страница 1: ...November 1990 80C196KB User s Guide Order Number 270651 003 http www agreenleaf cn...
Страница 59: ...80C196KB USER S GUIDE Figure 11 7 Ideal A D Characteristic 270651 37 55 http www agreenleaf cn...
Страница 60: ...80C196KB USER S GUIDE Figure 11 8 Actual and Ideal Characteristics 270651 38 56 http www agreenleaf cn...
Страница 61: ...80C196KB USER S GUIDE Figure 11 9 Terminal Based Characteristic 270651 39 57 http www agreenleaf cn...
Страница 70: ...80C196KB USER S GUIDE Figure 13 5 Reset Sequence 80C196KB Reset Sequence 270651 45 66 http www agreenleaf cn...
Страница 83: ...80C196KB USER S GUIDE 270651 80 Figure 15 14 AC Timing Diagrams 79 http www agreenleaf cn...
Страница 84: ...80C196KB USER S GUIDE 270651 81 270651 84 Figure 15 14 AC Timing Diagrams Continued 80 http www agreenleaf cn...