MPC89L51A Megawin Technology, MPC89L51A Datasheet - Page 25

no-image

MPC89L51A

Manufacturer Part Number
MPC89L51A
Description
8-bit micro-controller
Manufacturer
Megawin Technology
Datasheet
www.DataSheet4U.com
SM2: Enable the automatic address recognition feature in mode 2 and 3. If SM2=1, RI will not be set unless
For another example:
REN: Enable the serial port reception. 1 := enable
TB8: The 9
RB8: In mode 2 and 3, the received 9
TI: Transmit interrupt flag. After a transmit has been finished, the hardware will set this bits.
RI: Receive interrupt flag. After reception has been finished, the hardware will set this bits.
SFR: SBUF (Serial port Buffer register):
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
bytes”. The formula specifies as following.
For example:
After the generic “Compared Bytes” has been worked out, the MPC89x51A will make use of this
bytes to determine how to set the bits RI in SFR SCON.
Normally, an UART will set bits RI whenever it has done a bytes reception; but for the UART in
the MPC89x51A, if the bits SM2 is set, it will set RI according to the following formula.
MEGAWIN
Bits-7
the received 9
address. In mode1, if SM2=1 then RI will not be set unless a valid stop Bits was received, and the
received bytes is a Given or Broadcast address.
Bit[ i ] of Compared Byte = (SADEN[ i ] == 1 )? SADDR[ i ] : x
RI = (SM2 == 1) && (SBUF == Compared Byte) && (RB8 == 1)
Set SADDR = 11000000b
Set SADEN = 11111101b
Set SADDR = 11100000b
Set SADEN = 11111010b
th
The achieved “Compared Bytes” will be “110000x0”
The achieved “Compared Bytes” will be “11100x0x”
data bits, which will be transmitted in Mode 2 and Mode 3.
Bits-6
th
data bits is 1, indicating an address, and the received bytes is a Given or Broadcast
(data to be transmitted or received data)
Bits-5
th
MPC89x51A Data Sheet
Bits-4
data bits will go into this bits.
Bits-3
0 := disable
Bits-2
(x means don’t care)
Bits-1
Bits-0
25

Related parts for MPC89L51A