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

ATMEGA128L-8AL 参数 Datasheet PDF下载

ATMEGA128L-8AL图片预览
型号: ATMEGA128L-8AL
PDF下载: 下载PDF文件 查看货源
内容描述: [RISC Microcontroller, 8-Bit, FLASH, 8MHz, CMOS, PQFP64, 14 X 14 MM, 1 MM HEIGHT, 0.80 MM PITCH, PLASTIC, MS-026AEB, TQFP-64]
分类和应用: 时钟微控制器外围集成电路
文件页数/大小: 391 页 / 6192 K
品牌: ATMEL [ ATMEL ]
 浏览型号ATMEGA128L-8AL的Datasheet PDF文件第20页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第21页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第22页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第23页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第25页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第26页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第27页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第28页  
The following code examples show one assembly and one C function for writing to the  
EEPROM. The examples assume that interrupts are controlled (e.g., by disabling interrupts glo-  
bally) so that no interrupts will occur during execution of these functions. The examples also  
assume that no flash boot loader is present in the software. If such code is present, the  
EEPROM write function must also wait for any ongoing SPM command to finish.  
Assembly Code Example  
EEPROM_write:  
; Wait for completion of previous write  
sbic EECR,EEWE  
rjmp EEPROM_write  
; Set up address (r18:r17) in address register  
out EEARH, r18  
out EEARL, r17  
; Write data (r16) to data register  
out EEDR,r16  
; Write logical one to EEMWE  
sbi EECR,EEMWE  
; Start eeprom write by setting EEWE  
sbi EECR,EEWE  
ret  
C Code Example  
void EEPROM_write(unsigned int uiAddress, unsigned char ucData)  
{
/* Wait for completion of previous write */  
while(EECR & (1<<EEWE))  
;
/* Set up address and data registers */  
EEAR = uiAddress;  
EEDR = ucData;  
/* Write logical one to EEMWE */  
EECR |= (1<<EEMWE);  
/* Start eeprom write by setting EEWE */  
EECR |= (1<<EEWE);  
}
24  
ATmega128(L)  
2467P–AVR–08/07  
 复制成功!