at89s8253-24psu ATMEL Corporation, at89s8253-24psu Datasheet - Page 20

no-image

at89s8253-24psu

Manufacturer Part Number
at89s8253-24psu
Description
At89s8253 8-bit Microcontroller With 12k Bytes Flash And 2k Bytes Eeprom
Manufacturer
ATMEL Corporation
Datasheet
13. UART
13.1
13.1.1
20
Enhanced UART
AT89S8253
Automatic Address Recognition
The UART in the AT89S8253 operates the same way as the UART in the AT89S51 and
AT89S52. For more detailed information on the UART operation, please click on the document
link below:
In addition to all of its usual modes, the UART can perform framing error detection by looking for
missing stop bits, and automatic address recognition. The UART also fully supports multiproces-
sor communication as does the standard 80C51 UART.
When used for framing error detect, the UART looks for missing stop bits in the communication.
A missing bit will set the FE bit in the SCON register. The FE bit shares the SCON.7 bit with SM0
and the function of SCON.7 is determined by PCON.6 (SMOD0). If SMOD0 is set then SCON.7
functions as FE. SCON.7 functions as SM0 when SMOD0 is cleared. When used as FE,
SCON.7 can only be cleared by software.
Automatic Address Recognition is a feature which allows the UART to recognize certain
addresses in the serial bit stream by using hardware to make the comparisons. This feature
saves a great deal of software overhead by eliminating the need for the software to examine
every serial address which passes by the serial port. This feature is enabled by setting the SM2
bit in SCON. In the 9-bit UART modes, mode 2 and mode 3, the Receive Interrupt flag (RI) will
be automatically set when the received byte contains either the “Given” address or the
“Broadcast” address. The 9-bit mode requires that the 9th information bit is a 1 to indicate that
the received information is an address and not data.
The 8-bit mode is called mode 1. In this mode the RI flag will be set if SM2 is enabled and the
information received has a valid stop bit following the 8 address bits and the information is either
a Given or Broadcast address.
Mode 0 is the Shift Register mode and SM2 is ignored.
Using the Automatic Address Recognition feature allows a master to selectively communicate
with one or more slaves by invoking the given slave address or addresses. All of the slaves may
be contacted by using the Broadcast address. Two special Function Registers are used to
define the slave’s address, SADDR, and the address mask, SADEN. SADEN is used to define
which bits in the SADDR are to be used and which bits are “don’t care”. The SADEN mask can
be logically ANDed with the SADDR to create the “Given” address which the master will use for
addressing each of the slaves. Use of the Given address allows multiple slaves to be recognized
while excluding others. The following examples will help to show the versatility of this scheme:
Slave 0
Slave 1
http://www.atmel.com/dyn/resources/prod_documents/DOC4316.PDF
SADDR = 1100 0000
SADEN = 1111 1101
Given
SADDR = 1100 0000
SADEN = 1111 1110
Given
= 1100 00X0
= 1100 000X
3286K–MICRO–12/06

Related parts for at89s8253-24psu