參數(shù)資料
型號: AT_8032
廠商: Atmel Corp.
英文描述: 8-bit Embedded Microcontroller Core(8位嵌入式基于工業(yè)標(biāo)準(zhǔn)軟件兼容的微控制器)
中文描述: 8位嵌入式微控制器核心(8位嵌入式基于工業(yè)標(biāo)準(zhǔn)軟件兼容的微控制器)
文件頁數(shù): 24/39頁
文件大?。?/td> 532K
代理商: AT_8032
AT_8032 Core
24
UART
The serial UART port is full duplex
it can transmit and
receive at the same time. The port can simultaneously read
a byte and start reception of a second byte from the receive
register.
The serial port receive and transmit registers are both
accessed by a Serial Data Buffer (SBUF). Writing to SBUF
loads the transmit register TXD; reading SBUF accesses a
physically separate receive register RXD.
The UART can operate in 4 modes. Mode selection is by
setting the appropriate combination of bits SM0 and SM1 in
the Serial Port Control Register (SCON).
In all modes, any instruction using SBUF as destination
register initiates a transmission. Reception is initiated in
mode 0 by the condition RI = 0 and REN = 1. With the other
modes, reception is initiated by the incoming start bit if
REN = 1.
Generating Baud Rates
Mode 0
In Mode 0, the baud rate is fixed:
Baud Rate = Oscillator Frequency/12
Mode 2
In Mode 2, the baud rate depends on the oscillator fre-
quency and the value of bit SMOD in the Special Function
Register PCON, as follows:
If SMOD = 0,
Baud Rate = Oscillator Frequency/64
If SMOD = 1
, Baud Rate = Oscillator Frequency/32
i.e.
Baud Rate = 2
SMOD
x (Oscillator Frequency)/64
Modes 1 and 3
The baud rates in Modes 1 and 3 are determined by Timer
1 or Timer 2, or by both (one for transmit and the other for
receive):
Using Timer 1
If generated by Timer 1, the baud rate in Modes 1 and 3 is
determined by the Timer 1 overflow rate and the value of bit
SMOD, as follows:
Baud Rate = 2
SMOD
x (Timer 1 Overflow Rate)/64
The Timer 1 interrupt should be disabled in this application.
Timer 1 can be configured in any of its 3 running modes for
either timer or counter operation. In most typical applica-
tions, Timer 1 is configured for timer operation, in the auto-
reload mode (high nibble of TMOD = 0010B). In this case,
the baud rate is given by the formula:
Baud Rate = (2
SMOD
/32) x (Oscillator Frequency)/(12 x
(256-TH1))
In many cases the required baud rate is known, and the
value of TH1 must be calculated:
TH1 = 256 – (2
SMOD
/32) x (Oscillator Frequency)/(12 x
(Baud Rate))
TH1 must be an integer value. Rounding off TH1 to the
nearest integer may not produce the desired baud rate. In
this case, the user may have to choose another crystal fre-
quency. Since the PCON register is not bit addressable,
one way to set the bits is logical ORing the PCON register
(i.e.: -, ORL PCON, #80H). The address of PCON is 87H.
It is possible to achieve very low baud rates with Timer 1
by:
leaving the Timer 1 interrupt enabled
configuring the timer to run as a 16-bit timer (high nibble
of TMOD = 0001B)
using the Timer 1 interrupt to initiate a 16-bit software
reload.
Table 7.
UART Modes
Mode
Description
Baud Rates
0
Eight data bits are transmitted (through TXD) or received (through
RXD), LSB first.
The baud rate is fixed at 1/12 of the oscillator
frequency.
1
10 bits are transmitted or received: a start bit (0), 8 data bits (LSB
first), and a stop bit (1). On receive, the stop bit goes into RB8 in
special Function Register SCON.
The baud rate is variable and determined by Timer
1 or Timer 2, or by both (one for transmit and the
other for receive).
2
11 bits are transmitted or received: a start bit (0), 8 data bits (LSB
first), a programmable 9th data bit, and a stop bit. On transmit, the
9th data bit (TB8 in SCON) can be assigned the value 0 or 1.
Alternatively, the parity bit (P, in the PSW) could be moved into
TB8. On receive, the ninth data bit goes into RB8 in Special
Function Register SCON, while the stop bit is ignored.
The baud rate in mode 2 depends of the value of bit
SMOD in the Special Function Register PCON. If
SMOD = 0, the baud rate is fixed at 1/64 of the
oscillator frequency. If SMOD = 1, the baud rate is
1/32 of the oscillator frequency.
3
Same as mode 2 except that the baud rate in mode 3 is variable.
The baud rate is determined by Timer 1 or Timer 2.
相關(guān)PDF資料
PDF描述
AT05SC1602RF 8-bit Microcontroller with 2K EEPROM,Dual Interface,and Advanced Security Features(8位微控制器(帶2K的EEPROM,雙接口和先進(jìn)的安全性能))
AT05SC1602R 8-bit Secure Microcontroller with 2K EEPROM and Advanced Security Features(8位微控制器(帶2K的EEPROM和先進(jìn)的安全性能))
AT05SC1604R 8-bit Secure Microcontroller with 4K EEPROM and Advanced Security Features(8位微控制器(帶4K的EEPROM和先進(jìn)的安全性能))
AT05SC3202R 8-bit Secure Microcontroller with 2K EEPROM and Advanced Security Features(8位微控制器(帶2K的EEPROM和先進(jìn)的安全性能 ))
AT05SC3204R 8-bit Secure Microcontroller with 4K EEPROM and Advanced Security Features(8位微控制器(帶4K的EEPROM和先進(jìn)的安全性能))
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AT804 制造商:POSEICO 制造商全稱:POSEICO 功能描述:PHASE CONTROL THYRISTOR
AT804S12 制造商:n/a 功能描述:Thyristor
AT804S16 制造商:POSEICO 制造商全稱:POSEICO 功能描述:PHASE CONTROL THYRISTOR
AT805-1.2KER 制造商: 功能描述:600mA Ultra Low Dropout Regulator 制造商:undefined 功能描述:600mA Ultra Low Dropout Regulator
AT805-3.3KER 制造商: 功能描述:600mA Ultra Low Dropout Regulator 制造商:undefined 功能描述:600mA Ultra Low Dropout Regulator