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

PIC16F913-I/ML 参数 Datasheet PDF下载

PIC16F913-I/ML图片预览
型号: PIC16F913-I/ML
PDF下载: 下载PDF文件 查看货源
内容描述: 40分之28 / 44/ 64引脚基于闪存的8位CMOS微控制器与LCD驱动器和纳瓦技术 [28/40/44/64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology]
分类和应用: 驱动器闪存微控制器
文件页数/大小: 330 页 / 6045 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC16F913-I/ML的Datasheet PDF文件第130页浏览型号PIC16F913-I/ML的Datasheet PDF文件第131页浏览型号PIC16F913-I/ML的Datasheet PDF文件第132页浏览型号PIC16F913-I/ML的Datasheet PDF文件第133页浏览型号PIC16F913-I/ML的Datasheet PDF文件第135页浏览型号PIC16F913-I/ML的Datasheet PDF文件第136页浏览型号PIC16F913-I/ML的Datasheet PDF文件第137页浏览型号PIC16F913-I/ML的Datasheet PDF文件第138页  
PIC16F913/914/916/917/946  
EXAMPLE 9-1:  
CALCULATING BAUD  
RATE ERROR  
9.2  
AUSART Baud Rate Generator  
(BRG)  
For a device with FOSC of 16 MHz, desired baud rate  
of 9600, Asynchronous mode:  
The Baud Rate Generator (BRG) is an 8-bit timer that  
is dedicated to the support of both the asynchronous  
and synchronous AUSART operation.  
FOSC  
Desired Baud Rate = ---------------------------------------  
64(SPBRG + 1)  
The SPBRG register determines the period of the free  
running baud rate timer. In Asynchronous mode the  
multiplier of the baud rate period is determined by the  
BRGH bit of the TXSTA register. In Synchronous mode,  
the BRGH bit is ignored.  
Solving for SPBRG:  
FOSC  
---------------------------------------------  
Desired Baud Rate  
X = --------------------------------------------- 1  
64  
Table 9-3 contains the formulas for determining the  
baud rate. Example 9-1 provides a sample calculation  
for determining the baud rate and baud rate error.  
16000000  
-----------------------  
9600  
= ----------------------- 1  
64  
Typical baud rates and error values for various  
asynchronous modes have been computed for your  
convenience and are shown in Table 9-3. It may be  
advantageous to use the high baud rate (BRGH = 1), to  
reduce the baud rate error.  
= [25.042] = 25  
16000000  
Calculated Baud Rate = --------------------------  
64(25 + 1)  
= 9615  
Writing a new value to the SPBRG register causes the  
BRG timer to be reset (or cleared). This ensures that  
the BRG does not wait for a timer overflow before out-  
putting the new baud rate.  
Calc. Baud Rate Desired Baud Rate  
Error = --------------------------------------------------------------------------------------------  
Desired Baud Rate  
(9615 9600)  
= ---------------------------------- = 0 . 1 6 %  
9600  
TABLE 9-3:  
BAUD RATE FORMULAS  
Configuration Bits  
Baud Rate Formula  
AUSART Mode  
SYNC  
BRGH  
0
0
1
0
1
x
Asynchronous  
Asynchronous  
Synchronous  
FOSC/[64 (n+1)]  
FOSC/[16 (n+1)]  
FOSC/[4 (n+1)]  
Legend:  
x= Don’t care, n = value of SPBRG register  
TABLE 9-4:  
REGISTERS ASSOCIATED WITH THE BAUD RATE GENERATOR  
Value on  
all other  
Resets  
Value on  
POR, BOR  
Name  
Bit 7  
Bit 6  
Bit 5  
Bit 4  
Bit 3  
Bit 2  
Bit 1  
Bit 0  
RCSTA  
SPBRG  
TXSTA  
SPEN  
BRG7  
CSRC  
RX9  
BRG6  
TX9  
SREN  
BRG5  
TXEN  
CREN  
BRG4  
SYNC  
ADDEN  
BRG3  
FERR  
BRG2  
BRGH  
OERR  
BRG1  
TRMT  
RX9D  
BRG0  
TX9D  
0000 000x 0000 000x  
0000 0000 0000 0000  
0000 -010 0000 -010  
Legend:  
x= unknown, -= unimplemented read as ‘0’. Shaded cells are not used for the Baud Rate Generator.  
DS41250F-page 132  
© 2007 Microchip Technology Inc.  
 复制成功!