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

ATMEGA32L-8AUR 参数 Datasheet PDF下载

ATMEGA32L-8AUR图片预览
型号: ATMEGA32L-8AUR
PDF下载: 下载PDF文件 查看货源
内容描述: [RISC Microcontroller, 8-Bit, FLASH, AVR RISC CPU, 8MHz, CMOS, PQFP44, 10 X 10 MM, 1 MM HEIGHT, 0.80 MM PITCH, GREEN, PLASTIC, MS-026ACB, TQFP-44]
分类和应用: 闪存微控制器
文件页数/大小: 347 页 / 3171 K
品牌: ATMEL [ ATMEL ]
 浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第143页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第144页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第145页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第146页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第148页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第149页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第150页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第151页  
ATmega32(L)  
Data Transmission – The The USART Transmitter is enabled by setting the Transmit Enable (TXEN) bit in the  
UCSRB Register. When the Transmitter is enabled, the normal port operation of the  
USART Transmitter  
TxD pin is overridden by the USART and given the function as the transmitter’s serial  
output. The baud rate, mode of operation and frame format must be set up once before  
doing any transmissions. If synchronous operation is used, the clock on the XCK pin will  
be overridden and used as transmission clock.  
Sending Frames with 5 to 8  
Data Bit  
A data transmission is initiated by loading the transmit buffer with the data to be trans-  
mitted. The CPU can load the transmit buffer by writing to the UDR I/O location. The  
buffered data in the transmit buffer will be moved to the Shift Register when the Shift  
Register is ready to send a new frame. The Shift Register is loaded with new data if it is  
in idle state (no ongoing transmission) or immediately after the last stop bit of the previ-  
ous frame is transmitted. When the Shift Register is loaded with new data, it will transfer  
one complete frame at the rate given by the Baud Register, U2X bit or by XCK depend-  
ing on mode of operation.  
The following code examples show a simple USART transmit function based on polling  
of the Data Register Empty (UDRE) Flag. When using frames with less than eight bits,  
the most significant bits written to the UDR are ignored. The USART has to be initialized  
before the function can be used. For the assembly code, the data to be sent is assumed  
to be stored in Register R16  
Assembly Code Example(1)  
USART_Transmit:  
; Wait for empty transmit buffer  
sbis UCSRA,UDRE  
rjmp USART_Transmit  
; Put data (r16) into buffer, sends the data  
out  
ret  
UDR,r16  
C Code Example(1)  
void USART_Transmit( unsigned char data )  
{
/* Wait for empty transmit buffer */  
while ( !( UCSRA & (1<<UDRE)) )  
;
/* Put data into buffer, sends the data */  
UDR = data;  
}
Note:  
1. See “About Code Examples” on page 7.  
The function simply waits for the transmit buffer to be empty by checking the UDRE  
Flag, before loading it with new data to be transmitted. If the Data Register Empty Inter-  
rupt is utilized, the interrupt routine writes the data into the buffer.  
147  
2503J–AVR–10/06  
 复制成功!