mpc82x52at Megawin Technology, mpc82x52at Datasheet - Page 37

no-image

mpc82x52at

Manufacturer Part Number
mpc82x52at
Description
8-bit Micro-controller
Manufacturer
Megawin Technology
Datasheet
MEGAWIN
SFR: SBUF (Serial Buffer)
Frame Error Detection
When used for frame 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. When SMOD0 is cleared, SCON.7 functions as SM0. When used as
FE, SCON.7 can only be cleared by software.
Automatic Address Recognition
There is an extra feature makes the device convenient to act as a master, which
communicates to multiple slaves simultaneously. It is really Automatic Address Recognition.
There are two SFR SADDR and SADEN implemented in the device. The user can read or
write both of them. Finally, the hardware will make use of these two SFR to “generate” a
“compared byte”. The formula specifies as following.
For example:
For another example:
After the generic “Compared Byte” has been worked out, the MPC82x52A will make use of
this byte to determine how to set the bit RI in SFR SCON.
Normally, an UART will set bit RI whenever it has done a byte reception; but for the UART in
the MPC82x52A, if the bit SM2 is set, it will set RI according to the following formula.
In other words, not all data reception will respond to RI, while specific data does.
By setting the SADDR and the SADEN, the user can filter out those data byte that doesn’t like
to care. This feature brings great help to reduce software overhead.
The above feature adapts to the serial port when operated in Mode1, Mode2, and Mode3.
Dealing with Mode 0, the user can ignore it.
Set SADDR = 11000000b
Set SADEN = 11111101b
Set SADDR = 11100000b
Set SADEN = 11111010b
Bit[ i ] of Compared Byte = (SADEN[ i ] == 1 )? SADDR[ i ] : x
Bit-7
RI = (SM2 == 1) && (SBUF == Compared Byte) && (RB8 == 1)
The achieved “Compared Byte” will be “110000x0”
The achieved “Compared Byte” will be “11100x0x”
Bit-6
(data to be transmitted or received data)
Bit-5
MPC82x52A Data Sheet
Bit-4
Bit-3
(x means don’t care)
Bit-2
Bit-1
Bit-0
37

Related parts for mpc82x52at