gnupic: DIY USB programmer ?


Previous by date: 11 Jan 2005 16:30:51 +0000 Re: DIY USB programmer ?, j_post.pacbell.net
Next by date: 11 Jan 2005 16:30:51 +0000 Re: quick dumb gpsim/18F question, Scott Dattalo
Previous in thread: 11 Jan 2005 16:30:51 +0000 Re: DIY USB programmer ?, j_post.pacbell.net
Next in thread: 11 Jan 2005 16:30:51 +0000 Re: DIY USB programmer ?, David Willmore

Subject: Re: DIY USB programmer ?
From: David Willmore ####@####.####
Date: 11 Jan 2005 16:30:51 +0000
Message-Id: <200501111630.j0BGUj6a031133@localhost.localdomain>

> > Now, the only question/decision is to decide if we want to make this
> > design to be a 'bootstrap whatever PIC' or 'bootstrap *a* PIC to make
> > a *real* programmer for *your* PIC'.  The software is a lot easier 
> > for the latter, but the hardware is a little bit more complex--you
> > need a design that is both a bootstrap programmer and a real programmer.

> Not really. The design can be very simple, if the right chip is used.
> As example the maxim 662 with a silicon diode to increase the 12V to
> 12.6-12.7V.
> The max662 produces 12V up to 30mA using only two caps from 2-6V input
> voltage.
> The cost is ~2.6 $ for this IC. You can get it as sample.

I wouldn't count on this chip being available for much longer.  IIRC, it
was a 12V FLASH power supply chip and those kinds of FLASH are long gone.
This chip can't be hanging around much longer, either.

If you use a design like Wouter's for the HV, not only do you not need
another chip, but you can tap off of it and feed that back (via a resistive
divider) into an analog input of the uC.  That way you can use a variety
of Vpp voltages.

> Tree open collector pins (MCU) using pull-up resistors. The internal one are
> to weak.
> That is all. Because this is low cost, more rows of socket connectors can be
> used
> to plugin the IC, like the PIC-PG2C from OLIMEX. So no active routing is
> necessary,
> as opposed, if a zif socket is used. Ok, manual routing like the EMP
> programmer using
> pc type switches can always be added as option for for later usage.
> The disadvantage from the manual routing using pc type switches is, that the
> pbc,
> in this case must be double sided. Under pc type switches i mean the
> switches used
> on a hard drive to set the master/slave mode. Sorry, my english is not the
> best.

I would say make a decision.  Either you want a bootstrap programmer--in which
case don't use sockets, have the target in a breadboard and use a few loose
wires to connect programmer to target.  Or, you want a more full featured
programmer in which case you *want* a ZIF socket.  Given that the smallest
USB PIC is a 28 pin part, you have I/O to use in routing to more pins on 
the ZIF socket.

Do you see need for a solution in the middle of those two?

> > For my part, I'm willing to make my code for a USB/RS-232 based semi-
> > intelligent programmer available.  The 18F2550 should be available
> > for a few years and we'll see about porting it to whatever successor
> > it has when/if it goes away.
> 
> The prices are only indicative, and i dont have checked it, use it with
> caution.
> So, you have a 8$ pic
> The PBC will cost between 2$ and 8$.
> USB connector 1.5$
> max662 2.8$, as alternative, four transistor, tree bigger caps, 4 shotty
> diodes,
>                          one ttl or cmos inverter with shmitt trigger,
> larger PBC,
>                          so the overall cost is the same.
> led+some resistor +caps+
> the rest  4-5$   (carrier ic, icsp connector, icsp cable+connector, 6 Mhz
> osc).

If you're making the kit one off, yes, these prices are normal  If you're
making up 100-500 of them at a shot, these prices are way too high.

> So , the total cost for a low cost device using the pic usb chip is: 18-25$.
> Or  22$ +-20% .
> If you want to use psu filters or capacitive 5V stabilizer, 3-4$ adds to the
> design.
> 
> The cost is not lowered, if a PSU is used, because you need a PSU supply
> connector,
> a voltage regulator, and tree transistors with corresponding resistors and
> caps.

USB--no PSU at all.

> The cable has a cost of 1.5-2$. Because the other usb programmer sold it
> separatly,
> i don't have included it in the above calculation.

I think we can assume that the user will provide the A-B USB cable.

> The big problem: USB VID. How do you get one without paying the required
> 2500$ fee.
> Most of the USB programmer design use a FTDI or similar chip with a royality
> free
> USB VID. Even if there don't do so, if there sold 100 kits, then the usb vid
> costs
> 2$ per item and the VID and the other free PID's are usable for future
> products.

That's a good question and I haven't looked into it.  Does anyone have any more
information on this?  Is there some orginization which has already purchased
a VID and will sell PIDs?

I think this is one of the stupider parts of the USB 2.0 spec.  If you are
implementing a purely by-the-book CDC USB device, why do you need a VID/PID?
It's not unique from part to part, so you can't use it at the OS level for
device name mapping.  If you enumerate the USB device and see that it's a
CDC device, just use the CDC driver.

> You can get a USB FLASH programmer for 35$ (kitrus, sold everywhere),
>  a ICD2 clone with USB and RS232 for 55 Euro. The above 35$ is a kitrus kit,
> a usb
> ICSP is sold assembled by kitrus for 39$.

With their programmers, IIRC, you're stuck with their programming software,
right?  Ich spreche leider kein Windows.  No se hable Windows.

> If you add logic to program the USB chip (the programming is a little
> problematic
> on this chip), using RS232, then the price is or will result to be above of
> a equivalent usb programmer kit. 
> The user must assemble both kits. If Olimex sell this as PBC,
> there require to buy a 19$ PBC, update the price, and you see, it's more
> convenient
> to buy a preprogrammed kit. Otherwiese, there add 10-20%, annother 3-4$.
> For 30-60$, there preprogramm a lot of pic chip. If 100 are produced, then
> the price
> is 0.3-0.6$ X chip. I don't know, if there accept the risk to sell only tree
> kits.

I only suggest to let Olimex to produce kits as a means to have another
supplier.  I'm not particularly concerned with their cost structure--
they're only there as a 'second source' for the kit.

> You can object and say, the pbc has to be panelized to the other PBC.
> True, but then, a FTDI chip is really more convenient to use that can
> program the
> MCU using the bit-bang mode. It's cheaper for the VID question, the Pbc
> space.
> Then, if you want, it's possible to design the adapter in such a mode, that
> ICSP
> trought the bus from the master to the slave cpu is possible.

If you do that, you need more I/O or you need to do something ugly with the
socket.  Also, you need that extra "not long for this early" 12V supply
chip.  It solves one problem and creates another.  Now your programmer
must use specialized programming software, as well.

> The kitrus kit costs 26$ in quantity 100 and it has active routing, but only
> a voltage triplier, so one need really a 5V USB +-4%. Generally, this is not
> a problem.

It's an open design?  What software does it use?

> The last thing. The statement from Manuel was, that for the current and
> future design, hi use only 18Fxxx parts and not 16Fxxx. The 18Fxxx parts
> don't need necessary to enter the high voltage programming mode in order to
> deactivate the
> low voltage programming mode. This simplify the thing alot. And otherwise,
> there
> was always possible to reserve the PGM pin for firmware download and to not
> use this
> pin for other purposes.

Certainly.  If you want a bootstrap mode for a more complex programmer, then
using an 18F part which makes the bootstrap stage easier seems like a good
idea.  Considering that they new USB chips are all 18F parts, that seems
doubly good.

> Annother possibility is to use picaxe chips, and if later the basic chip is
> not needed anymore, there can be reused. The price is ~2$ above the price of
> a pic chip
> for the cheaper variants. Connect it to TX/RX (rs232) and program the pic
> chip using
> the basic chip and maybe a cheap usb2rs232 converter.

Sure, they're an option.  But they're closed source, right?

Cheers,
David

Previous by date: 11 Jan 2005 16:30:51 +0000 Re: DIY USB programmer ?, j_post.pacbell.net
Next by date: 11 Jan 2005 16:30:51 +0000 Re: quick dumb gpsim/18F question, Scott Dattalo
Previous in thread: 11 Jan 2005 16:30:51 +0000 Re: DIY USB programmer ?, j_post.pacbell.net
Next in thread: 11 Jan 2005 16:30:51 +0000 Re: DIY USB programmer ?, David Willmore


Powered by ezmlm-browse 0.20.