Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.COM

X  

PIC16F84A Datasheet(PDF) 34 Page - Microchip Technology

Part # PIC16F84A
Description  18-pin Flash/EEPROM 8-Bit Microcontrollers
Download  124 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F84A Datasheet(HTML) 34 Page - Microchip Technology

Back Button PIC16F84A Datasheet HTML 30Page - Microchip Technology PIC16F84A Datasheet HTML 31Page - Microchip Technology PIC16F84A Datasheet HTML 32Page - Microchip Technology PIC16F84A Datasheet HTML 33Page - Microchip Technology PIC16F84A Datasheet HTML 34Page - Microchip Technology PIC16F84A Datasheet HTML 35Page - Microchip Technology PIC16F84A Datasheet HTML 36Page - Microchip Technology PIC16F84A Datasheet HTML 37Page - Microchip Technology PIC16F84A Datasheet HTML 38Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 34 / 124 page
background image
PIC16F8X
DS30430C-page 34
© 1998 Microchip Technology Inc.
7.2
EECON1 and EECON2 Registers
EECON1 is the control register with five low order bits
physically implemented. The upper-three bits are non-
existent and read as '0's.
Control bits RD and WR initiate read and write,
respectively. These bits cannot be cleared, only set, in
software. They are cleared in hardware at completion of
the read or write operation. The inability to clear the WR
bit in software prevents the accidental, premature ter-
mination of a write operation.
The WREN bit, when set, will allow a write operation.
On power-up, the WREN bit is clear. The WRERR bit is
set when a write operation is interrupted by a MCLR
reset or a WDT time-out reset during normal operation.
In these situations, following reset, the user can check
the WRERR bit and rewrite the location. The data and
address will be unchanged in the EEDATA and
EEADR registers.
Interrupt flag bit EEIF is set when write is complete. It
must be cleared in software.
EECON2 is not a physical register. Reading EECON2
will read all '0's. The EECON2 register is used
exclusively in the Data EEPROM write sequence.
7.3
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>). The data is available, in the very
next cycle, in the EEDATA register; therefore it can be
read in the next instruction. EEDATA will hold this value
until another read or until it is written to by the user
(during a write operation).
EXAMPLE 7-1:
DATA EEPROM READ
BCF
STATUS, RP0
; Bank 0
MOVLW
CONFIG_ADDR
;
MOVWF
EEADR
; Address to read
BSF
STATUS, RP0
; Bank 1
BSF
EECON1, RD
; EE Read
BCF
STATUS, RP0
; Bank 0
MOVF
EEDATA, W
; W = EEDATA
7.4
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 EEDATA register. Then the user must follow a
specific sequence to initiate the write for each byte.
EXAMPLE 7-1:
DATA EEPROM WRITE
BSF
STATUS, RP0
; Bank 1
BCF
INTCON, GIE
; Disable INTs.
BSF
EECON1, WREN ; Enable Write
MOVLW
55h
;
MOVWF
EECON2
; Write 55h
MOVLW
AAh
;
MOVWF
EECON2
; Write AAh
BSF
EECON1,WR
; Set WR bit
;
begin write
BSF
INTCON, GIE
; Enable INTs.
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.
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. EEIF must be
cleared by software.


Similar Part No. - PIC16F84A

ManufacturerPart #DatasheetDescription
logo
Microchip Technology
PIC16F84A MICROCHIP-PIC16F84A Datasheet
494Kb / 68P
   18-pin Enhanced Flash/EEPROM 8-Bit Microcontroller
1999
PIC16F84A MICROCHIP-PIC16F84A Datasheet
1Mb / 88P
   18-pin Enhanced FLASH/EEPROM 8-bit Microcontroller
2001
PIC16F84A MICROCHIP-PIC16F84A Datasheet
1Mb / 90P
   18-pin Enhanced FLASH/EEPROM 8-Bit Microcontroller
11/29/12 2001-2013
PIC16F84A MICROCHIP-PIC16F84A Datasheet
1Mb / 90P
   18-pin Enhanced FLASH/EEPROM 8-Bit Microcontroller
11/29/12
PIC16F84A MICROCHIP-PIC16F84A Datasheet
1Mb / 337P
   8-Bit CMOS Microcontrollers
01/18/02
More results

Similar Description - PIC16F84A

ManufacturerPart #DatasheetDescription
logo
Microchip Technology
PIC16F8X MICROCHIP-PIC16F8X_99 Datasheet
1Mb / 124P
   18-pin Flash/EEPROM 8-Bit Microcontrollers
1998 - 1999
PIC16F8X MICROCHIP-PIC16F8X_13 Datasheet
1Mb / 128P
   18-pin Flash/EEPROM 8-Bit Microcontrollers
11/29/12 1996-2013
PIC16F84A-04-P MICROCHIP-PIC16F84A-04-P Datasheet
1Mb / 90P
   18-pin Enhanced FLASH/EEPROM 8-Bit Microcontroller
11/29/12
PIC16F84A MICROCHIP-PIC16F84A Datasheet
494Kb / 68P
   18-pin Enhanced Flash/EEPROM 8-Bit Microcontroller
1999
35007B MICROCHIP-35007B Datasheet
1Mb / 88P
   18-pin Enhanced FLASH/EEPROM 8-bit Microcontroller
2001
PIC16F84A MICROCHIP-PIC16F84A_07 Datasheet
1Mb / 88P
   18-pin Enhanced FLASH/EEPROM 8-bit Microcontroller
2001
PIC16F84A MICROCHIP-PIC16F84A_13 Datasheet
1Mb / 90P
   18-pin Enhanced FLASH/EEPROM 8-Bit Microcontroller
11/29/12 2001-2013
PIC12F1501-I MICROCHIP-PIC12F1501-I Datasheet
3Mb / 278P
   8-Pin Flash, 8-Bit Microcontrollers
08/02/11
PIC12LF1552 MICROCHIP-PIC12LF1552 Datasheet
4Mb / 260P
   8-Pin Flash, 8-Bit Microcontrollers
2013
PIC12F519 MICROCHIP-PIC12F519_08 Datasheet
1Mb / 96P
   8-Pin, 8-Bit Flash Microcontrollers
2008
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