English
Language : 

PIC18F6390 Datasheet, PDF (91/412 Pages) Microchip Technology – 64/80-Pin Flash Microcontrollers with LCD Driver and nanoWatt Technology
PIC18F6390/6490/8390/8490
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
59
(TBLPTR<20:16>)
TBLPTRH Program Memory Table Pointer High Byte (TBLPTR<15:8>)
59
TBLPTRL Program Memory Table Pointer Low Byte (TBLPTR<7:0>)
59
TABLAT
Program Memory Table Latch
59
Legend: — = unimplemented, read as ‘0’. Shaded cells are not used during Flash access.
 2004 Microchip Technology Inc.
Preliminary
DS39629B-page 89