gnupic: DIY USB programmer ?


Previous by date: 6 Jan 2005 02:37:40 +0000 Re: DIY USB programmer ?, Manuel Bessler
Next by date: 6 Jan 2005 02:37:40 +0000 gputils development status, Craig Franklin
Previous in thread: 6 Jan 2005 02:37:40 +0000 Re: DIY USB programmer ?, Manuel Bessler
Next in thread: 6 Jan 2005 02:37:40 +0000 Re: DIY USB programmer ?, Manuel Bessler

Subject: Re: DIY USB programmer ?
From: Manuel Bessler ####@####.####
Date: 6 Jan 2005 02:37:40 +0000
Message-Id: <20050106033111.A27232@betazed3.varxec.de>

On Wed, Jan 05, 2005 at 09:19:15AM -0500, Byron A Jeff wrote:
> > Most new computers only have USB, but no "legacy ports".
> 
> I take issue with that statement. While of course PCs are trending to having
> between 6 and 8 USB ports, every one that I have seen in recent memory have
> had at least one parallel and one serial port.

I dunno 'bout that... but many folks use laptops as their 'main' (or even 'only')
computer nowadays. 

> Also only the FT245 really makes sense because it presents a parallel 
> interface. The FT232 fundamentally gives you nothing more than a USB to
> RS232 cable, which we've already seen gives you a complete interface for 
> about $10 USD.

OK, when I originally said FTDI chips, I thought that for some
solutions these adapter cables might work. 
Indeed, if I can tell my users to get one of these cables, and build a
little circuit that connects to the non-USBb end of it, that would be
great.

> > I've skimmed the programming specs for two chips, and it looked like
> > most timings don't have a "max" defined. So, would this be possible ?
> 
> Would what be possible? Programming PICs is a static activity. If you had
> debounced switches, you could program a PIC by hand.

Well, that would answer my "max. timings" question. 
If this be exploited by say a parallel-to-USB adapter cable (or FT245
for those who want to DIY), it might be an option.
What do you think? Good/Bad ?

[snip...]
> So if it all works there may be a winner here:
> 
> 1. Use the 555 one shot output as the program clock for the PIC. There is no
> need to invert the signal as the bit is latched on the falling edge of the
> clock.
> 
> 2. Since the new trigger is active high and with RS-232 the leading edge of
> the start bit is a transition from 1 (-12V) to 0 (12V) (i.e. a rising edge)
> you don't need to invert the TX signal, just condition it with a series
> resistor and a 4.7V or 5.1V zener. The output of that junction goes to the
> PIC program data PIC too in addition to the base of the trigger. Even better
> in the idle state both the clock and data pins to the PIC are low, so you can
> simply wire a switch from 13V to MCLR with a pulldown resistor to activate
> programming mode.
> 
> 3. Now you tune the 555 delay to about 1/2 a character transmit time. This
> should be doable without any fancy equipment if you test with flip flop
> like the 74HCT74. Simply tie the transistor base to the D input of the FF
> and tie the output of the 555 to the clock (you may need to invert
> the signal). Then tune the delay resistor until when you send a 0x00 down
> the serial port you get one bit and when you send 0xff down the port you
> get the other bit.
> 
> And that's it: a trivial serial PIC bootloader programmer that only uses the
> TX line and a handful of cheap plentiful components. And it should work with
> any USB to serial converter.
> 
> Now it won't be fast. Presuming that you tune to something like 4800 or 2400
> BPS, it'll take awhile to program. To give you an idea Wouter's ZPL takes 70
> seconds to fill a 8K 18F part using the same technique. But it's really a one
> shot as you'll use it to program in a serial bootloader into the PIC and then
> the PIC can program itself directly from then on.
> 
> The idea isn't new. As I said Wouter uses almost the exact same technique to
> implement his Zero Pin Programmer for the 18F series measuring the length of
> a transmitted character cell to transmit a bit. Also I'm sure that I've seen
> using a 555 to extract clock information from a serial stream somewhere or
> another.
> 
> But it fits the bill exactly. Requires no intelligence. Works with any serial
> port.  Doesn't require any modem control signals. Works with USB/serial
> converters.  Uses cheap and plentiful parts. Finally I'm pretty sure that
> Wouter's ZPL Python software could be easily adapted into a programming base
> for the setup, so you wouldn't have to start writing the programming software
> from scratch.
> 
> Hope this helps. It's interesting enough that I think I may take an hour
> today to breadboard and do some tests.

This idea sounds good. If its gonna work, it might be a good solution
for my problem.

If you do some experiments with this, keep us informed. I would
volunteer to create a PCB for it in eagle. I'm thinking of a similar
layout like this one:
  http://olimex.com/dev/pic-pg2c.html
It can take most PICs and also has ICSP. I have a layout based on that
one that I could adapt for our non-intelligent USB PIC programmer.


Manuel
-- 
Opensource/Free Software: No Gates, No Windows

Previous by date: 6 Jan 2005 02:37:40 +0000 Re: DIY USB programmer ?, Manuel Bessler
Next by date: 6 Jan 2005 02:37:40 +0000 gputils development status, Craig Franklin
Previous in thread: 6 Jan 2005 02:37:40 +0000 Re: DIY USB programmer ?, Manuel Bessler
Next in thread: 6 Jan 2005 02:37:40 +0000 Re: DIY USB programmer ?, Manuel Bessler


Powered by ezmlm-browse 0.20.