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

ATMEGA48PA-CCU 参数 Datasheet PDF下载

ATMEGA48PA-CCU图片预览
型号: ATMEGA48PA-CCU
PDF下载: 下载PDF文件 查看货源
内容描述: [RISC Microcontroller, 8-Bit, FLASH, AVR RISC CPU, 20MHz, CMOS, PBGA32, 4 X 4 MM, 0.60 MM HEIGHT, 0.50 MM PITCH, GREEN, PLASTIC, UFBGA-32]
分类和应用: 闪存微控制器
文件页数/大小: 349 页 / 2752 K
品牌: ATMEL [ ATMEL ]
 浏览型号ATMEGA48PA-CCU的Datasheet PDF文件第164页浏览型号ATMEGA48PA-CCU的Datasheet PDF文件第165页浏览型号ATMEGA48PA-CCU的Datasheet PDF文件第166页浏览型号ATMEGA48PA-CCU的Datasheet PDF文件第167页浏览型号ATMEGA48PA-CCU的Datasheet PDF文件第169页浏览型号ATMEGA48PA-CCU的Datasheet PDF文件第170页浏览型号ATMEGA48PA-CCU的Datasheet PDF文件第171页浏览型号ATMEGA48PA-CCU的Datasheet PDF文件第172页  
extended I/O. Typically “LDS” and “STS” combined with “SBRS”, “SBRC”, “SBR”, and  
“CBR”.  
More advanced initialization routines can be made that include frame format as parame-  
ters, disable interrupts and so on. However, many applications use a fixed setting of the  
baud and control registers, and for these types of applications the initialization code can  
be placed directly in the main routine, or be combined with initialization code for other  
I/O modules.  
Data Transmission – The The USART Transmitter is enabled by setting the Transmit Enable (TXEN) bit in the  
UCSRnB Register. When the Transmitter is enabled, the normal port operation of the  
USART Transmitter  
TxDn 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 XCKn 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 UDRn 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, U2Xn bit or by XCKn  
depending on mode of operation.  
The following code examples show a simple USART transmit function based on polling  
of the Data Register Empty (UDREn) Flag. When using frames with less than eight bits,  
the most significant bits written to the UDRn are ignored. The USART has to be initial-  
ized 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 UCSRnA,UDREn  
rjmp USART_Transmit  
; Put data (r16) into buffer, sends the data  
out UDRn,r16  
ret  
C Code Example(1)  
void USART_Transmit( unsigned char data )  
{
/* Wait for empty transmit buffer */  
while ( !( UCSRnA & (1<<UDREn)) )  
;
/* Put data into buffer, sends the data */  
UDRn = data;  
}
Note:  
1. 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”,  
168  
ATmega48/88/168  
2545D–AVR–07/04  
 复制成功!