gnupic: Re: [gnupic] New open USB programmer


Previous by date: 13 Aug 2008 13:28:01 -0000 Re: [gnupic] GPSIM Project, nsmith
Next by date: 13 Aug 2008 13:28:01 -0000 Re: [gnupic] USB programmer and test environment, Jean-Daniel Nicoud
Previous in thread: 13 Aug 2008 13:28:01 -0000 Re: [gnupic] New open USB programmer, AnselmoLuginbühl
Next in thread:

Subject: Re: [gnupic] New open USB programmer
From: Byron Jeff ####@####.####
Date: 13 Aug 2008 13:28:01 -0000
Message-Id: <20080813092911.GA18878@clayton.edu>

On Wed, Aug 13, 2008 at 08:13:33AM -0400, Anselmo Luginb?hl wrote:
> On Fri, Aug 08, 2008 at 05:57:47PM +0000, Byron Jeff wrote:
> >
> > Of course it has the chicken and egg problem:
> >
> 
> You're perfectly right but it's difficult to build any minimally complex
> programmer without encountering the chicken and egg problem.

It didn't used to be that way. Serial and parallel programmers used to work
just fine. But USB have pretty much killed both ports on a lot of machines
and the USB serial interfaces are not up to spec, so simple programmers are
not easy to put together anymore.

> > ---------------------
> > How to program the main micro the first time?
> >
> > This is an interesting problem: a new device can't work as programmer, so
> > it must be programmed in some way.  Apart from asking someone else to do
> > it for you, my advice is to build one of  those serial programmers, like
> > JDM, to do the job the first time.  It would be a good idea to buy a backup
> > micro, in order to program it with updated firmware versions.
> > ---------------------
> >
> > As you have to build a programmer to build a programmer?
> >
> > And most JDM style programmers won't work on modern serial hardware.
> >
> > It's a real problem.

> That's true but from a pratical point of view, for the moment, you can
> just choose a simple serial programmer with external power supply (if
> you're using an usb serial adapter)

Nope. In general it won't work because all serial programmers I know of
require syncronized modem control signals, and modem control signals are
not syncronized on USB serial cables, if those modem control signals work
at all.

Pretty much the only guarantees you can expect from a USB serial adapter is
that you'll get a properly timed TX signal and that you'll have a minimum
range of 0V to 3V, though since USB will have a 5V power signal, that 5V
most likely be around.

JDM expects a true blue EIA-232 serial port with properly syncronized modem
control signals. Connecting one to a USB serial cable is an exercise in
frustration.

> or as an alternative it's easy to
> find someone with a serial port or a friend that could program the pic
> for you. Or as a last resort ask someone to programm the first one for
> you and send it by mail.

The truth of the matter is that if you're going to go through all that
trouble, that investing in a PicKit2 is probably a better bet anyway.

> 
> So the problem is fisolofically interesting but it's a real problem in
> the real world?

In the real world you don't need to build a programmer anymore, so of
course not. So it's always a philsophical discussion.

The bar I use is called the Radio Shack test. Can I walk into a Radio Shack
at 3PM on a Sunday afternoon a get what I need to get the project done by
Sunday evening. My Trivial PIC programmer:

http://www.finitesite.com/d3jsys

used to pass that test until Radio Shack fianlly pulled the 74HCT line of
chips from the stores. I started a project to build a 555 based serial
programmer called the Trivial BootStrapper 555:

http://www.finitesite.com/d3jsys/tbs555

The hardware actually works. The 555 generates a clock signal for each
transmitted octet on the serial port. So each octet generates one bit of
data to program the PIC. The two remaining problems are that there's no
verification, and there's no programming software. The software probably
could be adapted pretty easily from Wouter von Ooijen's ZPL Python
software:

http://www.circuitcellar.com/flash2002/honorable.htm

because it uses the same TX principle and can read Intel Hex files. All
that would need to be added is the programming algorithm for the particular
chip. Actually all you really need is a converter that takes in an Intel
hex file and outputs a string of characters. then any terminal program can
be used to dump the file into the chip. That conversion could even be a web
service. Hmmm.

As for verification, the PIC software can self verify that it's been loaded
properly.

The key thing is that the bootstrap programmer is junkbox or a throwaway.
So it needs to be simple, buildable from easily available components, and
somewhat reliable.

BTW I lifted the bootstrap programmer idea wholesale from Tony Nixon. He
put together such a programmer about 10 years ago or so from the 16F84. You
can find his project here:

http://techref.massmind.org/techref/com/picnpoke/www/http/projects/prog.html

BAJ

Previous by date: 13 Aug 2008 13:28:01 -0000 Re: [gnupic] GPSIM Project, nsmith
Next by date: 13 Aug 2008 13:28:01 -0000 Re: [gnupic] USB programmer and test environment, Jean-Daniel Nicoud
Previous in thread: 13 Aug 2008 13:28:01 -0000 Re: [gnupic] New open USB programmer, AnselmoLuginbühl
Next in thread:


Powered by ezmlm-browse 0.20.