參數資料
型號: MR80C52TXXX-30SBD
廠商: ATMEL CORP
元件分類: 微控制器/微處理器
英文描述: 8-BIT, MROM, 30 MHz, MICROCONTROLLER, CQCC44
封裝: LCC-44
文件頁數: 41/141頁
文件大?。?/td> 7628K
代理商: MR80C52TXXX-30SBD
22
2486AA–AVR–02/2013
ATmega8(L)
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描述
MQ80C52EXXX-36/883D 8-BIT, MROM, 36 MHz, MICROCONTROLLER, CQFP44
MD83C154CXXX-16P883D 8-BIT, MROM, 16 MHz, MICROCONTROLLER, CDIP40
MR83C154CXXX-25P883R 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQCC44
MR83C154XXX-25/883D 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQCC44
MD80C32E-16/883 8-BIT, 16 MHz, MICROCONTROLLER, CDIP40
相關代理商/技術參數
參數描述
MR80C86 制造商:INTERSIL 制造商全稱:Intersil Corporation 功能描述:CMOS 16-Bit Microprocessor
MR80C86/B 制造商:Rochester Electronics LLC 功能描述:- Bulk 制造商:Harris Corporation 功能描述:Microprocessor, 16 Bit, 44 Pin, Ceramic, LCC
MR80C86-2 制造商:INTERSIL 制造商全稱:Intersil Corporation 功能描述:CMOS 16-Bit Microprocessor
MR80C86-2/883 制造商:Rochester Electronics LLC 功能描述:- Bulk
MR80C86-2/B 制造商:Intersil Corporation 功能描述:MPU 80C86 16BIT CMOS 8MHZ 44PLCC - Rail/Tube