Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

PIC16F628A-I/ML Datasheet(PDF) 94 Page - Microchip Technology

Part # PIC16F628A-I/ML
Description  FLASH-Based 8-Bit CMOS Microcontrollers
PDF  168 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F628A-I/ML Datasheet(HTML) 94 Page - Microchip Technology

Back Button PIC16F628A-I/ML Datasheet HTML 90Page - Microchip Technology PIC16F628A-I/ML Datasheet HTML 91Page - Microchip Technology PIC16F628A-I/ML Datasheet HTML 92Page - Microchip Technology PIC16F628A-I/ML Datasheet HTML 93Page - Microchip Technology PIC16F628A-I/ML Datasheet HTML 94Page - Microchip Technology PIC16F628A-I/ML Datasheet HTML 95Page - Microchip Technology PIC16F628A-I/ML Datasheet HTML 96Page - Microchip Technology PIC16F628A-I/ML Datasheet HTML 97Page - Microchip Technology PIC16F628A-I/ML Datasheet HTML 98Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 94 / 168 page
background image
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
EEADR
; Start at address 0
bcf
EECON1,CFGS
; Set for memory
bcf
EECON1,EEPGD
; Set for Data EEPROM
bcf
INTCON,GIE
; Disable interrupts
bsf
EECON1,WREN
; Enable writes
Loop
; Loop to refresh array
bsf
EECON1,RD
; Read current address
movlw
55h
;
movwf
EECON2
; Write 55h
movlw
AAh
;
movwf
EECON2
; Write AAh
bsf
EECON1,WR
; Set WR bit to begin write
btfsc
EECON1,WR
; Wait for write to complete
bra
$-2
incfsz
EEADR,F
; Increment address
bra
Loop
; Not zero, do it again
bcf
EECON1,WREN
; Disable writes
bsf
INTCON,GIE
; 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
—
—
—
—
WRERR
WREN
WR
RD
---- x000
---- q000
9Dh
EECON2(1)
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.
Note
1: EECON2 is not a physical register



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com