| 数据搜索系统,热门电子元器件搜索 |
|
AD822 数据表(PDF) 68 Page - Analog Devices |
|
|
|||||||||||||||||||||||||||||
AD822 数据表(HTML) 68 Page - Analog Devices |
|
68 / 88 page ![]() ADuC841/ADuC842/ADuC843 Rev. 0 | Page 68 of 88 Timer 3 Generated Baud Rates The high integer dividers in a UART block mean that high speed baud rates are not always possible using some particular crystals. For example, using a 12 MHz crystal, a baud rate of 115200 is not possible. To address this problem, the part has added a dedicated baud rate timer (Timer 3) specifically for generating highly accurate baud rates. Timer 3 can be used instead of Timer 1 or Timer 2 for generating very accurate high speed UART baud rates including 115200 and 230400. Timer 3 also allows a much wider range of baud rates to be obtained. In fact, every desired bit rate from 12 bit/s to 393216 bit/s can be generated to within an error of ±0.8%. Timer 3 also frees up the other three timers, allowing them to be used for different applications. A block diagram of Timer 3 is shown in Figure 74. (1 + T3FD/64) 2 T3 RX/TX CLOCK CORE CLK T3EN RX CLOCK TX CLOCK TIMER 1/TIMER 2 RX CLOCK FRACTIONAL DIVIDER 0 0 1 1 TIMER 1/TIMER 2 TX CLOCK 16 2DIV Figure 74. Timer 3, UART Baud Rates Two SFRs (T3CON and T3FD) are used to control Timer 3. T3CON is the baud rate control SFR, allowing Timer 3 to be used to set up the UART baud rate, and setting up the binary divider (DIV). The appropriate value to write to the DIV2-1-0 bits can be calculated using the following formula where fCORE is defined in PLLCON SFR. Note that the DIV value must be rounded down. () 2 log 16 log ⎟⎟ ⎠ ⎞ ⎜⎜ ⎝ ⎛ × = Rate Baud f DIV CORE T3FD is the fractional divider ratio required to achieve the required baud rate. The appropriate value for T3FD can be calculated with the following formula: 64 2 2 3 1 − × × = − Rate Baud f FD T DIV CORE Note that T3FD should be rounded to the nearest integer. Once the values for DIV and T3FD are calculated, the actual baud rate can be calculated with the following formula: () 64 3 2 2 1 + × × = − FD T f Rate Baud Actual DIV CORE For example, to get a baud rate of 115200 while operating at 16.7 MHz, i.e., CD = 0 ( ) ( ) () () H FD T DIV 09 9 64 115200 2 / 16777216 2 3 3 18 . 3 2 log / 115200 16 / 16777216 log 2 = = − × × = = = × = Therefore, the actual baud rate is 114912 bit/s. Table 33. T3CON SFR Bit Designations Bit No. Name Description 7 T3BAUDEN T3UARTBAUD Enable. Set to enable Timer 3 to generate the baud rate. When set, PCON.7, T2CON.4, and T2CON.5 are ignored. Cleared to let the baud rate be generated as per a standard 8052. 6 Reserved. 5 Reserved. 4 Reserved. 3 Reserved. 2 DIV2 Binary Divider Factor. 1 DIV1 DIV2 DIV1 DIV0 Bin Divider 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 0 DIV0 1 1 1 1 |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |