mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 61

no-image

mpc82g516a

Manufacturer Part Number
mpc82g516a
Description
8-bit Microcontroller
Manufacturer
Megawin Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mpc82g516aE
Manufacturer:
MEGAWIN
Quantity:
1 200
Part Number:
mpc82g516aF
Manufacturer:
MEGAWIN
Quantity:
20 000
12.2 Enhanced UART Functions
n addition to the standard operation, the UART can perform framing error detection by looking for missing stop
I
bits, and automatic address recognition.
12.2.1 Framing Error Detection
When used for framing error detection, the UART looks for missing stop bits in the communication. A missing
stop 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 SMOD0 bit (PCON.6). If SMOD0 is set then SCON.7 functions as FE. SCON.7
functions as SM0 when SMOD0 is cleared. When SCON.7 functions as FE, it can only be cleared by software.
Refer to Figure 12-5.
Figure 12-5. UART Framing Error Detection
12.2.2 Automatic Address Recognition
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. Automatic address
recognition is shown in Figure 12-6. 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:
61
MPC82G516A Data Sheet
MEGAWIN

Related parts for mpc82g516a