Dangerous Prototypes

In development => Project development, ideas, and suggestions => Topic started by: ian on August 02, 2010, 11:28:32 am

Title: mini-blaster FT232 USB multi-programmer
Post by: ian on August 02, 2010, 11:28:32 am
Here's the schematic and PCB for a new programmer dreamed up by member rhyde and pushed by Ipenguin. Here's a brief overview of the design:

*FTDI232 USB->serial chip for ultra low cost, multiple voltage programmer (goal $5-$10)
*Will use existing apps to program AVR, can set AVR high voltage fuses
*Use piratePICprog to program PICs
*Use flashrom to program ROMs
*Sparkfun-style Arduino UART header
*1.2 (?) to 5volt targets
*provides 3.3volts and 5.0volts

The goal is a cheap, medium speed programmer for new users who don't want to spend $30 on a pickit, and don't want to DIY. The really nifty thing about using theFT232 is that it has internal level translation, so the programmer can run at any voltage without an external buffer chip. The FT232 can also supply a few mA of 3.3volts from the internal regulator.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: IPenguin on August 02, 2010, 06:15:12 pm
Great design and implementation of this little, yet incredibly versatile gadget. :)
I have downloaded the files and will go over the details later.

Truth be told, rhyde and I only suggested to make all/most pins of the FT232RL on the BusPirate available for use as a direct FT232 bit-bang programmer (e.g. for direct AVR programming). This new design with the high-voltage source (for programming old PICs and AVRs that require 13V) is even more useful.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 03, 2010, 09:18:48 am
A little feedback:

Quote
The only immediate suggestion I have is to make all CBUS (CBUS0 ... CBUS4) signals and RI available (all other essential pins are available on at least one of the headers)

... either by putting them on a sperate header or by modifying the layout in a way that you will have the pins of the FT232RL on headers with the exact layout of Sparkfuns Breakout Board for FT232RL USB to Serial (http://http://www.sparkfun.com/commerce/product_info.php?products_id=718) and place the circuitry for the voltage-pump and switchers around the "Sparkfun Breakout Board for FT232RL USB to Serial" core. This may require a little more PCB area but it would open a few other interesting options ... like compatibility with the Openschemes Advanced FT232 Bit Banging – Homebrew ISP CPLD Programmer project (http://http://openschemes.com/2009/11/14/advanced-ft232-bit-banging-homebrew-isp-cpld-programmer/) which does support CPLD programming and various Arduino programming options (all making use of RI which is not on any of the headers, yet).
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 04, 2010, 12:47:49 pm
I have done quite a bit of experimenting with the FT232R bit-bang mode. http://chinwah-engineering.com/USBProjects.html (http://http://chinwah-engineering.com/USBProjects.html) I have used the Spark Fun board and it works well.  Having all of the I/O pins available is nice.  Some vendors have not done that. 

There are some issues with using the CBUS and main I/O pins at the same time.  When you program the CBUS pins, the main I/O pins are reset high.  FTDI has confirmed this to me. The pins can be set to bring out the WE and RE signals but the RE is inverted from the WE and it comes before the WE. There is no way to invert the RE. Of course they can be used in their normal functions as TX/RX Leds.

All of the schematics,  timing and software is on the above Chinwah Engineering  webpages.  The software is written in MS VC#.

A word of caution.  It is somehow possible to brick the FT232R with some weird combination of bit-banging.  It is possible to force the chip to only use an external oscillator but that can be reset using the MPROG program. 

I can provide some software support.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 04, 2010, 01:00:37 pm
Thanks MichaelZ - That will be a ton of help as we review the design and prep the first prototypes.

To do:
*All pins to headers
*CPLD programming header
*Check connections for bugs with CBUS pins
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: Sjaak on August 04, 2010, 04:24:48 pm
I was looking for a new PIC to use in a new project and saw that the new PICs don't use 12-13V anymore to enter HVP programmingmode.

They new PICs appear to use 8-9V instead. This can be solved bij using a resistor and a zener with a jumper to enable/disable

The PIC where I noticed is the pic16f1823. It is described on page 315 of the datasheet.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: mizch on August 04, 2010, 08:40:32 pm
To lower the programming voltage, I suggest to use a resistor in series to R2.  If shorted via a jumper, the higher voltage is output.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 05, 2010, 09:12:29 am
Attached is the reply from FTDI on the CBUS issue.  Below their reply is the initialization code, the bit-bang code and a screen capture of the waveforms using the Logic Sniffer. 

I do not believe that you can use the CBUS to pulse the VPP or VTarget without affecting the other bit-bang pins.  One of the reasons appears to be that you have to change the mode for the FT232R from bit-bang to CBUS bit-bang and that appears to reset the device.

McZ
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: arhi on August 06, 2010, 05:11:52 am
I am playing these days with FT2232H and I understand why Maryam from FTDI recommended it over the FT232...  This baby can do bitbang (only one channel - 8 bits) at 60MHz sync (FT is providing 60MHz clock for read/write)!! .. runs 480Mbps and do usb to SPI/I2C/JTAG without breaking a sweat (all together with examples in c++ how to do it :) ) and can also do dual channel async bit bang (not sure attm what is the max speed, from what I read, 30MHz each should be possible)... and it is not too expensive (~5GBP) and is 5V tolerant ... It is definitely worth the look.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 06, 2010, 08:23:38 am
I imagine that the reason for using the FT232R was it operates off of 5v, has an internal osc. and eeprom.  The FT2232H is a very neat part but operates off of 3.3v, requires an external crystal and external eeprom.  That means extra cost. 

I am not convinced that the FT232R cannot be used.  It just means that all of the signals have to be restricted to the first 8 I/O pins.  If the CBUS2,3,4 signals are moved to the CTS, DCD, RI pins the first 5 I/O signals are available for the target signals.  It just means that the four programming connectors have to share all of their signals.

Another comment about the CBUS4 signal.  It does not have bit-bang capability, only CBUS 0-3.

McZ
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 06, 2010, 09:03:12 am
Attached is a pdf of what I propose.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 06, 2010, 09:29:26 am
We actually have a 2232H high-speed programmer on the way too, but it's more for JTAG, flashrom programming, etc. The reason for two designs is that we might be able to sell the 232 programmer for the price of the 2232H chip alone:
http://dangerousprototypes.com/forum/in ... board=37.0 (http://dangerousprototypes.com/forum/index.php?board=37.0)

Quote
5V tolerant

I think the 'H' chip dropped this feature, we've been struggling with the buffer on the Bus Blaster to get it just right (and affordable and available).
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: arhi on August 06, 2010, 09:11:16 pm
yes, the price is a good reason to do both :D ..

I'm pretty stunned what can this 2232H do (should be very simple to replace a whole bus pirate with 2232h for example - but the software would have to be on pc side)... as for the 5V tolerant the data sheet states (Document No.: FT_000061, FT2232H DUAL HIGH SPEED USB TO MULTIPURPOSE UART/FIFO IC, Datasheet Version 2.08):

Quote
+1.8V (chip core) and +3.3V I/O interfacing (+5V Tolerant).

Quote
The I/O pins are +3.3v cells, which are +5V tolerant (except the USB PHY pins).

and the 2232HQ mini module I purchased states the same thing (no buffer between pins and chip and 5V did not kill any pins :D ).

anyhow, going too far off topic .. looks like reshuffling the pins will solve the problem :)
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 07, 2010, 05:10:39 am
Here is an update on what I propose for the FT232R pinout.  I moved the PIC PGC to the same pin as all of the other clock pins.  Simplifies software.  In any case the PC software is trivial with VC#.  The hard part is the algorithms for the "burning".

I have some of the FT2232H's in my toy box.  I have not had a chance to play with them yet.  They are really incredible chips.  They have a dual MPSSE which is nice.  Also dont forget the FT4232H.  Too bad they didnt make a "R" version with all of the overhead internal.  Agree the I/O pins are 5v tolerant but only to 5.8v.  Does not give you much noise room.  That does not mean that an output will pull up to 5v without an external pullup resistor.  The FT2232H requires a 3.3v supply so you have to use a regulator for USB 5v to 3.3v.  In reality the FT2232D would be a better part since it does not require the 5v to 3.3v regulator.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 07, 2010, 10:53:13 am
Thanks MichaelZ - that pinout looks great, we'll make those changes.

Thanks everyone - I thought the ft2232H gave up the 5v tolerant IO pins. Maybe the FT2232H is 3v3 and the older chips were 5v0 and I got confused?

Does anyone know off the top of your head if there's a problem switching the FT2232H pins between ground and input/Hi-Z?
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 07, 2010, 12:13:20 pm
Quote
Does anyone know off the top of your head if there's a problem switching the FT2232H pins between ground and input/Hi-Z?


 I dont quite understand what you mean.  In the bit-bang mode you have full control of the ADBUS0-7 and BDBUS0-7 data pins.  You can set the direction (output or Hi-Z input) when you go into bit-bang mode but I am not sure you can change them on the fly.  The direction is set with the same command as the direction.  I know that if you change the mode the pins are reset but if you were already in the bit-bang mode and just resent the bit-bang mode it may not reset the pins.

 The ACBUS0-7 and BCBUS0-7 pins are control pins and have dedicated functions.  See 3.2 FT2232H Pin Descriptions on page 8 of the data sheet.

I dont have a FT2232H setup at the moment but I have a FT2232D setup so I will look at it.

There is an example of programming an Altera in AN232B-01_BitBang.pdf.  The FT2232H use the same bit-bang scheme which is different from the FT232R chip.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 07, 2010, 12:47:26 pm
Ok I setup a DLP-2232M and used the DLP Design Test Application in the bit-bang mode.  I set all of the data pins to outputs and set them low (gnd).  If you change a data pin to input, it inputs a "1".  If you set it back to output, the pin stays as a "1".  So it appears that you cannot toggle back and forth from "gnd to hi-z" without reseting the pin to gnd.  Signals were verified using the Logic Sniffer.

I hope this answered your question, otherwise it was a fun tangent. :-)
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 07, 2010, 01:08:09 pm
Thank you so much, that's a ton of help. That was my understanding as well, but since I was wrong about the 5v tolerant pins I thought maybe I would get lucky and the 2232 could switch between ground and input (hiz) too.

The reason I ask is that several signals on the JTAG interface are open drain (for anyone following, that means a pull-up resistor holds the signal high, we just need to pull it to ground to control the signal). If the 2232H could switch between out/ground and in/hiz we could tug on these lines with a bare 5volt tolerant 2232H pin. Instead, we're using a transistor, a high on the 2232 pin is ground on the transistor, and a low on the pin is hiz on the transistor. That's all dandy, but our goal was out-of-the-box compatibility with OpenOCD, etc, and now some of the key signals will be inverted. It shouldn't be hard to flip those bits in the code and make our own driver, but it would be so much nicer to not. Might still look at a multiple-transistor switch or a small logic inverter of some sort.

I attached the latest CCT and PCB for the bus blaster if anyone wants to take a look. There's quite a bit of work in progress, and the buffers have all been swapped in the latest design, this is just the last stable design that looks like a real PCB.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: IPenguin on August 08, 2010, 02:38:36 am
I am a bit confused about the FT2232H discussion as the "mini-blaster FT232 USB multi-programmer" will still use a FT232RL and not a FT2232x ...?

From my understanding the FT2232 can switch between "L" (output) and HiZ (input) but it will either require one extra write cycle after switching the pin from output to input or writing a "H" before switching the pin to input followed by one "dummy" write cycle. I have a FTDI FT2232H high-speed minimodule and will try to verify the behaviour tomorrow.

Back on subject ... both the response by FTDI (posted by MichaelZ) and the FT232R Bit-bang app note make it quite clear that D-Bus and C-Bus Bit-bang mode can't be mixed/used at the same time. As far as I understand the FT232R design you can actually use only one of the various modes available at a time.

@MichaelZ: I like the FT232R pin table you started ... and most existing applications that make use of the FT232Rs Bit-bang mode use the D-Bus. Ian may not have known about the part that the UART will be disabled in Bit-Bang mode and hence all 8 DBUS lines can be used for Bit-banging ... as you pointed out, it will not work to control the voltage sources/switching with CBUS signals and use DBUS signals to read/write/control data transfers at the same time.

I think it might be useful to look for existing open source applications that make use of the FT232R to (directly) program devices first before making a final decision about the FT232R DBUS pin assigments ... I used your table as a basis and extended it accordingly.

Btw. GoodFET makes use of the FT232RL to directly program the MSP430 on the GoodFET by using the MSP430 BSL mode (and the FT232R UART mode as far as I can see) so I have added MSP430 programming to the table.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 08, 2010, 04:47:59 am
The C# code for the FT232R SPI interface is here http://chinwah-engineering.com/FTDI_SPI.cs (http://http://chinwah-engineering.com/FTDI_SPI.cs).  It can be easily be modified to change the pin function, direction, and states.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 08, 2010, 10:01:44 am
Sorry for the confusion, I just wanted to discuss the 2232H programmer too while I had MichaelZ's ear.

Thanks for the chart, it looks really good. I've already started moving any signals off the CBUS, and will add these to the list too.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 08, 2010, 01:50:36 pm
IPenguin :  If it is ok and there isn't some specific reason I would like to line up all of the outputs and inputs in the same columns.  Also put signals that are alike in the same column.  No other reason than it means that the software will have common routines for example all of the clocks (SCK/PGC/TCK) are on the D3 pin.  Also since D0 is normally an output (TXD) it would be easier if the MOSI was on that pin and MISO is on D1 (RXD).  I added a row for JTAG.  I do a lot with the Xilinx Cool Runner CPLDs and it would be nice.

I also added WDn and RDn on the CBUS pins.  They dont affect the DBUS pins but are useful signals.  I added the PWREN# signal to control power to any peripherals.

I highlighted the changed items on the attached pdf.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 08, 2010, 04:40:44 pm
Thanks for all the help on this, I think it's going to be a fantastic little tool. We'll have these changes implemented in the next few days and post an update.

The number of headers might be getting a bit crazy, maybe we can consolidate some, or something. Any thoughts?
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: Sjaak on August 08, 2010, 08:24:29 pm
If they share the same pins on the ft232 chip you could sell this kind of cable (more pins) along with it:

http://www.seeedstudio.com/depot/4-pin- ... ?cPath=111 (http://www.seeedstudio.com/depot/4-pin-to-4-separated-pins-female-jumper-wire300mm-5-pcs-pack-p-264.html?cPath=111)

Or several cables for each target (board2pic, board2avr, etc).
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: MichaelZ on August 09, 2010, 03:28:29 am
I made something like it to go from a 14 pin 2mm header on my Xilinx Platform Cable pod to the individual female connectors.  Looks just like the Seeed cable except it has a 14 pin 2mm header on one end and 6 wires.

For the PIC I use the Olimex format rather than the Microchip RJ connector.

For the TI TMS320 parts I use the Spectrum Digitial pod and a ribbon cable.  We probably dont want to get into that.

I dont do Arduino right now.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 16, 2010, 02:15:48 pm
Here's an update for this board. The individual headers were consolidated to a 2x10 header with all the FTDI232 signals. The back of the board silk has a key according to the most recent table.

I have two modifications off the top of my head:
*One is moving the large capacitor next to the boost regulator to right after the diode, instead of after the feedback resistors.
*The other is to move the 2x10 header right so there is enough room for the corner of a case, should anyone want to make one.

Any thoughts on the update?  The idea is to use it with breakout pins like these:
http://www.seeedstudio.com/depot/4-pin- ... ?cPath=111 (http://www.seeedstudio.com/depot/4-pin-to-4-separated-pins-female-jumper-wire300mm-5-pcs-pack-p-264.html?cPath=111)
http://www.seeedstudio.com/depot/1-pin- ... ?cPath=111 (http://www.seeedstudio.com/depot/1-pin-dualfemale-jumper-wire-100mm-50pcs-pack-p-260.html?cPath=111)
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 16, 2010, 02:16:24 pm
Eagle files attached.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: toddkrein on August 17, 2010, 09:06:23 pm
Perhaps this is a little off-topic, but I need something that is a cross between the multiprogrammer, and the bus pirate. I want a universal programmer, but I'd like one open-source so that I can program custom modules as well... Perhaps a version of the multi-programmer with a ZIF socket? (Or if not, someone got a pointer to a good, cheap one?)
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 17, 2010, 09:38:46 pm
This (or any FT232 break out board) will do a lot of that, but you'll need to break out the connections to each chip individually because each is unique. There are fancy (read expensive) 'one socket lots of chips' kind of multi-programmers, but they probably use CPLDs or other logic to rearrange the signals. Since most work is 'in circuit' these days, a break out cable is usually the easiest way to program/develop for lots of different kinds of chips.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: Sjaak on August 17, 2010, 10:04:17 pm
For microchips (!! ;) ) you can use a board that sure has on sale. It was even on the blog: http://dangerousprototypes.com/2010/06/ ... g-adapter/ (http://dangerousprototypes.com/2010/06/24/universal-pic-programming-adapter/) and the roundup: http://dangerousprototypes.com/2010/07/ ... er-update/ (http://dangerousprototypes.com/2010/07/10/sure-programming-adapter-update/)

Be aware, sure can charge large sums for shippings, so watch out for free shippings deals!
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: IPenguin on August 18, 2010, 03:04:49 am
The SURE electronics "MCU Universal ZIF socket use with PICkit 2/PICkit3/ICD 2" (http://http://www.sureelectronics.net/goods.php?id=22) (they offer it for US$ 9.99 including Free Shipping atm) could be connected to the mini-blaster with fly/jumper wires and used for programming DIP PICs and AVRs  ...

A low-cost, true multi-chip programmer is discussed in detail here:

Cheap TOP2005 EEPROM Programmer - It Sucks or Does It? (http://http://openschemes.com/2009/10/23/cheap-top2005-eeprom-programmer-it-sucks-or-does-it/)
Turning a Top2005 EPROM Programmer into a Desktop Test Bench (http://http://openschemes.com/2010/04/29/turning-a-top2005-eprom-programmer-into-a-desktop-test-bench/)

The TOP2005 is an older member in a line of clones of clones ... of universal EEPROM programmers like TOP2005+, TOP2007, TOP2049, TOP3000 ... check ebay.com for "universal USB programmer" or similar/variations for prices and models. It programs PICs, AVRs, 8051s, parallel and serial EEPROMs, GALS ... etc.

Like Ian said, they use CPLDs and FPGAs to be able to assign every voltage and signal to about any pin on the ZIF sockets. Universal USB programmes start at around US$ 60 and go up to a few hundred, even thousand bucks. For the min-blaster we are talking about a price range of US$ 5-10 (according to Ian) or more like < US$ 20, I think.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on August 18, 2010, 08:45:05 am
Quote
A USB to parallel adapter talks to an 8051-clone microcontroller.   The micro talks to a Xilinx CPLD and a Xilinx FPGA that run the pin buffers.

Picture attached too. Great links!
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on September 17, 2010, 03:42:28 pm
A box of boards just came in. This one was included (picture attached). It looks ok. I did these boards white because of another project went out at the same time. Sjaak also suggested it could mean the first draft, like a blank sheet of paper. I probably won't do any more like this though because it has the same problem as black - you can't see the traces, and I like to see them while debugging.
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: ovi_mv on November 16, 2010, 01:30:44 pm
Where did you made the PCB for the mini-blaster.Is it possible to buy 3pcs somewhere ?
Title: Re: mini-blaster FT232 USB multi-programmer
Post by: Sjaak on November 16, 2010, 02:27:22 pm
[quote author="ovi_mv"]
Where did you made the PCB for the mini-blaster.Is it possible to buy 3pcs somewhere ?
[/quote]

We get our pcbs through seeedstudio (seeedstudio.com).

10x 5x5cm PCB starting at 20U$
10x 10x10cm PCB starting at 40U$

It takes about a week to manufacture and some time to ship. Will take some extra time now because of Xmas.
Title: Re: Re: mini-blaster FT232 USB multi-programmer
Post by: Loki on January 24, 2012, 03:33:35 am
is this project still alive?
Title: Re: Re: mini-blaster FT232 USB multi-programmer
Post by: ian on January 24, 2012, 09:17:09 am
It is not progressing at the moment. The variety of apps that supported it was smaller than we thought, and it tended to be very very slow.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01552236400session_write_close ( )...(null):0
20.01582367992ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01582368768Database_MySQL->query( ).../DatabaseHandler.php:119
40.07562507496Database_MySQL->error( ).../Db-mysql.class.php:273