PIC16LF1906-E/MV Microchip Technology, PIC16LF1906-E/MV Datasheet - Page 23

no-image

PIC16LF1906-E/MV

Manufacturer Part Number
PIC16LF1906-E/MV
Description
14KB Flash, 512B RAM, LCD, 11x10b ADC, EUSART, NanoWatt XLP 28 UQFN 4x4x0.5mm TU
Manufacturer
Microchip Technology
Series
PIC® XLP™ 16Fr
Datasheet

Specifications of PIC16LF1906-E/MV

Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
LIN, UART/USART
Peripherals
Brown-out Detect/Reset, LCD, POR, PWM, WDT
Number Of I /o
25
Program Memory Size
14KB (8K x 14)
Program Memory Type
FLASH
Eeprom Size
-
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Data Converters
A/D 11x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
28-UFQFN Exposed Pad
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
3.1.1
There are two methods of accessing constants in pro-
gram memory. The first method is to use tables of
RETLW instructions. The second method is to set an
FSR to point to the program memory.
3.1.1.1
The RETLW instruction can be used to provide access
to tables of constants. The recommended way to create
such a table is shown in
EXAMPLE 3-1:
The BRW instruction makes this type of table very sim-
ple to implement. If your code must remain portable
with previous generations of microcontrollers, then the
BRW instruction is not available so the older table read
method must be used.
3.1.1.2
The program memory can be accessed as data by set-
ting bit 7 of the FSRxH register and reading the match-
ing INDFx register. The MOVIW instruction will place the
lower 8 bits of the addressed word in the W register.
Writes to the program memory cannot be performed via
the INDF registers. Instructions that access the pro-
gram memory via the FSR require one extra instruction
cycle to complete.
ing the program memory via an FSR.
The HIGH directive will set bit<7> if a label points to a
location in program memory.
 2011 Microchip Technology Inc.
constants
my_function
BRW
RETLW DATA0
RETLW DATA1
RETLW DATA2
RETLW DATA3
;… LOTS OF CODE…
MOVLW
call constants
;… THE CONSTANT IS IN W
READING PROGRAM MEMORY AS
DATA
RETLW Instruction
Indirect Read with FSR
DATA_INDEX
Example 3-2
RETLW INSTRUCTION
Example
;Add Index in W to
;program counter to
;select data
;Index0 data
;Index1 data
demonstrates access-
3-1.
Preliminary
EXAMPLE 3-2:
constants
my_function
;THE PROGRAM MEMORY IS IN W
RETLW DATA0
RETLW DATA1
RETLW DATA2
RETLW DATA3
;… LOTS OF CODE…
MOVLW
MOVWF
MOVLW
MOVWF
MOVIW 0[INDF1]
PIC16LF1904/6/7
LOW constants
FSR1L
HIGH constants
FSR1H
ACCESSING PROGRAM
MEMORY VIA FSR
;Index0 data
;Index1 data
DS41569A-page 23

Related parts for PIC16LF1906-E/MV