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

PIC18LF4320-I/ML 参数 Datasheet PDF下载

PIC18LF4320-I/ML图片预览
型号: PIC18LF4320-I/ML
PDF下载: 下载PDF文件 查看货源
内容描述: 28 /40/ 44引脚高性能,增强型闪存微控制器与10位A / D和纳瓦技术 [28/40/44-Pin High-Performance, Enhanced Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology]
分类和应用: 闪存微控制器和处理器外围集成电路时钟
文件页数/大小: 388 页 / 6899 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18LF4320-I/ML的Datasheet PDF文件第200页浏览型号PIC18LF4320-I/ML的Datasheet PDF文件第201页浏览型号PIC18LF4320-I/ML的Datasheet PDF文件第202页浏览型号PIC18LF4320-I/ML的Datasheet PDF文件第203页浏览型号PIC18LF4320-I/ML的Datasheet PDF文件第205页浏览型号PIC18LF4320-I/ML的Datasheet PDF文件第206页浏览型号PIC18LF4320-I/ML的Datasheet PDF文件第207页浏览型号PIC18LF4320-I/ML的Datasheet PDF文件第208页  
PIC18F2220/2320/4220/4320  
18.3.1  
USART ASYNCHRONOUS  
TRANSMITTER  
18.3 USART Asynchronous Mode  
In this mode, the USART uses standard Non-Return-  
to-Zero (NRZ) format (one Start bit, eight or nine data  
bits and one Stop bit). The most common data format  
is 8 bits. An on-chip dedicated 8-bit Baud Rate Gener-  
ator can be used to derive standard baud rate frequen-  
cies from the oscillator. The USART transmits and  
receives the LSb first. The USART’s transmitter and  
receiver are functionally independent but use the same  
data format and baud rate. The Baud Rate Generator  
produces a clock, either x16 or x64 of the bit shift rate,  
depending on bit BRGH (TXSTA<2>). Parity is not sup-  
ported by the hardware but can be implemented in soft-  
ware (and stored as the ninth data bit). Asynchronous  
mode functions in all power managed modes except  
Sleep mode when call clock sources are stopped.  
When in PRI_IDLE mode, no changes to the Baud  
Rate Generator values are required; however, other  
power managed mode clocks may operate at another  
frequency than the primary clock. Therefore, the Baud  
Rate generator values may need adjusting.  
The USART transmitter block diagram is shown in  
Figure 18-1. The heart of the transmitter is the Transmit  
(Serial) Shift Register (TSR). The shift register obtains  
its data from the Read/Write Transmit Buffer, TXREG.  
The TXREG register is loaded with data in software.  
The TSR register is not loaded until the Stop bit has  
been transmitted from the previous load. As soon as  
the Stop bit is transmitted, the TSR is loaded with new  
data from the TXREG register (if available). Once the  
TXREG register transfers the data to the TSR register  
(occurs in one TCY), the TXREG register is empty and  
flag bit, TXIF (PIR1<4>), is set. This interrupt can be  
enabled/disabled by setting/clearing enable bit, TXIE  
(PIE1<4>). Flag bit TXIF will be set regardless of the  
state of enable bit TXIE and cannot be cleared in soft-  
ware. Flag bit TXIF is not cleared immediately upon  
loading the Transmit Buffer register, TXREG. TXIF  
becomes valid in the second instruction cycle following  
the load instruction. Polling TXIF immediately following  
a load of TXREG will return invalid results. While flag bit  
TXIF indicated the status of the TXREG register,  
another bit, TRMT (TXSTA<1>), shows the status of  
the TSR register. Status bit TRMT is a read-only bit  
which is set when the TSR register is empty. No inter-  
rupt logic is tied to this bit, therefore, the user must poll  
this bit in order to determine whether the TSR register  
is empty.  
Asynchronous mode is selected by clearing bit, SYNC  
(TXSTA<4>).  
The USART Asynchronous module consists of the  
following important elements:  
• Baud Rate Generator  
• Sampling Circuit  
• Asynchronous Transmitter  
• Asynchronous Receiver  
Note 1: The TSR register is not mapped in data  
memory so it is not available to the user.  
2: Flag bit TXIF is set when enable bit TXEN  
is set.  
FIGURE 18-1:  
USART TRANSMIT BLOCK DIAGRAM  
Data Bus  
TXIF  
TXREG Register  
8
TXIE  
MSb  
(8)  
LSb  
0
Pin Buffer  
and Control  
• •  
TSR Register  
RC6/TX/CK pin  
Interrupt  
TXEN  
Baud Rate CLK  
SPBRG  
TRMT  
SPEN  
TX9  
TX9D  
Baud Rate Generator  
DS39599C-page 202  
2003 Microchip Technology Inc.  
 复制成功!