參數(shù)資料
型號(hào): IT80C52EXXX-30SHXXX:R
廠商: TEMIC SEMICONDUCTORS
元件分類: 微控制器/微處理器
英文描述: 8-BIT, MROM, 30 MHz, MICROCONTROLLER, PQFP44
文件頁(yè)數(shù): 14/60頁(yè)
文件大?。?/td> 5137K
21
8266D-MCU Wireless-06/12
ATmega128RFA1
The subsequent code examples show assembly and C functions for programming the
EEPROM with separate and combined (atomic) erase/write operations respectively.
The examples assume that interrupts are controlled (e.g. by disabling interrupts
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 (Single Byte Programming)
EEPROM_write:
; Wait for completion of previous erase/write
sbic EECR,EEPE
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 is controlled with r20 and r21
ldi r20, (1<<EEMPE) + (2<<EEPM0)
ldi r21, (1<<EEMPE) + (1<<EEPE) + (2<<EEPM0)
; Start eeprom write
out EECR, r20
out EECR, r21
ret
EEPROM_erase:
; Wait for completion of previous erase/write
sbic EECR,EEPE
rjmp EEPROM_erase
; Set up address (r18:r17) in address register
out EEARH, r18
out EEARL, r17
; Set EEDR to 0xff
ser r16
out EEDR,r16
; Erase is controlled with r20 and r21
ldi r20, (1<<EEMPE) + (1<<EEPM0)
ldi r21, (1<<EEMPE) + (1<<EEPE) + (1<<EEPM0)
; Start eeprom erase
out EECR, r20
out EECR, r21
ret
; main program
ldi r17, addr_low
ldi r18, addr_high
call EEPROM_erase
ldi r16, ee_data
相關(guān)PDF資料
PDF描述
MC80C52CXXX-20/883D 8-BIT, MROM, 20 MHz, MICROCONTROLLER, CDIP40
MR80C52CXXX-25SB 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQCC44
MR80C52UXXX-25 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQCC44
IS80C32U-S 8-BIT, 20 MHz, MICROCONTROLLER, PQCC44
IV80C52UXXX-S 8-BIT, MROM, 20 MHz, MICROCONTROLLER, PQFP44
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
IT80F 制造商:未知廠家 制造商全稱:未知廠家 功能描述:TRIAC|50V V(DRM)|8A I(T)RMS|TO-220
IT80G 制造商:未知廠家 制造商全稱:未知廠家 功能描述:TRIAC|50V V(DRM)|8A I(T)RMS|TO-220
IT810B 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Analog IC
IT8152FG 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Specification|Errata_v0.1 for it8152fg_v0.3.4
IT8172G 制造商:未知廠家 制造商全稱:未知廠家 功能描述:RISC Companion Chip|Errata v0.2 for it8172g_v0.6