English
Language : 

PIC18FXXK80 Datasheet, PDF (32/52 Pages) Microchip Technology – Flash Microcontroller Programming Specification
PIC18FXXK80 FAMILY
4.3 Verify Configuration Bits
A configuration address may be read and output on
PGD via the 4-bit command, ‘1001’. Configuration data
is read and written in a byte-wise fashion, so it is not
necessary to merge two bytes into a word prior to a
compare. The result may then be immediately
compared to the appropriate configuration data in the
programmer’s memory for verification. Refer to
Section 4.1 “Read Code Memory, ID Locations and
Configuration Bits” for implementation details of
reading configuration data.
4.4 Read Data EEPROM Memory
Data EEPROM is accessed, one byte at a time, via an
Address Pointer (register pair, EEADRH:EEADR) and
a Data Latch (EEDATA). Data EEPROM is read by
loading EEADRH:EEADR with the desired memory
location and initiating a memory read by appropriately
configuring the EECON1 register (Register 3-1). The
data will be loaded into EEDATA, where it may be
serially output on PGD via the 4-bit command, ‘0010’
(Shift Out Data Holding register). A delay of P6 must be
introduced after the falling edge of the 8th PGC of the
operand to allow PGD to transition from an input to an
output. During this time, PGC must be held low (see
Figure 4-4).
The command sequence to read a single byte of data
is shown in Table 4-2.
FIGURE 4-3:
READ DATA EEPROM
FLOW
Start
Set
Address
Read
Byte
Move to TABLAT
Shift Out Data
No
Done?
Yes
Done
TABLE 4-2: READ DATA EEPROM MEMORY
4-Bit
Command
Data Payload
Core Instruction
Step 1: Direct access to data EEPROM.
0000
0000
9E 7F
9C 7F
BCF EECON1, EEPGD
BCF EECON1, CFGS
Step 2: Set the data EEPROM Address Pointer.
0000
0000
0000
0000
0E <Addr>
6E 74
OE <AddrH>
6E 75
MOVLW
MOVWF
MOVLW
MOVWF
<Addr>
EEADR
<AddrH>
EEADRH
Step 3: Initiate a memory read.
0000
80 7F
BSF EECON1, RD
Step 4: Load data into the Serial Data Holding register.
0000
0000
0000
0010
50 73
6E F5
00 00
<MSB><LSB>
MOVF EEDATA, W, 0
MOVWF TABLAT
NOP
Shift Out Data(1)
Note 1: The <LSB> is undefined; the <MSB> is the data.
DS39972B-page 32
 2011 Microchip Technology Inc.