vrs51c1100 ETC-unknow, vrs51c1100 Datasheet - Page 28

no-image

vrs51c1100

Manufacturer Part Number
vrs51c1100
Description
Versa 8051 Mcu With 128kb Of Iap/isp Flash
Manufacturer
ETC-unknow
Datasheet
UART Baud Rates
In Mode 0, the baud rate is fixed and can be
represented by the following formula:
In Mode 2, the baud rate depends on the value of the
SMOD bit in the PCON SFR. From the formula below,
we can see that if SMOD = 0 (which is the value on
reset), the baud rate is 1/32 the oscillator frequency.
The Timer 1 and/or Timer 2 overflow rate determines
the baud rates in Modes 1 and 3.
Generating UART Baud Rate with Timer 1
When Timer 1 functions as a baud rate generator, the
baud rate in modes 1 and 3 is determined by the Timer
1 overflow rate.
Timer 1 must be configured as an 8-bit timer (TL1) in
auto-reload mode with a TH1 value when an overflow
occurs (Mode 2). In this application, the Timer 1
interrupt should be disabled.
The two following formulas can be used to calculate
the baud rate and the reload value written into the TH1
register.
______________________________________________________________________________________________
www.ramtron.com
Mode 1,3 Baud Rate =
VRS51C1100
Mode 2 Baud Rate = 2
Mode 1,3 Baud Rate = 2
Mode 0 Baud Rate = Oscillator Frequency
SMOD
32 x 12(256 – TH1)
SMOD
x (Oscillator Frequency)
2
x Timer 1 Overflow Rate
SMOD
x Fosc
64
12
32
The value to write into the TH1 register is defined by
the following formula:
Generating UART Baud Rates with Timer 2
Timer 2 is often preferred to generate the baud rate, as
it can be easily configured to operate as a 16-bit timer
with auto-reload. This enables far better resolution
than using Timer 1 in 8-bit auto-reload mode.
The baud rate using Timer 2 is defined as:
The timer can be configured as either a timer or a
counter in any of its three running modes. In typical
applications, it is configured as a timer (C/T2 is set to
0).
To make Timer 2 operate as a baud rate generator, the
TCLK and RCLK bits of the T2CON register must be
set to 1.
The baud rate generator mode is similar to the auto-
reload mode in that an overflow in TH2 causes the
Timer 2 registers to be reloaded with the 16-bit value in
registers RCAP2H and RCAP2L, which are preset by
the software. However, when Timer 2 is configured as
a baud rate generator, its clock source is Osc/2.
TH1 = 256 -
Mode 1,3 Baud Rate = Timer 2 Overflow Rate
32 x 12x (Baud Rate)
2
SMOD
x Fosc
16
page 28 of 50

Related parts for vrs51c1100