DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PIC18LF4331T-I/SP View Datasheet(PDF) - Microchip Technology

Part Name
Description
Manufacturer
PIC18LF4331T-I/SP Datasheet PDF : 392 Pages
First Prev 81 82 83 84 85 86 87 88 89 90 Next Last
PIC18F2331/2431/4331/4431
8.3 Reading the Flash Program
Memory
The TBLRD instruction is used to retrieve data from
program memory and place it into data RAM. Table
reads from program memory are performed one byte at
a time.
TBLPTR points to a byte address in program space.
Executing a TBLRD instruction places the byte pointed
to into TABLAT. In addition, TBLPTR can be modified
automatically for the next table read operation.
The internal program memory is typically organized by
words. The Least Significant bit of the address selects
between the high and low bytes of the word. Figure 8-4
shows the interface between the internal program
memory and the TABLAT.
FIGURE 8-4:
READS FROM FLASH PROGRAM MEMORY
Program Memory
(Even Byte Address) (Odd Byte Address)
Instruction Register
(IR)
FETCH
TBLPTR = xxxxx1
TBLPTR = xxxxx0
TBLRD
TABLAT
Read Register
EXAMPLE 8-1: READING A FLASH PROGRAM MEMORY WORD
READ_WORD
MOVLW
MOVWF
MOVLW
MOVWF
MOVLW
MOVWF
CODE_ADDR_UPPER
TBLPTRU
CODE_ADDR_HIGH
TBLPTRH
CODE_ADDR_LOW
TBLPTRL
TBLRD*+
MOVF TABLAT,W
MOVWF WORD_EVEN
TBLRD*+
MOVF TABLAT,W
MOVWF WORD_ODD
; Load TBLPTR with the base
; address of the word
; read into TABLAT and increment TBLPTR
; get data
; read into TABLAT and increment TBLPTR
; get data
2010 Microchip Technology Inc.
DS39616D-page 89

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]