MAX3140EEI Maxim Integrated Products, MAX3140EEI Datasheet - Page 18
![IC UART SPI RS485/422 28-QSOP](/photos/6/61/66154/28-qsop_21-0055_sml.jpg)
MAX3140EEI
Manufacturer Part Number
MAX3140EEI
Description
IC UART SPI RS485/422 28-QSOP
Manufacturer
Maxim Integrated Products
Datasheet
1.MAX3140CEIT.pdf
(36 pages)
Specifications of MAX3140EEI
Features
Transceiver
Fifo's
8 Byte
Protocol
RS232, RS485
Voltage - Supply
4.75 V ~ 5.25 V
With Irda Encoder/decoder
Yes
With False Start Bit Detection
Yes
With Cmos
Yes
Mounting Type
Surface Mount
Package / Case
28-QSOP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MAX3140EEI
Manufacturer:
MAXIM/美信
Quantity:
20 000
Table 1. Bit Descriptions (continued)
SPI/MICROWIRE-Compatible UART with Integrated
True Fail-Safe RS-485/RS-422 Transceivers
The MAX3140 follows the SPI convention of providing a
bidirectional data path for writes and reads. Whenever
the data is written, data is also read back. This speeds
operation over the SPI bus, as required, when operat-
ing at high baud rates. In most high-level languages,
like C, there are commands for writing and reading
stream I/O devices like the console or serial port. In C
specifically, there is a “PUTCHAR” command that
transmits a character and a “GETCHAR” command that
receives a character. Implementing direct write and
read commands in C with no underlying driver code
causes an intended PUTCHAR command to become a
PUTGETCHAR command. These C commands assume
that they’ll receive some form of BIOS-level support.
18
SHDNo
NAME
SHDNi
RA/FE
BIT
TM
TM
ST
ST
TE
T
______________________________________________________________________________________
TYPE
write
write
write
write
read
read
read
read
read
BIT
Notice to High-Level Programmers
STATE
POR
0
0
0
0
0
1
0
0
0
Receiver-Activity/Framing-Error Bit. In shutdown mode, this is the RA bit. In normal operation,
this is the FE bit. In shutdown mode, a transition on RX sets RA = 1. In normal mode, a fram-
ing error sets FE = 1. A framing error occurs if a zero is received when the first stop bit is
expected. FE is set when a framing error occurs, and cleared upon receipt of the next proper-
ly framed character independent of the FIFO being enabled. When the device wakes up, it is
likely that a framing error will occur. This error is cleared with a WRITE CONFIGURATION. The
FE bit is not cleared on a READ DATA operation. When an FE is encountered, the UART
resets itself to the state where it is looking for a start bit.
Software-Shutdown Bit. Enter software shutdown with a WRITE CONFIGURATION where
SHDNi = 1. Software shutdown takes effect after CS goes high, and causes the oscillator to
stop as soon as the transmitter becomes idle. Software shutdown also clears R, T, RA/FE,
D0r–D7r, D0t–D7t, Pr, Pt, and all data in the receive FIFO. RTS and CTS can be read and
updated while in shutdown. Exit software shutdown with a WRITE CONFIGURATION where
SHDNi = 0. The oscillator restarts typically within 50ms of CS going high. RTS and CTS are
unaffected. Refer to the Pin Description for hardware shutdown (SHDN input).
Shutdown Read-Back Bit. The READ CONFIGURATION register outputs SHDNo = 1 when the
UART is in shutdown. Note that this bit is not sent until the current byte in the transmitter is
sent (T = 1). This tells the processor when it may shut down the RS-485/RS-422 driver. This bit
is also set immediately when the device is shut down through the SHDN pin.
Transmit-Stop Bit. One stop bit will be transmitted when ST = 0. Two stop bits will be transmit-
ted when ST = 1. The receiver only requires one stop bit.
Reads the value of the ST bit.
Transmit-Buffer-Empty Flag. T = 1 means that the transmit buffer is empty and ready to
accept another data word.
Transmit-Enable Bit. If TE = 1, then only the RTS pin is updated on CS’s rising edge. The con-
tents of RTS, Pt, and D0t–D7t transmit on CS’s rising edge when TE = 0.
Mask for T Bit. IRQ is asserted if TM = 1 and T = 1 (Table 7).
Reads the value of the TM bit (Table 7).
The proper way to implement these commands is to
use driver code—usually in the form of an assembly
language interrupt service routine and a callable rou-
tine used by high-level routines. This driver handles the
interrupts and manages the receive and transmit
buffers for the MAX3140. When a PUTCHAR executes,
this driver is called and it safely buffers any characters
received when the current character is transmitted.
Likewise, when a GETCHAR executes, it checks its own
receive buffer before getting data from the MAX3140.
See the C-language outline of a MAX3140 software dri-
ver in Listing 1.
DESCRIPTION