|
PIC18F2X1X Datasheet, PDF (79/380 Pages) Microchip Technology – 28/40/44-PIN FLASH MICROCONTROLLERS WITH 10-BIT A/D AND NANO WATT TECHNOLOGY | |||
|
◁ |
PIC18F2X1X/4X1X
EXAMPLE 6-1: READING A FLASH PROGRAM MEMORY WORD
READ_WORD
MOVLW
MOVWF
MOVLW
MOVWF
MOVLW
MOVWF
TBLRD*+
MOVF
MOVWF
TBLRD*+
MOVF
MOVF
CODE_ADDR_UPPER
TBLPTRU
CODE_ADDR_HIGH
TBLPTRH
CODE_ADDR_LOW
TBLPTRL
TABLAT, W
WORD_EVEN
TABLAT, W
WORD_ODD
; Load TBLPTR with the base
; address of the word
; read into TABLAT and increment
; get data
; read into TABLAT and increment
; get data
TABLE 6-2: REGISTERS ASSOCIATED WITH READING PROGRAM FLASH MEMORY
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset
Values on
Page
TBLPTRU
â
â
bit 21 Program Memory Table Pointer Upper Byte
49
(TBLPTR<20:16>)
TBPLTRH Program Memory Table Pointer High Byte (TBLPTR<15:8>)
49
TBLPTRL Program Memory Table Pointer Low Byte (TBLPTR<7:0>)
49
TABLAT
Program Memory Table Latch
49
Legend: â = unimplemented, read as â0â. Shaded cells are not used during Flash access.
 2004 Microchip Technology Inc.
Preliminary
DS39636A-page 77
|
▷ |