PIC12F1516 MICROCHIP [Microchip Technology], PIC12F1516 Datasheet - Page 108

no-image

PIC12F1516

Manufacturer Part Number
PIC12F1516
Description
28/40/44-Pin Flash Microcontrollers with nanoWatt XLP Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
PIC16(L)F1516/7/8/9
11.4
Instead of accessing program memory, the User ID’s,
Device ID/Revision ID and Configuration Words can be
accessed when CFGS = 1 in the PMCON1 register.
This is the region that would be pointed to by
PC<15> = 1, but not all addresses are accessible.
Different access may exist for reads and writes. Refer
to
When read access is initiated on an address outside
the
PMDATH:PMDATL register pair is cleared, reading
back ‘0’s.
TABLE 11-2:
EXAMPLE 11-4:
DS41452B-page 108
* This code block will read 1 word of program memory at the memory address:
*
*
Table
PROG_ADDR_LO (must be 00h-08h) data will be returned in the variables;
PROG_DATA_HI, PROG_DATA_LO
BANKSEL
MOVLW
MOVWF
CLRF
BSF
BCF
BSF
NOP
NOP
BSF
MOVF
MOVWF
MOVF
MOVWF
parameters
11-2.
User ID, Device ID and
Configuration Word Access
8000h-8003h
8007h-8008h
Address
8006h
PMADRL
PROG_ADDR_LO
PMADRL
PMADRH
PMCON1,CFGS
INTCON,GIE
PMCON1,RD
INTCON,GIE
PMDATL,W
PROG_DATA_LO
PMDATH,W
PROG_DATA_HI
USER ID, DEVICE ID AND CONFIGURATION WORD ACCESS (CFGS = 1)
listed
CONFIGURATION WORD AND DEVICE ID ACCESS
in
Configuration Words 1 and 2
Table
Device ID/Revision ID
; Select correct Bank
;
; Store LSB of address
; Clear MSB of address
; Select Configuration Space
; Disable interrupts
; Initiate read
; Executed (See
; Ignored (See
; Restore interrupts
; Get LSB of word
; Store in user location
; Get MSB of word
; Store in user location
11-2,
Function
User IDs
Preliminary
the
Figure
Figure
11-2)
11-2)
Read Access
Yes
Yes
Yes
 2011 Microchip Technology Inc.
Write Access
Yes
No
No

Related parts for PIC12F1516