PIC18FXX20
DS39583C-page 22 2010 Microchip Technology Inc.
4.3 Verify Configuration Bits
A configuration address may be read and output on
SDATA 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 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 EEADR:EEADRH) and a
data latch (EEDATA). Data EEPROM is read by loading
EEADR:EEADRH with the desired memory location
and initiating a memory read by appropriately
configuring the EECON1 register. The data will be
loaded into EEDATA, where it may be serially output on
SDATA 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 SCLK of the operand to
allow SDATA to transition from an input to an output.
During this time, SCLK must be held low (see
Figure 4-4).
The command sequence to read a single byte of data
is shown in Figure 4-2.
FIGURE 4-3: READ DATA EEPROM
FLOW
Start
Set
Address
Read
Byte
Done
No
Yes
Done
?
Move to TABLAT
Shift Out Data
2010 Microchip Technology Inc. DS39583C-page 23
PIC18FXX20
TABLE 4-2: READ DATA EEPROM MEMORY
FIGURE 4-4: SHIFT OUT DATA HOLDING REGISTER TIMING (0010)
4-Bit
Command
Data Payload Core Instruction
Step 1: Direct access to data EEPROM.
0000
0000
9E A6
9C A6
BCF EECON1, EEPGD
BCF EECON1, CFGS
Step 2: Set the data EEPROM Address Pointer.
0000
0000
0000
0000
0E <Addr>
6E A9
OE <AddrH>
6E AA
MOVLW <Addr>
MOVWF EEADR
MOVLW <AddrH>
MOVWF EEADRH
Step 3: Initiate a memory read.
0000 80 A6 BSF EECON1, RD
Step 4: Load data into the Serial Data Holding register.
0000
0000
0010
50 A8
6E F5
<LSB><MSB>
MOVF EEDATA, W, 0
MOVWF TABLAT
Shift Out Data
(1)
Note 1: The <LSB> is undefined. The <MSB> is the data.
1234
SCLK
P5
SDATA
SDATA = Input
Shift Data Out
P6
SDATA = Output
5678
1234
P5A
91011 13 15161412
Fetch Next 4-bit Command
0100
SDATA = Input
LSb
MSb
12
34
56
1234
nnnn
P14
PIC18FXX20
DS39583C-page 24 2010 Microchip Technology Inc.
4.5 Verify Data EEPROM
A data EEPROM address may be read via a sequence
of core instructions (4-bit command, ‘0000’) and then
output on SDATA via the 4-bit command, ‘0010’ (Shift
Out Data Holding register). The result may then be
immediately compared to the appropriate data in the
programmer’s memory for verification. Refer to
Section 4.4 for implementation details of reading data
EEPROM.
4.6 Blank Check
The term “Blank Check” means to verify that the device
has no programmed memory cells. All memories must
be verified: Code Memory, Data EEPROM, ID
Locations, and Configuration bits. The Device ID
registers (3FFFFEh:3FFFFFh) should be ignored.
A “blank” or “erased” memory cell will read as a ‘1’. So,
“Blank Checking” a device merely means to verify that
all bytes read as FFh, except the Configuration bits.
Unused (reserved) Configuration bits will read ‘0’
(programmed). Refer to Table 5-2 for blank
configuration expect data for the various PIC18FXX20
devices.
Given that “Blank Checking” is merely code and data
EEPROM verification with FFh expect data, refer to
Section 4.4 and Section 4.2 for implementation details.
FIGURE 4-5: BLANK CHECK FLOW
Yes
No
Start
Blank Check Device
Is
Device
Blank?
Continue
Abort

PIC18F8620-I/PT

Mfr. #:
Manufacturer:
Microchip Technology
Description:
8-bit Microcontrollers - MCU 64KB 3840 RAM 68I/O
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet