欢迎访问ic37.com |
会员登录 免费注册
发布采购

HT46RU66 参数 Datasheet PDF下载

HT46RU66图片预览
型号: HT46RU66
PDF下载: 下载PDF文件 查看货源
内容描述: A / D型8位微控制器与LCD [A/D Type 8-Bit MCU with LCD]
分类和应用: 微控制器
文件页数/大小: 63 页 / 489 K
品牌: HOLTEK [ HOLTEK SEMICONDUCTOR INC ]
 浏览型号HT46RU66的Datasheet PDF文件第35页浏览型号HT46RU66的Datasheet PDF文件第36页浏览型号HT46RU66的Datasheet PDF文件第37页浏览型号HT46RU66的Datasheet PDF文件第38页浏览型号HT46RU66的Datasheet PDF文件第40页浏览型号HT46RU66的Datasheet PDF文件第41页浏览型号HT46RU66的Datasheet PDF文件第42页浏览型号HT46RU66的Datasheet PDF文件第43页  
HT46RU66/HT46CU66  
¨
TXEN  
By programming the BRGH bit which allows selection  
of the related formula and programming the required  
value in the BRG register, the required baud rate can  
be setup. Note that because the actual baud rate is  
determined using a discrete value, N, placed in the  
BRG register, there will be an error associated be-  
tween the actual and requested value. The following  
example shows how the BRG register value N and the  
error value can be calculated.  
The TXEN bit is the Transmitter Enable Bit. When  
this bit is equal to ²0² the transmitter will be disabled  
with any pending transmissions being aborted. In  
addition the buffer will be reset. In this situation the  
TX pin can be used as a general purpose I/O pin. If  
the TXEN bit is equal to ²1² the transmitter will be  
enabled and if the UARTEN bit is equal to ²1² the  
TX pin will be controlled by the UART. Clearing the  
TXEN bit during a transmission will cause the trans-  
mission to be aborted and will reset the transmitter.  
If this occurs, the TX pin can be used as a general  
purpose I/O pin.  
Calculating the register and error values  
For a clock frequency of 8MHz, and with BRGH set to  
²0² determine the BRG register value N, the actual  
baud rate and the error value for a desired baud rate  
of 9600.  
·
Baud rate generator  
To setup the speed of the serial data communication,  
the UART function contains its own dedicated baud  
rate generator. The baud rate is controlled by its own  
internal free running 8-bit timer, the period of which is  
determined by two factors. The first of these is the  
value placed in the BRG register and the second is the  
value of the BRGH bit within the UCR2 control regis-  
ter. The BRGH bit decides, if the baud rate generator  
is to be used in a high speed mode or low speed  
mode, which in turn determines the formula that is  
used to calculate the baud rate. The value in the BRG  
register determines the division factor, N, which is  
used in the following baud rate calculation formula.  
Note that N is the decimal value placed in the BRG  
register and has a range of between 0 and 255.  
From the above table the desired baud rate BR  
fSYS  
=
[64 (N+ 1)]  
fSYS  
Re-arranging this equation gives N =  
- 1  
(BRx64)  
8000000  
Giving a value for N =  
- 1 = 12.0208  
(9600x64)  
To obtain the closest value, a decimal value of 12  
should be placed into the BRG register. This gives an  
actual or calculated baud rate value of  
8000000  
BR =  
= 9615  
[64(12 + 1)]  
9
-
6 1 5 9 6 0 0  
Therefore the error is equal to  
= 0.16%  
9
6
0
0
UCR2 BRGH Bit  
0
1
fSYS  
fSYS  
Baud Rate  
[64 (N+ 1)]  
[16 (N+ 1)]  
The following tables show actual values of baud rate and error values for the two values of BRGH.  
Baud Rates for BRGH=0  
Baud  
Rate  
fSYS=8MHz  
fSYS=7.159MHz  
fSYS=4MHz  
fSYS=3.579545MHz  
K/BPS  
BRG Kbaud Error  
BRG Kbaud Error  
BRG Kbaud Error  
BRG Kbaud Error  
0.3  
1.2  
207  
51  
25  
12  
6
0.300  
1.202  
2.404  
4.808  
8.929  
20.83  
¾
0.00  
0.16  
0.16  
0.16  
-6.99  
8.51  
¾
185  
46  
22  
11  
5
0.300  
1.19  
0.00  
-0.83  
1.32  
-2.9  
-2.9  
-2.9  
¾
¾
103  
51  
25  
12  
6
¾
¾
¾
92  
46  
22  
11  
5
¾
¾
1.202  
2.404  
4.807  
9.615  
0.16  
0.16  
0.16  
0.16  
1.203  
2.38  
0.23  
-0.83  
1.32  
-2.9  
-2.9  
-2.9  
-2.9  
-2.9  
2.4  
2.432  
4.661  
9.321  
18.643  
¾
4.8  
4.863  
9.322  
18.64  
37.29  
55.93  
111.86  
9.6  
19.2  
38.4  
57.6  
115.2  
17.857 -6.99  
41.667 8.51  
2
2
2
2
1
1
1
62.5  
125  
8.51  
8.51  
1
0
62.5  
¾
8.51  
¾
0
55.93  
¾
-2.9  
¾
0
0
¾
¾
Baud Rates and Error Values for BRGH = 0  
Rev. 1.20  
39  
October 2, 2007  
 复制成功!