Philips Semiconductors Product data sheet
SC28L91
3.3 V or 5.0 V Universal Asynchronous
Receiver/Transmitter (UART)
2004 Oct 21
19
in the status register is set whenever one or more characters are
available to be read, and a FFULL status bit is set if all 8 or 16 stack
positions are filled with data. Either of these bits can be selected to
cause an interrupt. A read of the RxFIFO outputs the data at the top
of the FIFO. After the read cycle, the data FIFO and its associated
status bits (see below) are ‘popped’ thus emptying a FIFO position
for new data.
A disabled receiver with data in its FIFO may generate an interrupt
(see “Receiver Status Bits”, below). Its status bits remain active and
its watchdog, if enabled, will continue to operate.
Receiver Status Bits
In addition to the data word, three status bits (parity error, framing
error, and received break) are also appended to the data character
in the FIFO. The overrun error, MR1[5], and the change of break
(ISR[2]) are not FIFOed.
The status of the Rx FIFO may be provided in two ways, as
programmed by the error mode control bit in the mode register
(MR1[5]). 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’ from the command register was issued. In either mode
reading the SR does not affect the FIFO. The FIFO is ‘popped’ only
when the RxFIFO is read. Therefore the status register should be
read prior to reading the FIFO.
If the FIFO is full when a new character is received, that character is
held in the receive shift register until a FIFO position is available. If
an additional character is received while this state exits, the
contents of the FIFO are not affected; the character previously in the
shift register is lost and the overrun error status bit (SR[4]) will be
set-upon receipt of the start bit of the new (overrunning) 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 (set low)
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.
If the receiver is disabled, the FIFO characters can be read.
However, no additional characters can be received until the receiver
is enabled again. If the receiver is reset, the FIFO and all of the
receiver status, and the corresponding output ports and interrupt are
reset. No additional characters can be received until the receiver is
enabled again.
Receiver Reset and Disable
Receiver disable stops the receiver immediately—data being
assembled in 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 date, 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.
Watchdog
A ‘watchdog timer’ is associated with the receiver. Its interrupt is
enabled by MR0[7]. The purpose of this timer is to alert the control
processor that characters are in the RxFIFO which have not been
read. This situation may occur at the end of a transmission when the
last few characters received are not sufficient to cause an interrupt.
This counter times out after 64 bit times. It is reset each time a
character is transferred from the receiver shift register to the
RxFIFO or a read of the RxFIFO is executed.
Receiver Time-out Mode
In addition to the watch dog timer described in the receiver section,
the counter/timer may be used for a similar function. Its 16-bit
programmability allows much greater precision of time out intervals.
The time-out mode uses the received data stream to control the
counter. Each time a received character is transferred from the shift
register to the RxFIFO, the counter is restarted. If a new character is
not received before the counter reaches zero count, the counter
ready bit is set, and an interrupt can be generated. This mode can
be used to indicate when data has been left in the RxFIFO for more
than the programmed time limit. Otherwise, if the receiver has been
programmed to interrupt the CPU when the receive FIFO is full, and
the message ends before the FIFO is full, the CPU may not know
there is data left in the FIFO. The CTU and CTL value would be
programmed for just over one character time, so that the CPU would
be interrupted as soon as it has stopped receiving continuous data.
This mode can also be used to indicate when the serial line has
been marking for longer than the programmed time limit. In this
case, the CPU has read all of the characters from the FIFO, but the
last character received has started the count. If there is no new data
during the programmed time interval, the counter ready bit will get
set, and an interrupt can be generated.
The time-out mode is enabled by writing the appropriate command
to the command register. Writing an 0xAn to CR will invoke the
time-out mode for that channel. Writing a ‘Cx’ to CR will disable the
time-out mode. The time-out mode should only be used by one
channel at once, since it uses the C/T. CTU and CTL must be
loaded with a value greater than the normal receive character
period. The time-out mode disables the regular START/STOP
Counter commands and puts the C/T into counter mode under the
control of the received data stream. Each time a received character
is transferred from the shift register to the RxFIFO, the C/T is
stopped after 1 C/T clock, reloaded with the value in CTU and CTL
and then restarted on the next C/T clock. If the C/T is allowed to end
the count before a new character has been received, the counter
ready bit, ISR[3], will be set. If IMR[3] is set, this will generate an
interrupt. Receiving a character after the C/T has timed out will clear
the counter ready bit, ISR[3], and the interrupt. Invoking the ‘Set
Time-out Mode On’ command, CRx = ‘Ax’, will also clear the counter
ready bit and stop the counter until the next character is received.
Watchdog and Time Out Mode Differences
The watchdog timer is restarted each time a character is read from
or written to the Rx FIFO. It is an indicator that data is in the FIFO
that has not been read. If the Rx FIFO is empty no action occurs. In
the time out mode the C/T is stopped and restarted each time a
character is written to the Rx FIFO. From this point of view the time
out of the C/T is an indication that the data stream has stopped.
After the time out mode is invoked the timer will not start until the
first character is written to the Rx FIFO.
Time Out Mode Caution
When operating in the special time out mode, it is possible to
generate what appears to be a “false interrupt”, i.e. an interrupt
without a cause. This may result when a time-out interrupt occurs
and then, BEFORE the interrupt is serviced, another character is
received, i.e., the data stream has started again. (The interrupt
Philips Semiconductors Product data sheet
SC28L91
3.3 V or 5.0 V Universal Asynchronous
Receiver/Transmitter (UART)
2004 Oct 21
20
latency is longer than the pause in the data stream.) In this case,
when a new character has been received, the counter/timer will be
restarted by the receiver, thereby withdrawing its interrupt. If, at this
time, the interrupt service begins for the previously seen interrupt, a
read of the ISR will show the “Counter Ready” bit not set. If nothing
else is interrupting, this read of the ISR will return a x’00 character.
Multi-drop Mode (9-bit or Wake-Up)
The UART is equipped with a wake up mode for multi-drop
applications. This mode is selected by programming bits MR1[4:3]or
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 station(s) whose receiver(s) that are
normally disabled, examine the received data stream and ‘wakeup’
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, and 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. 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 into the TxFIFO.
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 into the TxFIFO.
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 into the RxFIFO if the
received A/D bit is a one (address tag), but discards the received
character if the received A/D bit is a zero (data tag). If enabled, all
received characters are transferred to the CPU via the RxFIFO. In
either case, the data bits are loaded into the data FIFO while the
A/D bit is loaded into 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.
PROGRAMMING
The operation of the UART is programmed by writing control words
into the appropriate registers. Operational feedback is provided via
status registers which can be read by the CPU. The addressing of
the registers is described in Table 1.
The contents of certain control registers are initialized to zero on
RESET. 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. In general, the contents of the MR, the CSR, and the
OPCR should only be changed while the receiver(s) and
transmitter(s) are not enabled, and certain changes to the ACR
should only be made while the C/T is stopped.
The channel has 3 mode registers (MR0, 1, 2) which control the
basic configuration of the channel. Access to these registers is
controlled by independent MR address pointers. These pointers are
set to 0 or 1 by MR control commands in the command register
“Miscellaneous Commands”. Each time the MR registers are
accessed the MR pointer increments, stopping at MR2. It remains
pointing to MR2 until set to 0 or 1 via the miscellaneous commands
of the command register. The pointer is set to 1 on reset for
compatibility with previous Philips Semiconductors UART software.
Refer to Table 2 for register bit descriptions. The reserved registers
at addresses 0x02 and 0x0A should never be read during normal
operation since they are reserved for internal diagnostics.
Table 1. SC28L91 register addressing
Address Bits
A[3:0]
READ (RDN = 0) WRITE (WRN = 0)
0 0 0 0 Mode Register(MR0, MR1, MR2) Mode Register(MR0, MR1, MR2)
0 0 0 1 Status Register(SR) Clock Select Register(CSR)
0 0 1 0 Reserved Command Register(CR)
0 0 1 1 Rx Holding Register(RxFIFO) Tx Holding Register(RxFIFO)
0 1 0 0 Input Port Change Register (IPCR) Aux. Control Register (ACR)
0 1 0 1 Interrupt Status Register (ISR) Interrupt Mask Register (IMR)
0 1 1 0 Counter/Timer Upper (CTU) C/T Upper Preset Register (CTPU)
0 1 1 1 Counter/Timer Lower (CTL) C/T Lower Preset Register (CTPL)
1 1 0 0 Interrupt vector (68K mode), Misc. register in Intel mode Interrupt vector (68K mode), Misc. register in Intel mode
1 1 0 0 IVR Motorola mode, Misc. register (Intel mode) IVR Motorola mode, Misc. register (Intel mode)
1 1 0 1 Input Port (IPR) Output Port Configuration Register (OPCR)
1 1 1 0 Start Counter Command Set Output Port Bits Command (SOPR)
1 1 1 1 Stop Counter Command Reset output Port Bits Command (ROPR)
NOTE:
1. The three MR registers are accessed via the MR Pointer and Commands 0x1n and 0xBn (where n = represents receiver and transmitter enable bits)
Philips Semiconductors Product data sheet
SC28L91
3.3 V or 5.0 V Universal Asynchronous
Receiver/Transmitter (UART)
2004 Oct 21
21
Register Acronyms and Read / Write Capability
(R/W = Read/Write, R = Read only, W = Write only)
Mode Register MRn R/W
Status Register SR R
Clock Select CSR W
Command Register CR W
Receiver FIFO RxFIFO R
Transmitter FIFO RxFIFO W
Input Port Change Register IPCR R
Auxiliary Control Register ACR W
Interrupt Status Register ISR R
Interrupt Mask Register IMR W
Counter Timer Upper Value CTU R
Counter Timer Lower Value CTL R
Counter Timer Preset Upper CTPU W
Counter Timer Preset Lower CTPL W
Input Port Register IPR R
Output Configuration Register OPCR W
Set Output Port Bits W
Reset Output Port Bits W
Interrupt vector or GP register IVR/GP R/W
Table 2. Condensed Register bit formats
Name
Adr Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
MR0 0 WATCH
DOG
RxINT BIT 2 TxINT [1:0] FIFO SIZE BAUD RATE
EXTENDED
II
TEST 2 BAUD RATE
EXTENDED 1
MR1 0 RxRTS
Control
RxINT BIT 1 Error Mode Parity Mode Parity Type Bits per Character
MR2 0 Channel Mode TxRTS
Control
CTSN Enable
Tx
Stop Bit Length
CSR 1 Receiver Clock, Select Code Transmitter Clock select code,
SR 1 Received
Break
Framing
Error
Parity Error Overrun Error TxEMT TxRDY RxFULL RxRDY
CR 2 Channel Command codes Disable Tx Enable Tx Disable Rx Enable Rx
RxFIFO 3 Read 8 bits from Rx FIFO
TxFIFO 3 Write 8 bits to Tx FIFO
IPCR 4 Delta IP3 Delta IP2 Delta IP1 Delta IP0 State of IP3 State of IP2 State of IP1 State of IP0
ACR 4 Baud Group Counter Timer mode and clock select Enable IP3 Enable IP2 Enable IP1 Enable IP0
ISR 5 Change
Input Port
Ignore in ISR Reads Counter
Ready
Change
Break
RxRDY TxRDY
IMR 5 Change
Input Port
Set to 0 Set to 0 Set to 0 Counter
Ready
Change
Break
RxRDY TxRDY
CTU 6 Read 8 MSb of the BRG Timer divisor.
CTPU 6 Write 8 MSb of the BRG Timer divisor.
CTL 7 Read 8 LSb of the BRG Timer divisor.
CTPL 7 Write 8 LSb of the BRG Timer divisor.
IPR D State of IP State of IP 6 State of IP 5 State of IP 4 State of IP 3 State of IP 2 State of IP1 State of IP 0
OPCR D Configure
OP7
Configure
OP6
Configure
OP5
Configure
OP4
Configure OP3 Configure OP2
Strt C/T E Read Address E to start Counter Timer
SOPR E Set OP 7 Set OP 6 Set OP 5 Set OP 4 Set OP 3 Set OP 2 Set OP 1 Set OP 0
Stp C/T F Read Address F to stop counter Timer
ROPR F Reset OP 7 Reset OP 6 Reset OP 5 Reset OP 4 Reset OP 3 Reset OP 2 Reset OP 1 Reset OP 0

SC28L91A1A,518

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