參數(shù)資料
型號: 16F628
廠商: Microchip Technology Inc.
英文描述: CAT 5E CROSSOVER PATCH CORD CABLE BLUE 1 FT
中文描述: 基于閃存的8位CMOS微控制器
文件頁數(shù): 94/168頁
文件大?。?/td> 3760K
代理商: 16F628
PIC16F627A/628A/648A
DS40044A-page 92
Preliminary
2002 Microchip Technology Inc.
13.7
Using the Data EEPROM
The data EEPROM is a high endurance, byte address-
able array that has been optimized for the storage of
frequently changing information (e.g., program vari-
ables or other data that are updated often). Frequently
changing values will typically be updated more often
than specification D124. If this is not the case, an array
refresh must be performed. For this reason, variables
that change infrequently (such as constants, IDs, cali-
bration, etc.) should be stored in FLASH program
memory.
A simple data EEPROM refresh routine is shown in
Example 13-4.
EXAMPLE 13-4:
DATA EEPROM REFRESH ROUTINE
13.8
DATA EEPROM OPERATION
DURING CODE PROTECT
When the device is code protected, the CPU is able to
read and write data to the Data EEPROM.
TABLE 13-1:
REGISTERS/BITS ASSOCIATED WITH DATA EEPROM
Note:
If data EEPROM is only used to store con-
stants and/or data that changes rarely, an
array refresh is likely not required. See
specification D124.
clrf
bcf
bcf
bcf
bsf
EEADR
EECON1,CFGS
EECON1,EEPGD
INTCON,GIE
EECON1,WREN
; Start at address 0
; Set for memory
; Set for Data EEPROM
; Disable interrupts
; Enable writes
; Loop to refresh array
; Read current address
;
; Write 55h
;
; Write AAh
; Set WR bit to begin write
; Wait for write to complete
Loop
bsf
movlw
movwf
movlw
movwf
bsf
btfsc
bra
incfsz
bra
EECON1,RD
55h
EECON2
AAh
EECON2
EECON1,WR
EECON1,WR
$-2
EEADR,F
Loop
; Increment address
; Not zero, do it again
bcf
bsf
EECON1,WREN
INTCON,GIE
; Disable writes
; Enable interrupts
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
Power-on
Reset
Value on all
other
RESETS
9Ah
EEDATA
EEPROM data register
xxxx xxxx
uuuu uuuu
9Bh
EEADR
EEPROM address register
xxxx xxxx
uuuu uuuu
9Ch
EECON1
EECON2
(1)
WRERR
WREN
WR
RD
---- x000
---- q000
9Dh
EEPROM control register 2
---- ----
---- ----
Legend:
x = unknown, u = unchanged, - = unimplemented read as '0', q = value depends upon condition.
Shaded cells are not used by data EEPROM.
EECON2 is not a physical register
Note
1:
相關(guān)PDF資料
PDF描述
16M0 PC SERIAL MODEM CBL 50 FT
16M0B APPLE IIC CABLE TO IWRTR MODEM
16M0BC KEYBD.EXT. MINI DIN 4 MM 6 FT
16M0BS KEYBD.EXT. MINI DIN 4 MM 10 FT
16M0D MINI DIN 8, MALE-MALE 10 FT.
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
16F630 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:14-Pin FLASH-Based 8-Bit CMOS Microcontrollers
16F684-I 制造商:Microchip Technology Inc 功能描述:
16F6H 制造商:EDAL 制造商全稱:EDAL 功能描述:Silicon High Voltage Assembly
16F6H1 制造商:EDAL 制造商全稱:EDAL 功能描述:Silicon High Voltage Assembly
16F7674 制造商:未知廠家 制造商全稱:未知廠家 功能描述:SMD TWEEZER HEAD