SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML>
<HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX">
</HEAD>
<BODY>
<H2><FONT COLOR="008080">icdprog - a programmer for Microchip PIC controllers.</FONT></H2> <A HREF="http://icdprog.sourceforge.net/">http://icdprog.sourceforge.net/</A>; <HR>
<P>
ICDPROG is a simple command line programmer for Microchip PIC controllers, using the Microchip ICD (in circuit debugger) as a programmer. </P>
<P>
ICDPROG was originally written for linux. The current version (0.5) has also been ported to Windows32. It should be easy to port to other architectures, since it uses POSIX for serial port handling. The program is written for command line usage. It is useful where programming of a PIC via the ICD is required but use of the MPLAB IDE is not desired or possible e.g. to use the Hitech PICC compiler and GNU make on Linux.</LI>

<P>This program is covered by the GNU GPL license, see COPYING and/or <A HREF="http://www.gnu.org/">http://www.gnu.org/</A>; </P>
<P>It is also beta software so use at your own risk!</P> <H3>NEWS</H3>
<P>Version 0.5 has a number of new features notably:</P> <UL>
<LI>Verify only option to check FLASH contents without changing it.</LI> <LI>EEPROM write option to program individual EEPROM addresses.</LI> <LI>Config word write option to enable the config word to be changed without altering the FLASH program.</LI> </UL>
<P>A port of icdprog to Symbians EPOC R5 OS is also available. See <A HREF="http://www.btinternet.com/~adfhome/demarco5">http://www.btinternet.com/~adfhome/demarco5</A>; </P>
<H3>FEATURES</H3>
<UL>
<LI>Works with PIC16F87x, x = [0,1,2,3,4,6,7] (3,7 is well tested ... )</LI> <LI>Reads intel hex format</LI>
<LI>Auto-detects controller type<?LI>
</UL>
<H3>DOWNLOAD</H3>
<P>Download the latest package from the <A HREF="http://sourceforge.net/project/showfiles.php?group_id=24860"> Sourceforge download page.</A></P>

<H3>INSTALLATION</H3>
<H4>Linux</H4>
<P>The Linux executable has to be compiled using the following commands:</P>

<CODE>
cd src<BR>
make<BR>
</CODE>
</P>
<P>You will have to manually copy the executable to a suitable location like<BR> <CODE>/usr/local/bin</CODE></P>
<H4>Windows32</H4>
<P>A precompiled executable icdprog.exe is included in the package. Just copy it to somewhere on your executable path.</P> <P>The Windows32 version is compiled with the mingw32 compiler. I have not tried the cygwin compiler, but I can't see any reason why it shouldn't work. I have also tried the Microsoft VisualSomeThing complier with success, but it doesn't have "getopt" in the library, so you need to supply your own (or like I did, comment it out).</P>

<P>If you want to compile it yourselves, use the Makefile_w32 makefile as follows:</P> <CODE>

cd src<BR>
mingw32-make -f Makefile_w32<BR>
</CODE>

<H3>USAGE</H3>
<P>The program has 3 modes invoked in different ways:</P> <UL>
<LI>To program the contents of the hex file to flash/id locations/config word.<BR>

<CODE>icdprog <options> <I>hex_file</I> e.g. "icdprog pic001.hex"</CODE> </LI>
</UL>
<UL>
<LI>To program a single EEPROM addreess with a single byte of data<BR>

<CODE>icdprog <options> -e <I>address data</I> e.g. "icdprog -e 0x00 0x01"</CODE> </LI>
</UL>
<UL>
<LI>To program the config word without altering anything else<BR>

<CODE>icdprog <options> -c <I>data</I> e.g. "icdprog -c 0x3EFA"</CODE> </LI>
</UL>
<P>Options are:</P>
<UL>
<LI>-p <serial port> if the default port is not being used i.e /dev/ttyS1 instead of /dev/ttyS0

or COM2 instead of COM1</LI>
<LI>-v to verify only</LI>
</UL>

<P>Make sure that your icd has the latest firmware (2.31.00), You can use the Microchip MPLAB to do the upgrade if you have a flash controller. </P>
<P>The first ICDs that microchip produced can not be upgraded without changing the controller to a 16LF876, see Microchip ETN #21. </P>

<H3>TIPS FOR LINUX USERS</H3>
<P>RedHat users (and probably other also, this depends on PAM) can add these two lines to their /etc/security/console.perms:</P> <CODE>
&#60serial&#62=/dev/ttyS*<BR>
&#60console&#62 0600 &#60serial&#62 0660 root.uucp<BR> </CODE>
<P>The first line defines a new file class called &#60serial&#62, which are all serial ports on your machine. The second line tells the PAM system to change the owner of the serial ports to you and set the permission to 0600 (full access for the user and no access for others) when you log into the machine via the console, and put it back to 0660 root.uucp when you log out. Basically this makes the serial port yours when you log in locally, but not when you log in remote (it makes sense doesn't it ?).</P> <P>
Change the first line to "&#60serial&#62=/dev/ttyS1" if you want this to happen for only one port when you log in (eg. you have a modem which other users should have access to even if you are logged in). </P>
<H3>TODO</H3>
<UL>
<LI>Better documentation, and web page</LI> <LI>Check sum calculation</LI>
<LI>Linux binaries (a RedHat RPM would be nice ...)</LI> </UL>

<H3>MICROCHIP</H3>
<P>If you have any problems with this software, please don't bug Microchip with them. This software was written without any help from them (it would have been much easier if they had released the specification of the ICD..). Use the sourceforge forum instead.</P>

<H3>MORE INFO</H3>
<P>
Project <A href="http://sourceforge.net/projects/icdprog/">summary page</A><BR> Project <A href="http://sourceforge.net/forum/?group_id=24860">forum</A> </P>

<H3>CHANGELOG</H3>
<P>
ver 0.5 Improved UI using progress bars.

        Improved error checking.
        Implemented verify only mode for FLASH. 
        Added EEPROM read/write/verify option. 
        Added config word read/write/verify option.
        Added low latency serial comms for Linux.</P>

<P>
ver 0.4 Compiles and works under Microsoft Windows. Added check for hex

files without configuration word.</P> <P>
ver 0.3 Cleaned up reading of Intel hex files, now works with files

with MS-DOS line terminations.</P> <P>
ver 0.2 Initial release on sourceforge.</P> <P>
ver 0.1 First version that could do anything useful ...</P>

<H3>CREDITS</H3>
<P>Geir Thomassen, icdprog@in.fer.no</P> <P>Andrew Ferry, adfhome@btinternet.com</P> </P>
<HR>
</BODY>
</HTML>


Sponsored Links

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.