欢迎访问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文件第19页浏览型号ATMEGA169PV的Datasheet PDF文件第20页浏览型号ATMEGA169PV的Datasheet PDF文件第21页浏览型号ATMEGA169PV的Datasheet PDF文件第22页浏览型号ATMEGA169PV的Datasheet PDF文件第24页浏览型号ATMEGA169PV的Datasheet PDF文件第25页浏览型号ATMEGA169PV的Datasheet PDF文件第26页浏览型号ATMEGA169PV的Datasheet PDF文件第27页  
ATmega169P  
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);  
}
The next code examples show assembly and C functions for reading the EEPROM. The exam-  
ples assume that interrupts are controlled so that no interrupts will occur during execution of  
these functions.  
23  
8018A–AVR–03/06  
 复制成功!