PIC16F883 Microchip Technology Inc., PIC16F883 Datasheet - Page 121

no-image

PIC16F883

Manufacturer Part Number
PIC16F883
Description
28/40/44-pin Flash-based, 8-bit Cmos Microcontrollers With Nanowatt Technology
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F883
Manufacturer:
台湾明智类比
Quantity:
20 000
Part Number:
PIC16F883-I/ML
Manufacturer:
MICROCHIP
Quantity:
1 200
Part Number:
PIC16F883-I/SO
Manufacturer:
MICROCHIP
Quantity:
8 820
Part Number:
PIC16F883-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F883-I/SO
0
Company:
Part Number:
PIC16F883-I/SO
Quantity:
27
Part Number:
PIC16F883-I/SP
Manufacturer:
MICROCHIP
Quantity:
3 000
Part Number:
PIC16F883-I/SP
Manufacturer:
MICROCHIP
Quantity:
18
Part Number:
PIC16F883-I/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F883-I/SP
0
Part Number:
PIC16F883-I/SS
Manufacturer:
ALPS
Quantity:
12 000
Part Number:
PIC16F883-I/SS
Manufacturer:
MICRPCHIP/PBF
Quantity:
197
Part Number:
PIC16F883-I/SS
Manufacturer:
MICROCHIP
Quantity:
8 000
Part Number:
PIC16F883-I/SS
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F883-I/SS
0
Company:
Part Number:
PIC16F883-I/SS
Quantity:
15 000
An example of the complete eight-word write sequence
is shown in Example 10-4. The initial address is loaded
into the EEADRH and EEADR register pair; the eight
words of data are loaded using indirect addressing.
EXAMPLE 10-4:
© 2007 Microchip Technology Inc.
; This write routine assumes the following:
;
; 1. A valid starting address (the least significant bits = ‘00’)is loaded in ADDRH:ADDRL
; 2. The 8 bytes of data are loaded, starting at the address in DATADDR
; 3. ADDRH, ADDRL and DATADDR are all located in shared data memory 0x70 - 0x7f
;
LOOP
BSF
BCF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
INCF
MOVF
MOVWF
INCF
BSF
BSF
BSF
BCF
BTFSC
GOTO
MOVLW
MOVWF
MOVLW
MOVWF
BSF
NOP
NOP
BCF
BSF
BCF
INCF
MOVF
ANDLW
XORLW
BTFSC
GOTO
STATUS,RP1
STATUS,RP0
ADDRH,W
EEADRH
ADDRL,W
EEADR
DATAADDR,W
FSR
INDF,W
EEDATA
FSR,F
INDF,W
EEDATH
FSR,F
STATUS,RP0
EECON1,EEPGD
EECON1,WREN
INTCON,GIE
INTCON,GIE
1-2
55h
EECON2
AAh
EECON2
EECON1,WR
EECON1,WREN
INTCON,GIE
STATUS,RP0
EEADR,F
EEADR,W
0x07
0x07
STATUS,Z
LOOP
WRITING TO FLASH PROGRAM MEMORY
;
; Bank 2
; Load initial address
;
;
;
; Load initial data address
;
; Load first data byte into lower
;
; Next byte
; Load second data byte into upper
;
;
; Bank 3
; Point to program memory
; Enable writes
; Disable interrupts (if using)
; See AN576
; Start of required write sequence:
; Write 55h
;
; Write AAh
; Set WR bit to begin write
; Any instructions here are ignored as processor
; halts to begin write sequence
; processor will stop here and wait for write complete
; after write processor continues with 3rd instruction
; Disable writes
; Enable interrupts (if using)
; Bank 2
; Increment address
; Check if lower two bits of address are ‘00’
; Indicates when four words have been programmed
;
; Exit if more than eight words,
; Continue if less than eight words
PIC16F882/883/884/886/887
Preliminary
DS41291D-page 119

Related parts for PIC16F883