mg84fl54b Megawin Technology, mg84fl54b Datasheet - Page 28

no-image

mg84fl54b

Manufacturer Part Number
mg84fl54b
Description
Full-speed Usb Micro-controller
Manufacturer
Megawin Technology
Datasheet
10.2.3. Baud-Rate Generator Mode (BRG)
Timer2 can be configured to generate various baud-rate. TCLK and/or RCLK in T2CON allow the serial port
transmit and receive baud rates to be derived from either Timer1 or Timer2. When TCLK=0, Timer1 or S2BRT is
used as the serial port transmit baud rate generator. When TCLK=1, Timer2 is used as the serial port transmit
baud rate generator. RCLK has the same effect for the serial port baud rate. With these two bits, the serial port
can have different receive and transmit baud rates – one generated from Timer1 or S2BRT and the other from
Timer2.
In BRG mode, Timers is operated very like auto-reload counting-up mode except that the T2EX pin can not
control reload. An overflow on Timer2 will load RCAP2H,RCAP2L content onto Timer2 but TF2 will not be set.
A 1-to-0 transition on P2EX pin can set EXF2 to request interrupt service if EXEN2=1.
The baud rate in UART Mode1 and Mode3 are determined by Timer2’s overflow rate given below :
28
T2 EX pin
Fosc/2
T2 pin
Baud Rate = Oscillator Frequency / (2 x (65536 – [RCAP2H,RCAP2L]))
Transition
Detector
C/T2=0
C/T2=1
EXEN2
TR2
Timier2 in Baud Rate Generator Mode
MG84FL54B Data Sheet
EXF2
RCAP2L RCAP2H
(8 BITS)
TL2
Timer2 Interrupt
(8 BITS)
TH2
“1”
“1”
2
“0”
“0”
“0”
overflow
Timer 1
“1”
RX Clock
TX Clock
RCLK
TCLK
SMOD
MEGAWIN

Related parts for mg84fl54b