gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: Re: Question for you all
From: Jeff Jackowski
Date: Thu, 1 May 2003 16:22:58 -0500 (CDT)

On Thu, 1 May 2003, Lars Goldschlager wrote:

[big snip]

>Btw I haven't told you why I want to make a pic based
>programmer.... two simple reasons.. 1) Using the 16C84
>as a buffer and programmer for other devices I can
>have timing on pic and the PC's port and cpu speed
>won't caus eme more headaches tryign to program
>diferent devices and calibrating.... and 2) using the
>16C84 as a stepping stone (with a max232 I have lyign
>around) I can communicate with the pic and target
>device using only Tx and Rx of the serial port...
>carrying the programmer around (I plan to do it as
>small as I can) this means I can use host machines
>(like palm pilots or even dumb temrinals) to program
>whethever I have user acces only and wherever the
>system (hardware or software) does supports hardware
>flow control or not :)

I had other problems that led me to do something similar recently. I made
a PIC programmer based on a PIC16F84 and wrote the code in C (for the CCS
PIC C compiler), but I haven't released it because there are bugs and I
was thinking I'd probably ditch it for the Wisp628.

What I made does not use RTS/CTS or XON/XOFF flow control, so to insure
everything works, it uses a protocol implemented by a rather messy POSIX
compliant C program that is similar to the one used by my latest
bootloader.  It cannot be used with a simple terminal program, but the
advantage is that less data goes over the serial line and more processing
can occur on the PC rather than the PIC. Flow control is done within the
protocol.  Since the C program should compile on a great many platforms, I
wasn't worried about support. I've compiled it on Linux, and would have
compiled it on Windows, but the Windows system botched itself first.

I tried to make so that it could be extended to support multiple devices,
but I only implemented midrange PIC flash ROM programming, and that
implementation cannot properly erase all parts. It has only been tested
with a PIC16F84 and a PIC16F877A.  Reading the exiting code only works
before writting code, but it was intented to work after writting code,
too.

Anyway, if this sounds like something useful and you don't want to start 
from nothing, I can send you the code and provide some help in figuring it 
out.

-- 
Jeff Jackowski
        http://ro.com/~jeffj/


gnupic@linuxhacker.org