EasyProg(tm) Programmer User's Guide 20 November 2005 This document describes how to set up and operate a fully assembled EasyProg PIC Programmer. The purpose of the EasyProg programmer is to "program" data into Microchip PIC microcontrollers (PIC is a registered trademark of Microchip Technology Inc). Setup the Hardware To set up the programmer hardware, do the following: 1) Connect the main unit to your computer with the serial cable. The cable can only be connected one way. The female end of the cable connects to a 9 pin serial port (COM port on PC systems) on the computer, and the other end connects to the 9 pin female port on the main unit. 2) Connect the power supply to the main unit. Push the small round plug on the end of the power supply cord into the socket in the back left corner of the main unit. 3) Plug the power supply into a normal AC power outlet. The EasyProg programmer should now be powered on. The green STATUS light should be lit dimly. Setup the Software Go to the web site http://www.embedinc.com/picprg/sw.htm and follow the directions for downloading and installing the software. Verify the Setup The directions in this section assume that the hardware and software have been set up as described in the previous sections. To verify the hardware and software setup, make sure you are running a command shell and enter: pic_prog at the command prompt. This should report the EasyProg firmware version and the name of the organization that created it. It should also indicate that no target chip is plugged into the programming socket. Now plug one of the supported PICs into the programming socket by following these steps. 1) Flip the lever on the ZIF socket into the vertical position. This will open all the pins allowing for easy insertion and removal of a target chip. 2) Insert the target chip into the ZIF socket. The target chip pin 1 is always inserted into the socket pin 1. The pin 1 end of the target chip is usually marked with a semi-cicular notch, or a dimple at pin 1, or something similar. The socket pin 1 is the pin in the corner closest to the lever. 3) Flip the ZIF socket lever down. This will close the socket pins and clamp the target chip into place. Now run the PIC_PROG program again by entering: pic_prog at the command prompt as before. The PIC_PROG program should again start by displaying the firmware version. This time it should identify the particular target chip type and revision. It should also report "No errors" and the elasped time. Status Light The status light is the green LED labeled "Status" near the ZIF socket lever. It indicates 5 different states: Unlit No power is applied to the unit. A target chip may be removed from or inserted into the programming socket. Dimly but solidly lit Idle state. The unit is powered on, but otherwise inactive. A target chip may be removed from or inserted into the programming socket. Flashing at 4 Herz, brightness is low. The host is communicating with the unit, but the target chip is not powered up. Do not insert or remove a target chip from the socket in this state. Flashing at 2 Herz, brightness is medium. The target chip is powered up. Communication with the target chip may be in progress, but the target is not being written to (no permanent target state changes are being made). This is the normal display during verification or data readback. Do not insert or remove a target chip from the socket in this state. Flashing at 1 Herz, brightness is high. The target chip is being actively written to. This is the normal display during a "programming" operation. Do not insert or remove a target chip from the socket in this state. The status diplays have been deliberately selected so that obvious flashing indicates a target chip should not be inserted into or removed from the programming socket. Doing so while the status light is flashing may permanently damage the target chip. A target chip may be removed or inserted when the status light is solid, including completely off. DBG Jumper This is two posts labeled "J1" and "DBG" near the right side of the board just behind the five programming line pads. This jumper should be left open for normal operation. A jumper may be installed over these pins to short them together. This disables the 5 second host command stream timeout. The host timeout is described in detail in the protocol specification, which is in the PICPRG_PROT documentation file in the DOC directory within the software installation directory. The host timeout is an important feature which allows the unit to recover if the host program is aborted or the host connection broken during a command. With the host timeout disabled, the unit must be powered down and back up to resume normal operation in such a case. We therefore recommend that the debug jumper not be connected during normal operation. The debug pins are provided to aid in debugging host software. More than 5 second gaps can easily occur in the host command stream while single stepping the host application with a debugger. In such cases it would be undesirable for the unit to abort the current command and reset, and installing the debug jumper can prevent this. Remember to remove the jumper when done debugging because normal operation is less robust with the jumper installed. Operation The EasyProg programmer is operated by making sure is it powered on and connected to the host computer, inserting a target chip into the programming socket, and then running a host program to perform the desired task. The various host programs are briefly described below. Consult the documentation of each program for details. All documentation files are stored in the DOC directory within the software installation directory. Documentation files can also be viewed using the DOC command. For example, the command: doc pic_prog will display the documentation file for the PIC_PROG program. The host software (PICPRG software) is not specific to the EasyProg. It works with all Embed Inc PIC programmers and any other programmers that adhere to the protocol specification. This software adapts itself to the capabilities of the particular programmer it is communicating with at the time. Different operations and different PICs may be supported by different programmers, although the host software is the same. The PICPRG software suite is also backward compatible to old firmware versions of the various programmers. We recommend running the latest software available at http://www.embedinc.com/picprg/sw.htm whether running an old version of firmware or not. However, we also recommend keeping your firmware up to date. The main PICPRG programs are: PIC_PROG The main purpose of this program is to program a PIC from a HEX file. It can also verify the program in a PIC, and display the target chip type and EasyProg firmware version. PIC_READ Reads the data from a PIC to a HEX file. PIC_CTRL Allows direct controll over the programming lines from the command line. This is not of much use with the EasyProg except for verifying the hardware. TEST_PICPRG This is a test program not intended for normal operation. It is included in the PICPRG software because it can be useful in diagnosing problems. If others are trying to help you with setup problems, they may ask you to run TEST_PICPRG and report on the result of various operations. Software Updates New software is made available from time to time. Go to the web page http://www.embedinc.com/easyprog to check on the latest developments. Firmwarae Updates New firmware is made available from time to time. Go to the web page http://www.embedinc.com/easyprog to check on the latest developments. EasyProg firmware is stored in files named PRGxx.HEX in the SRC/PICPRG directory within the software installation directory, where XX is the firmware version number. To change to a new firmware version, perform the following steps: 1) Make sure the EasyProg is powered up and connected to a host computer as normal. 2) Insert a PIC 16F648A into the programming socket. 3) Run the PIC_PROG program with the PRGxx.HEX file of the desired version. 4) Label the PIC in the programming socket "PRG xx", where XX is the version number of the firmware just programmed into this PIC. 5) Power off the EasyProg. The STATUS LED should be completely off. 6) Carefully remove the PIC in the socket labeled IC2. This is near the middle of the right edge of the circuit board. This PIC is no longer needed by the EasyProg and can be reprogrammed for use with other projects. 7) Remove the PIC programmed in step 3 from the programming socket and carefully insert it into the socket labeled IC2. Double check the orientation. Pin 1 must be in the lower left corner of IC2. The left end of IC2 is marked with a semi-circular notch to indicate the pin 1 end. The PIC is marked with a dimple at pin 1, a notch at the pin 1 end, or something similar. 8) Power on the EasyProg. The STATUS LED should be dimly but solidly lit. 9) Run the PIC_PROG program. It should indicate the new firmware version. Product Support This product is not officially supported. There is no customer support phone number or email address, and there is nobody whos job it is to answer your questions. This is one of the reasons the EasyProg programmer costs considerably less than other PIC programmers. However, many of the EasyProg users subscribe to the MIT PIC email list (see http://www.piclist.com). Posting a message there is a good idea if you get stuck. As with any general newsgroup or email list, keep the following in mind: 1) You are not owed an answer. You are asking about 2000 people to do you a favor, and should act accordingly. Don't demand an answer because you have a demo this afternoon, or post the same question repeatedly. This will only annoy people and cause them to deliberately ignore you. 2) Describe the problem clearly, explain what you have done on your own in an attempt to solve it, and what the results were. Others are much more willing to help those who are at least trying to help themselves. Again, you shouldn't ask 2000 people for a favor until you've taken reasonable steps to solve the problem yourself. 3) Send the message using PLAIN TEXT wrapped to a reasonable line width, like 72 to 80 characters. There are many people on the list using many different mail clients and operating systems. The only universally guaranteed useable format is plain text with no fancy encoding, like BASE64, quoted printable, or whatever. Don't even think about HTML. Some people just delete HTML messages on general principal or automatically filter them as spam. 4) When you've done all the above, go ahead and ask. The list is for discussing PICs and related topics. Maybe you can return the favor some day by helping someone else with an EasyProg problem or some other PIC issue.