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

AT90PWM3B-16SU 参数 Datasheet PDF下载

AT90PWM3B-16SU图片预览
型号: AT90PWM3B-16SU
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器具有8K字节的系统内可编程闪存 [8-bit Microcontroller with 8K Bytes In-System Programmable Flash]
分类和应用: 闪存微控制器
文件页数/大小: 361 页 / 6022 K
品牌: ATMEL [ ATMEL ]
 浏览型号AT90PWM3B-16SU的Datasheet PDF文件第215页浏览型号AT90PWM3B-16SU的Datasheet PDF文件第216页浏览型号AT90PWM3B-16SU的Datasheet PDF文件第217页浏览型号AT90PWM3B-16SU的Datasheet PDF文件第218页浏览型号AT90PWM3B-16SU的Datasheet PDF文件第220页浏览型号AT90PWM3B-16SU的Datasheet PDF文件第221页浏览型号AT90PWM3B-16SU的Datasheet PDF文件第222页浏览型号AT90PWM3B-16SU的Datasheet PDF文件第223页  
AT90PWM2/3/2B/3B  
The following code example shows a simple EUSART receive function.  
TABLE 3.  
Assembly Code Example(1)  
EUSART_Receive:  
; Wait for data to be received  
sbis UCSRA, RXC  
rjmp EUSART_Receive  
; Get MSB (r15), LSB (r16)  
lds r15, EUDR  
lds r16, UDR  
ret  
C Code Example(1)  
unsigned int EUSART_Receive( void )  
{
unsigneg int rx_data  
/* Wait for data to be received */  
while ( !(UCSRA & (1<<RXC)) )  
;
/* Get and return received data from buffer */  
rx_data=EUDR;  
rx_data=rx_data<<8+UDR;  
return rx_data;  
}
Note:  
The example code assumes that the part specific header file is included.  
For I/O Registers located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI”  
instructions must be replaced with instructions that allow access to extended I/O. Typically “LDS”  
and “STS” combined with “SBRS”, “SBRC”, “SBR”, and “CBR”.  
19.5.3  
Receiving 17 Data Bit Frames  
In this configuration the seventeenth bit shoud be read from the RXB8 bit register, the rest of the  
most significant bits (9, 10, 11, 12, 13, 14, 15 and 16) should be read from the EUDR register,  
before the low byte of the character is read from UDR.  
19.5.4  
19.5.5  
Receive Complete Flag and Interrupt  
The EUSART Receiver has the same USART flag that indicates the Receiver state.  
See “Receive Complete Flag and Interrupt” in USART section.  
Receiver Error Flags  
When the EUSART is not configured in Manchester mode, the EUSART has the three same  
errors flags as standard mode: Frame Error (FE), Data OverRun (DOR) and Parity Error (UPE).  
All can be accessed by reading UCSRA. (See “Receiver Error Flags” in USART section).  
When the EUSART is configured in Machester mode, the EUSART has two errors flags: Data  
OverRun (DOR), and Manchester framing error (FEM bit of EUCSRC).  
219  
4317J–AVR–08/10  
 复制成功!