參數(shù)資料
型號(hào): ATMEGA329P
廠商: Atmel Corp.
元件分類: 8位微控制器
英文描述: -bit AVR Microcontroller with 8K Bytes In- System Programmable Flash
中文描述: 位AVR微控制器具有8K字節(jié)的系統(tǒng)內(nèi)可編程閃存
文件頁數(shù): 27/83頁
文件大?。?/td> 8336K
代理商: ATMEGA329P
25
8021G–AVR–03/11
ATmega329P/3290P
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.
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);
}
相關(guān)PDF資料
PDF描述
ATMEGA324P -bit AVR Microcontroller with 8K Bytes In- System Programmable Flash
ATMEGA644P -bit AVR Microcontroller with 8K Bytes In- System Programmable Flash
ATMEGA3250P -bit AVR Microcontroller with 8K Bytes In- System Programmable Flash
ATMEGA325P -bit AVR Microcontroller with 8K Bytes In- System Programmable Flash
ATTINY24 8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
ATMEGA329P_06 制造商:ATMEL 制造商全稱:ATMEL Corporation 功能描述:8-bit Microcontroller with 32K Bytes In-System Programmable Flash
ATMEGA329P_07 制造商:ATMEL 制造商全稱:ATMEL Corporation 功能描述:8-bit Microcontroller with 32K Bytes In-System Programmable Flash
ATMEGA329P_08 制造商:ATMEL 制造商全稱:ATMEL Corporation 功能描述:8-bit Microcontroller with 32K Bytes In-System Programmable Flash
ATMEGA329P_09 制造商:ATMEL 制造商全稱:ATMEL Corporation 功能描述:8-bit Microcontroller with 32K Bytes In-System Programmable Flash
ATMEGA329P_1 制造商:ATMEL 制造商全稱:ATMEL Corporation 功能描述:8-bit Microcontroller with 32K Bytes In-System Programmable Flash