参数资料
型号: MF180C51C-25D
厂商: ATMEL CORP
元件分类: 微控制器/微处理器
英文描述: 8-BIT, MROM, 25 MHz, MICROCONTROLLER, PQFP44
封装: QFP-44
文件页数: 16/28页
文件大小: 6193K
代理商: MF180C51C-25D
23
2467X–AVR–06/11
ATmega128
The following code examples show one assembly and one C function for writing to the
EEPROM. The examples assume that interrupts are controlled (for example, by disabling inter-
rupts globally) 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);
}
相关PDF资料
PDF描述
MF280C51C-36R 8-BIT, MROM, 36 MHz, MICROCONTROLLER, PQFP44
MQ80C52TXXX-16SC 8-BIT, MROM, 16 MHz, MICROCONTROLLER, CQFP44
MQ80C52XXX-16P883D 8-BIT, MROM, 16 MHz, MICROCONTROLLER, CQFP44
MQ80C32-20SCD 8-BIT, 20 MHz, MICROCONTROLLER, CQFP44
MQ80C52TXXX-20/883D 8-BIT, MROM, 20 MHz, MICROCONTROLLER, CQFP44
相关代理商/技术参数
参数描述
MF183C151C-12 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MF183C151C-16 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MF183C151C-20 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MF183C151C-25 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MF183C151C-30 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller