欢迎访问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文件第135页浏览型号PIC16F913-I/ML的Datasheet PDF文件第136页浏览型号PIC16F913-I/ML的Datasheet PDF文件第137页浏览型号PIC16F913-I/ML的Datasheet PDF文件第138页浏览型号PIC16F913-I/ML的Datasheet PDF文件第140页浏览型号PIC16F913-I/ML的Datasheet PDF文件第141页浏览型号PIC16F913-I/ML的Datasheet PDF文件第142页浏览型号PIC16F913-I/ML的Datasheet PDF文件第143页  
PIC16F913/914/916/917/946  
9.3.1.4  
Synchronous Master Reception  
9.3.1.7  
Receiving 9-bit Characters  
Data is received at the RX/DT pin. The RX/DT pin  
output driver is automatically disabled when the  
AUSART is configured for synchronous master receive  
operation.  
The AUSART supports 9-bit character reception. When  
the RX9 bit of the RCSTA register is set the AUSART  
will shift 9-bits into the RSR for each character  
received. The RX9D bit of the RCSTA register is the  
ninth, and Most Significant, data bit of the top unread  
character in the receive FIFO. When reading 9-bit data  
from the receive FIFO buffer, the RX9D data bit must  
be read before reading the 8 Least Significant bits from  
the RCREG.  
In Synchronous mode, reception is enabled by setting  
either the Single Receive Enable bit (SREN of the  
RCSTA register) or the Continuous Receive Enable bit  
(CREN of the RCSTA register).  
When SREN is set and CREN is clear, only as many  
clock cycles are generated as there are data bits in a  
single character. The SREN bit is automatically cleared  
at the completion of one character. When CREN is set,  
clocks are continuously generated until CREN is  
cleared. If CREN is cleared in the middle of a character  
the CK clock stops immediately and the partial charac-  
ter is discarded. If SREN and CREN are both set, then  
SREN is cleared at the completion of the first character  
and CREN takes precedence.  
Address detection in Synchronous modes is not  
supported, therefore the ADDEN bit of the RCSTA  
register must be cleared.  
9.3.1.8  
Synchronous Master Reception  
Set-up:  
1. Initialize the SPBRG register for the appropriate  
baud rate. Set or clear the BRGH bit, as  
required, to achieve the desired baud rate.  
2. Enable the synchronous master serial port by  
setting bits SYNC, SPEN and CSRC.  
To initiate reception, set either SREN or CREN. Data is  
sampled at the RX/DT pin on the trailing edge of the  
TX/CK clock pin and is shifted into the Receive Shift  
Register (RSR). When a complete character is  
received into the RSR, the RCIF bit of the PIR1 register  
is set and the character is automatically transferred to  
the two character receive FIFO. The Least Significant  
eight bits of the top character in the receive FIFO are  
available in RCREG. The RCIF bit remains set as long  
as there are un-read characters in the receive FIFO.  
3. Ensure bits CREN and SREN are clear.  
4. If interrupts are desired, set the RCIE bit of the  
PIE1 register and the GIE and PEIE bits of the  
INTCON register.  
5. If 9-bit reception is desired, set bit RX9.  
6. Verify address detection is disabled by clearing  
the ADDEN bit of the RCSTA register.  
7. Start reception by setting the SREN bit or for  
continuous reception, set the CREN bit.  
9.3.1.5  
Slave Clock  
8. Interrupt flag bit RCIF of the PIR1 register will be  
set when reception of a character is complete.  
An interrupt will be generated if the RCIE inter-  
rupt enable bit of the PIE1 register was set.  
Synchronous data transfers use a separate clock line,  
which is synchronous with the data. A device configured  
as a slave receives the clock on the TX/CK line. The  
TX/CK pin output driver is automatically disabled when  
the device is configured for synchronous slave transmit  
or receive operation. Serial data bits change on the  
leading edge to ensure they are valid at the trailing edge  
of each clock. One data bit is transferred for each clock  
cycle. Only as many clock cycles should be received as  
there are data bits.  
9. Read the RCSTA register to get the ninth bit (if  
enabled) and determine if any error occurred  
during reception.  
10. Read the 8-bit received data by reading the  
RCREG register.  
11. If an overrun error occurs, clear the error by  
either clearing the CREN bit of the RCSTA  
register or by clearing the SPEN bit which resets  
the AUSART.  
9.3.1.6  
Receive Overrun Error  
The receive FIFO buffer can hold two characters. An  
overrun error will be generated if a third character, in its  
entirety, is received before RCREG is read to access  
the FIFO. When this happens the OERR bit of the  
RCSTA register is set. Previous data in the FIFO will  
not be overwritten. The two characters in the FIFO  
buffer can be read, however, no additional characters  
will be received until the error is cleared. The OERR bit  
can only be cleared by clearing the overrun condition.  
If the overrun error occurred when the SREN bit is set  
and CREN is clear then the error is cleared by reading  
RCREG. If the overrun occurred when the CREN bit is  
set then the error condition is cleared by either clearing  
the CREN bit of the RCSTA register.  
© 2007 Microchip Technology Inc.  
DS41250F-page 137  
 复制成功!