mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 52

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
SCON (Address=98H, Serial Port Control Register, Reset Value=0000,0000B)
FE: Framing Error bit. This bit is set by the receiver when an invalid stop bit is detected. The FE bit is not cleared
by valid frames but should be cleared by software. The SMOD0 bit (in PCON register) must be ‘1’ to enable
access to the FE bit.
SM0: Serial Port Mode Bit 0 (SMOD0 must be ‘0’ to access bit SM0).
SM1: Serial Port Mode Bit 1.
Where,
SM2: Enables the Automatic Address Recognition feature in Modes 2 or 3. If SM2=1 then Rl will not be set
unless the received 9th data bit (RB8) is ‘1’, indicating an address, and the received byte is a Given or Broadcast
Address. In Mode 1, if SM2=1 then Rl will not be activated unless a valid stop bit was received, and the received
byte is a Given or Broadcast Address. In Mode 0, SM2 should be ‘0’.
REN: Enables serial reception. Set by software to enable reception. Cleared by software to disable reception.
TB8: The 9th data bit that will be transmitted in Modes 2 and 3. Set or cleared by software as desired.
RB8: In modes 2 and 3, the 9th data bit that was received. In Mode 1, if SM2=0, RB8 is the stop bit that was
received. In Mode 0, RB8 is not used.
Tl: Transmit interrupt flag. Set by hardware at the end of the 8th bit time in Mode 0, or at the beginning of the stop
bit in the other modes, in any serial transmission. Must be cleared by software.
Rl: Receive interrupt flag. Set by hardware at the end of the 8th bit time in Mode 0, or halfway through the stop bit
time in the other modes, in any serial reception (except see SM2). Must be cleared by software.
PCON (Address=87H, Power Control Register, Reset Value=00xx,0000B (or 00x1,0000B after Power-On Reset))
SMOD0: Clear to let SCON.7 function as ‘SM0’, and set to let SCON.7 function as ‘FE’.
AUXR2 (Address=A6H, Auxiliary Register 2, Reset Value=00x0,0000B)
T1X12:
URM0X6:
12.1.3 Baud Rates
The baud rate in Mode 0 can be Fosc/12 or Fosc/2 dependent on the control bit URM0X6 (in AUXR2 register).
Where, Fosc is the system clock frequency. The baud rates in Modes 1 and 3 are determined by the Timer 1 or
Timer 2 overflow rate. The baud rate in Mode 2 depends on the value of bit SMOD in PCON register. If SMOD=0
(which is the value on reset), the baud rate is Fosc/64; if SMOD=1, the baud rate is Fosc/32, as shown below.
MEGAWIN
SM0/FE
SM0 SM1
SMOD
T0X12
Timer 1 clock source select while C/-T=0.
Set to select Fosc as the clock source, and clear to select Fosc/12 as the clock source.
Set to select Fosc/2 as the baud rate for UART Mode 0.
Clear to select Fosc/12 as the baud rate for UART Mode 0.
0
0
1
1
7
7
7
Fosc
Mode 2 Baud Rate =
0
1
0
1
SMOD0
T1X12
is the system clock frequency.
SM1
6
6
6
Mode
0
1
2
3
URM0X6
SM2
5
5
5
-
Description
Shift Register
8-bit UART
9-bit UART
9-bit UART
2
SMOD
S2TR
64
REN
POF
4
4
4
x Fosc
MPC82G516A Data Sheet
S2SMOD S2TX12 S2CKOE T0CKOE
GF1
TB8
Baud Rate
Fosc/12 or Fosc/2 *
Variable
Fosc/64 or Fosc/32
Variable
3
3
3
RB8
GF0
2
2
2
Note: dependent on bit URM0X6
PD
TI
1
1
1
IDL
RI
0
0
0
52

Related parts for mpc82g516a