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

ATMEGA169PV 参数 Datasheet PDF下载

ATMEGA169PV图片预览
型号: ATMEGA169PV
PDF下载: 下载PDF文件 查看货源
内容描述: 微控制器,带有16K字节的系统内可编程闪存 [Microcontroller with 16K Bytes In-System Programmable Flash]
分类和应用: 闪存微控制器
文件页数/大小: 390 页 / 3485 K
品牌: ATMEL [ ATMEL ]
 浏览型号ATMEGA169PV的Datasheet PDF文件第180页浏览型号ATMEGA169PV的Datasheet PDF文件第181页浏览型号ATMEGA169PV的Datasheet PDF文件第182页浏览型号ATMEGA169PV的Datasheet PDF文件第183页浏览型号ATMEGA169PV的Datasheet PDF文件第185页浏览型号ATMEGA169PV的Datasheet PDF文件第186页浏览型号ATMEGA169PV的Datasheet PDF文件第187页浏览型号ATMEGA169PV的Datasheet PDF文件第188页  
18.6.5  
Parity Checker  
The Parity Checker is active when the high USART Parity mode (UPM1n) bit is set. Type of Par-  
ity Check to be performed (odd or even) is selected by the UPM0n bit. When enabled, the Parity  
Checker calculates the parity of the data bits in incoming frames and compares the result with  
the parity bit from the serial frame. The result of the check is stored in the receive buffer together  
with the received data and stop bits. The Parity Error (UPEn) Flag can then be read by software  
to check if the frame had a Parity Error.  
The UPEn bit is set if the next character that can be read from the receive buffer had a Parity  
Error when received and the Parity Checking was enabled at that point (UPM1n = 1). This bit is  
valid until the receive buffer (UDRn) is read.  
18.6.6  
18.6.7  
Disabling the Receiver  
In contrast to the Transmitter, disabling of the Receiver will be immediate. Data from ongoing  
receptions will therefore be lost. When disabled (i.e., the RXENn is set to zero) the Receiver will  
no longer override the normal function of the RxD port pin. The Receiver buffer FIFO will be  
flushed when the Receiver is disabled. Remaining data in the buffer will be lost  
Flushing the Receive Buffer  
The receiver buffer FIFO will be flushed when the Receiver is disabled, i.e., the buffer will be  
emptied of its contents. Unread data will be lost. If the buffer has to be flushed during normal  
operation, due to for instance an error condition, read the UDRn I/O location until the RXCn Flag  
is cleared. The following code example shows how to flush the receive buffer.  
Assembly Code Example(1)  
USART_Flush:  
sbis UCSR0A, RXC0  
ret  
in  
rjmp USART_Flush  
C Code Example(1)  
r16, UDR0  
void USART_Flush( void )  
{
unsigned char dummy;  
while ( UCSR0A & (1<<RXC0) ) dummy = UDR0;  
}
Note:  
1. See ”About Code Examples” on page 9.  
184  
ATmega169P  
8018A–AVR–03/06  
 复制成功!