Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.COM

X  

PIC12F683 Datasheet(PDF) 69 Page - Microchip Technology

Part # PIC12F683
Description  8-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
Download  148 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC12F683 Datasheet(HTML) 69 Page - Microchip Technology

Back Button PIC12F683 Datasheet HTML 65Page - Microchip Technology PIC12F683 Datasheet HTML 66Page - Microchip Technology PIC12F683 Datasheet HTML 67Page - Microchip Technology PIC12F683 Datasheet HTML 68Page - Microchip Technology PIC12F683 Datasheet HTML 69Page - Microchip Technology PIC12F683 Datasheet HTML 70Page - Microchip Technology PIC12F683 Datasheet HTML 71Page - Microchip Technology PIC12F683 Datasheet HTML 72Page - Microchip Technology PIC12F683 Datasheet HTML 73Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 69 / 148 page
background image
 2004 Microchip Technology Inc.
Preliminary
DS41211B-page 67
PIC12F683
10.2
Reading the EEPROM Data
Memory
To read a data memory location, the user must write the
address to the EEADR register and then set control bit
RD (EECON1<0>), as shown in Example 10-1. The
data is available, in the very next cycle, in the EEDAT
register. Therefore, it can be read in the next
instruction. EEDAT holds this value until another read,
or until it is written to by the user (during a write
operation).
EXAMPLE 10-1:
DATA EEPROM READ
10.3
Writing to the EEPROM Data
Memory
To write an EEPROM data location, the user must first
write the address to the EEADR register and the data
to the EEDAT register. Then the user must follow a
specific sequence to initiate the write for each byte, as
shown in Example 10-2.
EXAMPLE 10-2:
DATA EEPROM WRITE
The write will not initiate if the above sequence is not
exactly followed (write 55h to EECON2, write AAh to
EECON2, then set WR bit) for each byte. We strongly
recommend that interrupts be disabled during this
code segment. A cycle count is executed during the
required sequence. Any number that is not equal to the
required cycles to execute the required sequence will
prevent the data from being written into the EEPROM.
Additionally, the WREN bit in EECON1 must be set to
enable write. This mechanism prevents accidental
writes to data EEPROM due to errant (unexpected)
code execution (i.e., lost programs). The user should
keep the WREN bit clear at all times, except when
updating EEPROM. The WREN bit is not cleared
by hardware.
After a write sequence has been initiated, clearing the
WREN bit will not affect this write cycle. The WR bit will
be inhibited from being set unless the WREN bit is set.
At the completion of the write cycle, the WR bit is
cleared in hardware and the EE Write Complete
Interrupt Flag bit (EEIF) is set. The user can either
enable this interrupt or poll this bit. The EEIF bit
(PIR1<7>) must be cleared by software.
10.4
Write Verify
Depending on the application, good programming
practice may dictate that the value written to the data
EEPROM should be verified (see Example 10-3) to the
desired value to be written.
EXAMPLE 10-3:
WRITE VERIFY
10.4.1
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. The maximum endur-
ance for any EEPROM cell is specified as Dxxx. D120
or D120A specify a maximum number of writes to any
EEPROM location before a refresh is required of
infrequently changing memory locations.
10.4.1.1
EEPROM Endurance
A hypothetical data EEPROM is 64 bytes long and has
an endurance of 1M writes. It also has a refresh param-
eter of 10M writes. If every memory location in the cell
were written the maximum number of times, the data
EEPROM would fail after 64M write cycles. If every
memory location, save one, were written the maximum
number of times, the data EEPROM would fail after
63M write cycles but the one remaining location could
fail after 10M cycles. If proper refreshes occurred, then
the lone memory location would have to be refreshed
six times for the data to remain correct.
BSF
STATUS,RP0
;Bank 1
MOVLW
CONFIG_ADDR
;
MOVWF
EEADR
;Address to read
BSF
EECON1,RD
;EE Read
MOVF
EEDAT,W
;Move data to W
BSF
STATUS,RP0
;Bank 1
BSF
EECON1,WREN
;Enable write
BCF
INTCON,GIE
;Disable INTs
MOVLW
55h
;Unlock write
MOVWF
EECON2
;
MOVLW
AAh
;
MOVWF
EECON2
;
BSF
EECON1,WR
;Start the write
BSF
INTCON,GIE
;Enable INTS
BSF
STATUS,RP0
;Bank 1
MOVF
EEDAT,W
;EEDAT not changed
;from previous write
BSF
EECON1,RD
;YES, Read the
;value written
XORWF
EEDAT,W
BTFSS
STATUS,Z
;Is data the same
GOTO
WRITE_ERR
;No, handle error
:
;Yes, continue


Similar Part No. - PIC12F683

ManufacturerPart #DatasheetDescription
logo
Microchip Technology
PIC12F683 MICROCHIP-PIC12F683 Datasheet
782Kb / 78P
   Debug Header Specification
2006-2012
PIC12F683-E/MD MICROCHIP-PIC12F683-E/MD Datasheet
3Mb / 176P
   8-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
2007
PIC12F683-E/MDQTP MICROCHIP-PIC12F683-E/MDQTP Datasheet
3Mb / 176P
   8-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
2007
PIC12F683-E/MF MICROCHIP-PIC12F683-E/MF Datasheet
3Mb / 176P
   8-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
2007
PIC12F683-E/MFQTP MICROCHIP-PIC12F683-E/MFQTP Datasheet
3Mb / 176P
   8-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
2007
More results

Similar Description - PIC12F683

ManufacturerPart #DatasheetDescription
logo
Microchip Technology
PIC12F683 MICROCHIP-PIC12F683_07 Datasheet
3Mb / 176P
   8-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
2007
PIC16F636T-I MICROCHIP-PIC16F636T-I Datasheet
2Mb / 234P
   8/14-Pin, Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology
12/08/06
PIC16F636-I MICROCHIP-PIC16F636-I Datasheet
2Mb / 234P
   8/14-Pin, Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology
12/08/06
PIC12F635 MICROCHIP-PIC12F635_07 Datasheet
3Mb / 234P
   8/14-Pin, Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology
2007
PIC12F635 MICROCHIP-PIC12F635 Datasheet
3Mb / 196P
   8/14-PIN FLASH-BASED, 8-BIT CMOS MICROCONTROLLERS WITH NANOWATT TECHNOLOGY
2005
PIC16F628A-IP MICROCHIP-PIC16F628A-IP Datasheet
3Mb / 180P
   Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
03/26/09
PIC16F684 MICROCHIP-PIC16F684_07 Datasheet
3Mb / 192P
   14-Pin, Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology
2007
PIC16F627A MICROCHIP-PIC16F627A_05 Datasheet
2Mb / 180P
   Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
2005
PIC16F627A MICROCHIP-PIC16F627A_07 Datasheet
2Mb / 178P
   Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
2007
PIC16F627A MICROCHIP-PIC16F627A_09 Datasheet
3Mb / 180P
   Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
2009
More results


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




Privacy Policy
ALLDATASHEET.COM
Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Datasheet Upload   |   Contact us   |   Privacy Policy   |   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