User manual

MPLAB
®
PM3 User’s Guide
DS51464C-page 60 © 2006 Microchip Technology Inc.
7.4.6 Read
To copy the firmware from a programmed PIC MCU device into an unprogrammed
device, read the programmed firmware (program memory, Configuration bits, etc.) into
MPLAB IDE, then program the new device based on this information.
To read the entire device (i.e., all of program memory, Configuration bits, etc.), click
Programmer>Read
.
To read selectively (e.g., part of program memory, only Configuration bits), select
Programmer>Settings>Memory Ranges
to display the Memory Ranges dialog. Select
the options to be read, then click OK in this dialog. Areas that are grayed out are not
available on the device. Then, select Programmer>Read
. The memory area
corresponding to the checked boxes will be read.
Once the Read is complete, the Program Memory window will display the data read
from the device master. Save that data as a hex file and insert a new device into
MPLAB PM3 to copy that same data into a new device, or modify the data in MPLAB
IDE before saving to a hex file or program another device.
Attempting to read a code-protected device displays a warning indicating that the
device is code-protected, and that the program memory may be invalid. If this happens,
obtain the original hex code from a file or a non-protected device.
If an MPLAB ICE emulator is connected to MPLAB IDE, the code will be downloaded
to the emulated program memory of the MPLAB ICE. If a project is open, the system
asks if you want to close it before reading memory from a device.
7.4.7 Blank Check All
After inserting the device in the socket, select Programmer>Blank Check All from the
MPLAB PM3 menu. This check will verify that the device is completely blank (all bits
are set to
1) and all Configuration bits are set to the default value.
When complete, the results will be displayed in the Output window, for example:
Configuration memory is blank.
EEData memory is blank.
ID memory is blank.
Program memory is blank.
If using a One-Time Programmable (OTP) device, some Configuration bits (e.g.,
oscillator bits) might have already been programmed at the factory. Make sure the
Configuration bits are set to the factory settings and select Programmer>Blank
Check OTP. This will check that all program memory bits are set to 1, and that the
Configuration bits match the value in the dialog. An OTP device cannot be erased and
reprogrammed.
Note: If the project is kept open, the Absolute Listing window and the Source
Code window may not match the data previously read into the Program
Memory window. Symbols may not match the proper addresses in the
Program Memory window.