Philips Semiconductors Product data sheet
SCC2691Universal asynchronous receiver/transmitter (UART)
2006 Aug 04
7
BLOCK DIAGRAM
As shown in the block diagram, the UART consists of: data bus buffer,
interrupt control, operation control, timing, receiver and transmitter.
Data Bus Buffer
The data bus buffer provides the interface between the external and
internal data busses. It is controlled by the operation control block to
allow read and write operations to take place between the controlling
CPU and UART.
Interrupt Control
A single interrupt output (INTRN) is provided which may be asserted
upon occurrence of any of the following internal events:
Transmit holding register ready
Transmit shift register empty
Receive holding register ready or FIFO full
Change in break received status
Counter reached terminal count
Change in MPI input
Assertion of MPI input
Associated with the interrupt system are the interrupt mask register
(IMR) and the interrupt status register (ISR). The IMR can be
programmed to select only certain of the above conditions to cause
INTRN to be asserted. The ISR can be read by the CPU to
determine all currently active interrupting conditions. However, the
bits of the ISR are not masked by the IMR.
Operation Control
The operation control logic receives operation commands from the
CPU and generates appropriate signals to internal sections to
control device operation. It contains address decoding and read and
write circuits to permit communications with the microprocessor via
the data bus buffer. The functions performed by the CPU read and
write operations are shown in Table 1.
Table 1. Register Addressing
A2 A1 A0
READ
(RDN = 0)
WRITE
(WRN = 0)
0 0 0 MR1, MR2 MR1, MR2
0 0 1 SR CSR
0 1 0 BRG Test CR
0 1 1 RHR THR
1 0 0 1X/16X Test ACR
1 0 1 ISR IMR
1 1 0 CTU CTUR
1 1 1 CTL CTLR
NOTE;
*Reserved registers should never be read during operation since
they are reserved for internal diagnostics.
ACR = Auxiliary control register
CR = Command register
CSR = Clock select register
CTL = Counter/timer lower output register
CTLR = Counter/timer lower preset register
CTU = Counter/timer upper output register
CTUR = Counter/timer upper preset register
MR = Mode register A
SR = Status register
THR = Tx holding register
* See Table 6 for BRG Test frequencies in this data sheet, and
“Extended baud rates for SCN2681, SCN68681, SCC2691,
SCC2692, SCC68681 and SCC2698B”
Philips Semiconductors ICs
for Data Communications, IC-19, 1994.
Mode registers 1 and 2 are accessed via an auxiliary pointer. The
pointer is set to MR1 by RESET or by issuing a reset pointer
command via the command register. Any read or write of the mode
register while the pointer is at MR1 switches the pointer to MR2. the
pointer then remains at MR2 so that subsequent accesses are to
MR2, unless the pointer is reset to MR1 as described above.
Timing Circuits
The timing block consists of a crystal oscillator, a baud rate
generator, a programmable 16-bit counter/timer, and two clock
selectors.
The crystal oscillator operates directly from a 3.6864MHz crystal
connected across the X1/ CLK and X2 inputs with a minimum of
external components. If an external clock of the appropriate
frequency is available, it may be connected to X1/CLK. If an external
clock is used instead of a crystal, X1/CLK is driven using a
configuration similar to the one in Figure 7. In this case, the input
high-voltage must be capable of attaining the voltage specified in the
DC Electrical Characteristics. The clock serves as the basic timing
reference for the baud rate generator (BRG), the counter/timer, and
other internal circuits. A clock frequency, within the limits specified in
the electrical specifications, must be supplied if the internal BRG is
not used.
The baud rate generator operates from the oscillator or external
clock input and is capable of generating 18 commonly used data
communications baud rates ranging from 50 to 38.4K baud. Thirteen
of these are available simultaneously for use by the receiver and
transmitter. Eight are fixed, and one of two sets of five can be
selected by programming ACR[7]. The clock outputs from the BRG
are at 16X the actual baud rate. The counter/timer can be used as a
timer to produce a 16X clock for any other baud rate by counting
down the crystal clock or an external clock. The clock selectors
allow the independent selection by the receiver and transmitter of
any of these baud rates or an external timing signal.
Counter/Timer (C/T)
The C/T operation is programmed by ACR[6:4]. One of eight timing
sources can be used as the input to the C/T. The output of the C/T is
available to the clock selectors and can be programmed by
ACR[2:0} to be output on the MPO pin.
In the timer mode, the C/T generates a square wave whose period is
twice the number of clock periods loaded into the C/T upper and
lower registers. The counter ready bit in the ISR is set once each
cycle of the square wave. If the value in CTUR or CTLR is changed,
the current half-period will not be affected, but subsequent
half-periods will be affected. In this mode the C/T runs continuously
and does not recognize the stop counter command (the command
only resets the counter ready bit in the ISR). Receipt of a start C/T
command causes the counter to terminate the current timing cycle
and to begin a new cycle using the values in CTUR and CTLR.
In the counter mode, the C/T counts down the number of pulses
loaded into CTUR and CTLR. Counting begins upon receipt of a
start C/T command. Upon reaching terminal count, the counter
ready bit in the ISR is set. The counter continues counting past the
terminal count until stopped by the CPU. If MPO is programmed to
be the output of the C/T, the output remains high until terminal count
is reached, at which time it goes low. The output returns to the high
state and the counter ready bit is cleared when the counter is
stopped by a stop counter command. the CPU may change the
Philips Semiconductors Product data sheet
SCC2691Universal asynchronous receiver/transmitter (UART)
2006 Aug 04
8
values of CTUR and CTLR at any time, but the new count becomes
effective only on the next start counter command following a stop
counter command. If new values have not been loaded, the previous
count values are preserved and used for the next count cycle.
In the counter mode, the current value of the upper and lower eight
bits of the counter may be read by the CPU. It is recommended that
the counter be stopped when reading to prevent potential problems
which may occur if a carry from the lower eight bits to the upper
eight bits occurs between the times that both halves of the counter
are read. However, a subsequent start counter command causes
the counter to begin a new count cycle using the values in CTUR
and CTLR. See further description in CTUR/CTLR section.
Receiver and Transmitter
The UART is a full-duplex asynchronous receiver/transmitter. The
operating frequency for the receiver and transmitter can be selected
independently from the baud rate generator, the counter/timer, or
from an external input. Registers associated with the
communications channel are: the mode registers (MR1 and MR2),
the clock select register (CSR), the command register (CR), the
status register (SR), the transmit holding register (THR), and the
receive holding register (RHR).
Transmitter
The transmitter accepts parallel data from the CPU and converts it
to a serial bit stream on the TxD output pin. It automatically sends a
start bit followed by the programmed number of data bits, an
optional parity bit, and the programmed number of stop bits. The
least significant bit is sent first. Following the transmission of the
stop bits, if a new character is not available in the THR, the TxD
output remains high and the TxEMT bit in the SR will be set to 1.
Transmission resumes and the TxEMT bit is cleared when the CPU
loads a new character in the THR. In the 16X clock mode, this also
resynchronizes the internal 1X transmitter clock so that transmission
of the new character begins with minimum delay.
The transmitter can be forced to send a break (continuous low
condition) by issuing a start break command via the CR. The break
is terminated by a stop break command.
If the transmitter is disabled, it continues operating until the
character currently being transmitted and the character in the THR,
if any, are completely sent out. Characters cannot be loaded in the
THR while the transmitter is disabled.
Receiver
The receiver accepts serial data on the RxD pin, converts the serial
input to parallel format, checks for start bit, stop bit, parity bit (if any),
or break condition, and presents the assembled character to the
CPU. The receiver looks for a high-to-low (mark-to-space) transition
of the start bit on the RxD input pin. If a transition is detected, the
state of the RxD pin is sampled again each 16X clock for 7-1/2
clocks (16X clock mode) or at the next rising edge of the bit time
clock (1X clock mode). If RxD is sampled high, the start bit is invalid
and the search for a valid start bit begins again. If RxD is still low, a
valid start bit is assumed and the receiver continues to sample the
input at one bit time intervals at the theoretical center of the bit, until
the proper number of data bits and the parity bit (if any) have been
assembled, and one sop bit has been detected. The data is then
transferred to the RHR and the RxRDY bit in the SR is set to a 1. If
the character length is less than eight bits, the most significant
unused bits in the RHR are set to zero.
After the stop bit is detected, the receiver will immediately look for
the next start bit. However, if a non-zero character was received
without a stop bit (i.e. framing error) and RxD remains low for
one-half of the bit period after the stop bit was sampled, then the
receiver operates as if a new start bit transition had been detected at
that point(one-half bit time after the stop bit was sampled).
The parity error, framing error and overrun error (if any) are strobed
into the SR at the received character boundary, before the RxRDY
status bit is set.
If a break condition is detected (RxD is low for the entire character
including the stop bit), only one character consisting of all zeros will
be loaded in the FIFO and the received SR break bit is set to 1. The
RxD input must return to high for two (2) clock edges of the X1
crystal clock for the receiver to recognize the end of the break
condition and begin the search for a start bit. This will usually
require a high time of one X1 clock period or 3 X1 edges since
the clock of the controller is not synchronous to the X1 clock.
RECEIVER FIFO
The RHR consists of a first-in-first-out (FIFO) queue with a capacity
of three characters. Data is loaded from the receive shift register
into the top-most empty position of the FIFO. The RxRDY bit in the
status register (SR) is set whenever one or more characters are
available to be read, and a FFULL status bit is set if all three queue
positions are filled with data. Either of these bits can be selected to
cause an interrupt. A read of the RHR outputs the data at the top of
the FIFO. After the read cycle, the data FIFO and its associated
status bits are ‘popped’ thus emptying a FIFO position for new data.
Receiver Status Bits
In addition to the data word, three status bits (parity error, framing
error, and received break) are appended to each data character in
the FIFO. Status can be provided in two ways, as programmed by
the error mode control bit in mode register 1. In the character mode,
status is provided on a character-by-character basis: the status
applies only to the character at the top of the FIFO. In the block
mode, the status provided in the SR for these three bits is the
logical-OR of the status for all characters coming to the top of the
FIFO since the last reset error command was issued. In either
mode, reading the SR does not affect the FIFO. The FIFO is
‘popped’ only when the RHR is read. Therefore, the SR should be
read prior to reading the corresponding data character.
The receiver can control the deactivation of RTS. If programmed to
operate in this mode, the RTSN output will be negated when a valid
start bit was received and the FIFO is full. When a FIFO position
becomes available, the RTSN output will be re-asserted
automatically. This feature can be used to prevent an overrun, in
the receiver, by connecting the RTSN output to the CTSN input of
the transmitting device.
Receiver Reset and Disable
Receiver disable stops the receiver immediately – data being
assembled if the receiver shift register is lost. Data and status in the
FIFO is preserved and may be read. A re-enable of the receiver
after a disable will cause the receiver to begin assembling
characters at the next start bit detected. A receiver reset will discard
the present shift register data, reset the receiver ready bit (RxRDY),
clear the status of the byte at the top of the FIFO and re-align the
FIFO read/write pointers. This has the appearance of “clearing or
flushing” the receiver FIFO. In fact, the FIFO is NEVER cleared!
The data in the FIFO remains valid until overwritten by another
received character. Because of this, erroneous reading or extra
reads of the receiver FIFO will miss-align the FIFO pointers and
result in the reading of previously read data. A receiver reset will
re-align the pointers.
Philips Semiconductors Product data sheet
SCC2691Universal asynchronous receiver/transmitter (UART)
2006 Aug 04
9
In addition to the normal transmitter and receiver operation
described above, the UART incorporates a special mode which
provides automatic wake-up of the receiver through address frame
recognition for multi-processor communications. This mode is
selected by programming bits MR1[4:3] to ‘11’.
In this mode of operation, a ‘master’ station transmits an address
character followed by data characters for the addressed ‘slave’
station. The slave stations, whose receivers are normally disabled,
examine the received data stream and ‘wake-up’ the CPU [by
setting RxRDY) only upon receipt of an address character. The CPU
compares the received address to its station address and enables
the receiver if it wishes to receive the subsequent data characters.
Upon receipt of another address character, the CPU may disable the
receiver to initiate the process again.
A transmitted character consists of a start bit, the programmed
number of data bits, an address/data (A/D) bit, and the programmed
number of stop bits. The polarity of the transmitted A/D bit is
selected by the CPU by programming bit MR1[2]. MR1[2] = 0
transmits a zero in the A/D bit position which identifies the
corresponding data bits as data, while MR1[2] = 1 transmits a one in
the A/D bit position which identifies the corresponding data bits as
an address. The CPU should program the mode register prior to
loading the corresponding data bits in the THR.
While in this mode, the receiver continuously looks at the received
data stream, whether it is enabled or disabled. If disabled, it sets the
RxRDY status bit and loads the character in the RHR FIFO if the
received A/D bit is a one, but discards the received character if the
received A/D bit is a zero. If enabled, all received characters are
then transferred to the CPU via the RHR. In either case, the data
bits are loaded in the data FIFO while the A/D bit is loaded in the
status FIFO position normally used for parity error (SR[5]). Framing
error, overrun error, and break detect operate normally whether or
not the receiver is enabled.
MULTI-PURPOSE INPUT PIN
The MPI pin can be programmed as an input to one of several
UART circuits. The function of the pin is selected by programming
the appropriate control register (MR2[4]), ACR[6:4], CSR [7:4, 3:0]}.
Only one of the functions may be selected at any given time. If CTS
or GPI is selected, a change of state detector provided with the pin
is activated. A high-to-low or low-to-high transition of the inputs
lasting longer than 25–50µs sets the MPI change-of-state bit in the
interrupt status register. The bit is cleared via a command. The
change-of-state can be programmed to generate an interrupt to the
CPU by setting the corresponding bit in the interrupt mask register.
The input port pulse detection circuitry uses a 38.4kHz sampling
clock derived from one of the baud rate generator taps. This
produces a sampling period of slightly more than 25µs (assuming a
3.6864MHz oscillator input). The detection circuitry, in order to
guarantee that a true change in level has occurred, requires two
successive samples at the new logic level be observed. As a
consequence, the minimum duration of the signal change is 25µs if
the transition occurs coincident with the first sample pulse. The 50µs
time refers to the condition where the change of state is just missed
and the first change of state is not detected until after an additional
25µs. The MPI pin has a small pull-up device that will source 1 to
4 mA of current from V
CC
. This pin does not require pull-up devices
or V
CC
connection if it is not used.
MULTI-PURPOSE OUTPUT PIN
This pin can be programmed to serve as a request-to-send output,
the counter/timer output, the output for the 1X or 16X transmitter or
receiver clocks, the TxRDY output or the RxRDY/FFULL output (see
ACR[2:0] – MPO Output Select). Please note that this pin drives
both high and low. HOWEVER when it is programmed to represent
interrupt type functions (such as receiver ready, transmitter ready or
counter/timer ready) it will be switched to an open drain
configuration in which case an external pull-up device would be
required.
REGISTERS
The operation of the UART is programmed by writing control words
in the appropriate registers. Operational feedback is provided via
status registers which can be read by the CPU. Addressing of the
registers is as described in Table 1.
The contents of certain control registers are initialized to zero on
reset (see RESET pin description). Care should be exercised if the
contents of a register are changed during operation, since certain
changes may cause operational problems. For example, changing
the number of bits per character while the transmitter is active may
cause the transmission of an incorrect character. The contents of
the MR, the CSR, and the ACR should only be changed while the
receiver and transmitter are disabled, and certain changes to the
ACR should only be made while the C/T is stopped. The bit formats
of the UART are shown in Table 2.
MR1 – Mode Register 1
MR1 is accessed when the MR pointer points to MR1. The pointer is
set to MR1 by RESET or by a set pointer command applied via the
CR. After reading or writing MR1, the pointers are set at MR2.
MR1[7] – Receiver Request-to-Send Control
The bit controls the deactivation of the RTSN output (MPO) by the
receiver. This output is normally asserted and negated by
commands applied via the command register. MR1[7] = 1 causes
RTSN to be automatically negated upon receipt of a valid start bit if
the receiver FIFO is full. RTSN is reasserted when an empty FIFO
position is available. This feature can be used to prevent overrun in
the receiver by using the RTSN output signal to control the CTS
input of the transmitting device.
MR1[6] – Receiver Interrupt Select
This bit selects either the receiver ready status (RxRDY) or the FIFO
full status (FFULL) to be used for CPU interrupts.
MR1[5] – Error Mode Select
This bit selects the operating mode of the three FIFOed status bits
(FE, PE, received break). In the character mode, status is provided
on a character-by-character basis. The status applies only to the
character at the top of the FIFO. In the block mode, the status
provided in the SR for these bits is the accumulation (logical-OR) of
the status for all characters coming to the top of the FIFO since the
last reset error command was issued.
MR1[4:3] – Parity Mode Select
If with parity or force parity is selected, a parity bit is added to the
transmitted character and the receiver performs a parity check on
incoming data. MR![4:3] = 11 selects the channel to operate in the
special wake-up mode.
MR1[2] – Parity Type Select
This bit selects the parity type (odd or even) if the with parity mode
is programmed by MR1[4:3], and the polarity of the forced parity bit
if the force parity mode is programmed. It has no effect if the no

SCC2691AC1N24,129

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC UART 24-DIP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union