PIC18F2220 MICROCHIP [Microchip Technology], PIC18F2220 Datasheet - Page 77

no-image

PIC18F2220

Manufacturer Part Number
PIC18F2220
Description
28/40/44-Pin High-Performance, Enhanced Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F2220-E/SO
Manufacturer:
MIC
Quantity:
20 000
Part Number:
PIC18F2220-I/SO
Manufacturer:
MICROCH
Quantity:
20 000
Part Number:
PIC18F2220-I/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F2220T-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
6.3
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.
FIGURE 6-4:
EXAMPLE 6-1:
 2003 Microchip Technology Inc.
READ_WORD
Reading the Flash Program
Memory
Instruction Register
MOVLW
MOVWF
MOVLW
MOVWF
MOVLW
MOVWF
TBLRD*+
MOVFW
MOVWF
TBLRD*+
MOVFW
MOVWF
(IR)
READS FROM FLASH PROGRAM MEMORY
READING A FLASH PROGRAM MEMORY WORD
CODE_ADDR_UPPER
TBLPTRU
CODE_ADDR_HIGH
TBLPTRH
CODE_ADDR_LOW
TBLPTRL
TABLAT
WORD_EVEN
TABLAT
WORD_ODD
Odd (High) Byte
PIC18F2220/2320/4220/4320
Program Memory
; 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
Even (Low) Byte
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 6-4
shows the interface between the internal program
memory and the TABLAT.
TBLPTR
LSB = 1
Read Register
TABLAT
DS39599C-page 75
TBLPTR
LSB = 0

Related parts for PIC18F2220