Author Topic: OSHW Universal Programmer design proposal  (Read 9363 times)

0 Members and 1 Guest are viewing this topic.

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: cz
OSHW Universal Programmer design proposal
« on: December 12, 2012, 04:00:53 pm »
I was thinking about what it would take to make a really good OSHW Universal Programmer. I came up with this for the hardware part:

Criteria:

  • Cheap to make
  • Easy to make
  • Maximum flexibility - universal pin drivers, scaleable in groups of 8 up to 48 or so
  • No FPGA / CPLD with hostile licensing policies
  • No programmer required to avoid the chicken-egg problem
  • Powered by a cheap wall socket adapter (24V/1A or so)
  • Programmable logic threshold levels, including 1.8V logic
  • Two programmable power rails for Vpp and Vcc that could support up to 25V (supply permitting) and some ~200mA, with 0.1V resolution, and programmable logic thresholds (Voh, Vih, Vil) - controlled by simle 8bit R-2R DACs driven by shift registers
  • USB connection, Full speed bulk mode transfer to enable fast programming. May use special driver or CDC serial port emulation or both. No HID (too slow)
  • Hardware interface specified at USB level so people can write drivers for unsupported operating systems
  • 160x100 mm board size limit so I can use my Eagle hobbyist edition to do it
  • Preferably single sided boards

Because I want so complex pin drivers which means board space, I would have to split the design in several boards that stack on top of each other:
  • Base board - with ATmega32U4, USB, power supplies
  • Variable number of Pin driver boards, each with 8 pin drivers. You can have 1-6 of them, all identical. Stacks with 180 degree rotation to enable use of simple pinheaders/receptacles instead of expensive board to board stacking connectors or two sided baord/smt headers
  • Socket board on top with 40 pin ZIF, ISP or JTAG connectors, whatever is needed.

All these would be put together with standoffs to form a big brick :)

ATmega32U4 has native USB support for full speed mode, and has factory programmed bootloader (USB-DFU) that solves the initial programming problem.

For pin drivers, I came up with fairly complex but still cheap design with shift registers, 1 to 8 latching decoders (74hc237) and some discrete transistors, and a simple variable threshold logic probe for each pin made of two comparators.
Each pin can be in one of 8 states - GND/Low, Vpp (programmable), Vcc (programmable), High (programmable), Pullup to High, Pulldown, Clock (programmable level and frequency) and input. Each pin can be read thru 3 different bits - one is simple TTL level input (fast, but fixed thresholds), and two input comparators (lm339n) that detect if pin is over High input threshold (programmable) or under Low threshold (programmable). Pins are floated thru 1M resistor to a voltage between High and Low to detect undrvien pins for the logic probe input mode (this logic probe is rather slow because fast comparators are too expensive).
Pin output state (3bits) and pin read bits (3bits) are chained using 6 serial shift registers (74hct164, 74hct166). One output chain will be connected to input chain on the socket board to provide for autodetection of number of pin driver boards.

Everything except the ATmega32U4 would be in thru hole packages to make it easy to build by hand.

As this will be pretty big brick there is no point in USB only powered mode sorry :) No way to make it much smaller with discrete pin drivers and cheap.

It shoud be fast enough for programming parts at maximum speed, probably too slow to use as a logic analyzer. But you could maybe plug in a LCD display into this and test it ;)
Good enough is the enemy of the best.
 

Offline shebu18

  • Frequent Contributor
  • **
  • Posts: 309
  • Country: ro
Re: OSHW Universal Programmer design proposal
« Reply #1 on: December 12, 2012, 05:40:55 pm »
I like your idea. Why not use smd stuff? the 74hc237 could be a so16, maybe transistors could also be smd. In this way it would be easier to do the pcb's at home, if they are one side.
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: cz
Re: OSHW Universal Programmer design proposal
« Reply #2 on: December 12, 2012, 07:34:09 pm »
I think it can be one side anyway, I can put the ATmega32U4 on the bottom side :)
SMD stuff saves some space but not too much to make it worth it I think.
I expect the boards to turn out to be single sided with some jumper wires.
« Last Edit: December 12, 2012, 07:48:38 pm by hlavac »
Good enough is the enemy of the best.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7306
  • Country: us
    • SiliconValleyGarage
Re: OSHW Universal Programmer design proposal
« Reply #3 on: December 12, 2012, 08:16:07 pm »

  • Cheap to make
  • Easy to make
  • No FPGA / CPLD with hostile licensing policies
  • USB connection, Full speed bulk mode transfer to enable fast programming. May use special driver or CDC serial port emulation or both. No HID (too slow)

you like contradictions don't you ?

its gonna be open source but use custom drivers ..
it needs to be cheap but were going to use a truckload of chips and boards.

and what's this hostile licencing policy on FPGA ? the software is gratis and you can use as you please.

I'd take an FTDI2232H ( note the extra 2 ni the part number ) , use one channel to load the FPGA from the PC so no programmer needed and use the other channel in bus emulation mode so i can send my data over. i'd wire up the io bank of the fpga going into the device pins to a programmable regulator. id use  an additional shifter like a max3373 to work anything from 1.2 to up to 5 volts i/o voltages.

Now, that was the easy part.

here is the hard bits that need solving before you begin this project :

- you need to make a list of chip pinouts indicating where the special pins are ( VPP ... 12 volt , 15 volt 21 volt -5 volt etc ... )
- where are you going to get the programming algorithms ?  programming a serial eprom over i2c or spi is easy .. real eproms a bit harder. flash eproms even harder and it will be real fun doing all the microprocessors.....

and as for cheap.... 250$ gets you a programmer that does all the stuff out there including JTAG ... that's gonna be hard to beat ...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline chrome

  • Regular Contributor
  • *
  • Posts: 189
  • Country: be
Re: OSHW Universal Programmer design proposal
« Reply #4 on: December 12, 2012, 08:26:56 pm »
SMD stuff saves some space but not too much to make it worth it I think.

What?

SMD saves a load of space, think about a simple resistor for example:
A regular 1/4W resistor can have a hole spacing of 10mm but in that space you fit 2x 1206 Resistors (and those are quite large), about 5-6x 0805's and who knows how many smaller ones.

1206 and 0805 are very much hand solder-able.

The space saved on IC's is pretty big too.
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: cz
Re: OSHW Universal Programmer design proposal
« Reply #5 on: December 13, 2012, 12:12:43 am »
its gonna be open source but use custom drivers ..

What I meant by that is the drivers will implement the "vendor specific" device class (code 0xff, as opposed to one of the generic USB classes like CDC), not that the drivers would be proprietary/closed source.
Although, on some platforms like Windows, open ource drivers might be outright illegal due to DDK EULA fineprint...

it needs to be cheap but were going to use a truckload of chips and boards.

Lots of them, but dirt cheap!

- you need to make a list of chip pinouts indicating where the special pins are ( VPP ... 12 volt , 15 volt 21 volt -5 volt etc ... )

That is job for the guys defining the device / programming algorithms - this hardware can put anything on any pin, including Vpp. That is the point of it being "universal".

Do you think I will need negative voltages?

- where are you going to get the programming algorithms ?  programming a serial eprom over i2c or spi is easy .. real eproms a bit harder. flash eproms even harder and it will be real fun doing all the microprocessors.....

Datasheets, web... Don't expect to program something that has secret programming algorithms.

I don't plan to implement all the programming algorithms of all devices ever made.
I plan on making it very easy to define algorithms and chips using some sort of application specific language.

Granted, there will be a few accelerated algorithms like EPROM burning in the firmware, just to make it fast where bit banging over USB would slow things down too much.

and as for cheap.... 250$ gets you a programmer that does all the stuff out there including JTAG ... that's gonna be hard to beat ...

Depends on how one does the boards, but DIY one sided boards 16x10cm can be done under $3 per board here... thats not so bad. Beats perfboard.

As for $250... I aim for much, much cheaper than that! We'll see how low can I get in reality, all things included... The most expensive part will probably be the ZIF socket. But, cheapskates can cheat and put a regular socket there for now! I want it to scale in how much you want to spend... you can program I2C EEPROMs and ISP Atmels / PICs with a single pin driver board!
Good enough is the enemy of the best.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7306
  • Country: us
    • SiliconValleyGarage
Re: OSHW Universal Programmer design proposal
« Reply #6 on: December 13, 2012, 12:28:44 am »
ah, so were not talking a universal device programmer.... more something like ponyprog ... three resistors and a diode... combined with an spi and a i2c programmer.

that's hardly a device programmer... and not even close to a universal device programmer.

You started by saying universal device programmer, i understand that in theway that terminology is generally used in the market :  meaning any device out there, using manufacturer approved algorithms. Like the Data I/o , Hilo, BP Microsystems and other real universal programmers. The pin drivers are very complex in those machines to the point they use custom ASIC's to control a single pin. They even have current sensing , contact sensing , they can read device id's manufactuer id's and much more. some of these programmers can also test chips like 74xx and 4xxx series. plonk in an unknown device and the machine will tell you what it is.

Dave posted a topic on device programmers . i posted two teardowns in there. one of my 48 pin dataman and one of my Hilo All11 machine. go take alook at those pictures... it'll give you an idea of what is involved hardware wise...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 12087
  • Country: gb
    • Mike's Electric Stuff
Re: OSHW Universal Programmer design proposal
« Reply #7 on: December 13, 2012, 12:46:54 am »
Hardware is not the problem. A universal programmer needs far too much work on wide enough device support be useful to be viable as a useful OSHW project. There are thousands of devices out there, and until you can support a reasonable percentage of them it will be of limited use.
Also consider that the demand for a device programmer is far less nowadays than a few years ago  with on-chip memory, in-circuit programming, cheap programmers from manufacturers etc.
 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 30626
  • Country: au
    • EEVblog
Re: OSHW Universal Programmer design proposal
« Reply #8 on: December 13, 2012, 01:13:06 am »
As someone who has done an EPROM programmer design way back and sold and supported EPROM programmer software, so have some experience in what it's like, I can tell you that the hardware does not really matter.
It's all about the software, device support, and user support when X doesn't work. It is a huge job.
I'd put it under the category of being "a mugs game"  ;D

Dave.
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 30626
  • Country: au
    • EEVblog
Re: OSHW Universal Programmer design proposal
« Reply #9 on: December 13, 2012, 01:16:05 am »
some of these programmers can also test chips like 74xx and 4xxx series. plonk in an unknown device and the machine will tell you what it is.

That brings back memories of an old project:



Dave.
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: cz
Re: OSHW Universal Programmer design proposal
« Reply #10 on: December 13, 2012, 09:38:47 am »
I know, the software is the more important part. But, that is what makes this so valuable as an open source project - the more valuable part can be copied for free!

What I want is to make it really easy to add new chips, and have people contribute.

The main means to it would be the hardware/programmer independent definition language I am planning, where programming algorithms are described in terms of the device pins, voltage levels and timings, so that they can be used to implement the algorithm on any device that has the required capabilities, not just this hardware.
Looks like this will be a standalone part of the project - the algorithm library.
I would add some vetting process (i.e. sign approved chip drivers) to stop people from killing chips,
and make a way to recognize "official" algorithms from chip vendors if they choose to make some :)

If I can get people to make and contribute a "chip driver" to this project, instead of making a specialized hackish one trick pony programmer for it, it would benefit all...

I will make an example of what I want the chip description driver to look like and post it later.
Good enough is the enemy of the best.
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 30626
  • Country: au
    • EEVblog
Re: OSHW Universal Programmer design proposal
« Reply #11 on: December 13, 2012, 09:43:49 am »
That brings back memories of an old project:

And holy crap, I just realised that was 20 years ago  :o
I'm getting old  :--

Dave.
 

jucole

  • Guest
Re: OSHW Universal Programmer design proposal
« Reply #12 on: December 13, 2012, 11:38:52 am »
I can see a lot of work on the chip algorithms for both reading and writing the various chip types.

The other year I bought a Data IO "Chiplab" really cheap from Ebay, and it's built like a tank! it does lots of retro chips and I also bought a new TOP3100 Universal Programmer which seems to be pretty good (so far!)

I think for OSH to work or gather momentum it needs to either fill a gap in the market by being unique or be considerably cheaper or better than present commercial offerings.

 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 670
  • Country: us
Re: OSHW Universal Programmer design proposal
« Reply #13 on: December 17, 2012, 01:01:16 pm »
A good chip to build a programmer around would be one of the cypress SOC , they are shipped from the factory with the ability to be flashed to new firmware over USB .  One of the cypress SOC is used in a lot of the logic analyzers and also as a 3rd party USB blaster for Altera parts. Only downside is cost of the chips, about $12.
http://www.cypress.com/?id=1353
 

Offline tridentsx

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: OSHW Universal Programmer design proposal
« Reply #14 on: January 04, 2013, 10:07:28 pm »


There are many good reasons for an OSHW device programmer,

1) Native Linux and OSX support
2) Community additions, it can grow over time to be superior to commecrcial offerings
3) No obsoletion of the device since the source is open, I have three different programmers that needs arcane operating system and or cards for obsolete bus standards

The original willem programmer had both open h/w and s/w.

I would prefer SMT and fpga based design with ram capable of storing the flash so
a batch of devices can be programed  without user interaction on the computer.

But I would be happy with any programmer that I could use natively on Linux that doesnt cost more then $300


 

Offline david77

  • Frequent Contributor
  • **
  • Posts: 804
  • Country: de
Re: OSHW Universal Programmer design proposal
« Reply #15 on: January 04, 2013, 11:31:32 pm »
There are cheap universal programmers from china out there that work reasonably well. I have one of the TOP branded ones, it cost me about 100 EUR shipped from Hong Kong about 10 years ago. The main problem I have with it is the pretty much non existent manufacturer support (no new devices supported) and the really lousy software.
Wouldn't it make sense to reverse engineer one of those programmers and provide a better software solution as open source? I can't see how you could possibly beat their price even as a kit.
That said I have no idea how/if that is feasible, just throwing it out there.
I tried for some time to figure out their device description files but got nowhere.

 

Offline tridentsx

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: OSHW Universal Programmer design proposal
« Reply #16 on: January 05, 2013, 02:25:59 am »
That's already been done look at the toprammer project. There has been other attempts for open source universal pin drivers such as http://www.edaboard.com/thread227388.html

If I had the time I would start a kickstarter project for a programmer that's USB powered, uses a arm with USB interface that fronts an fpga for the pin driver. The arm would controll all the voltages and it would also act a a jtag interface.

The project should also offer adapters for the most common surface mounted packages.
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2107
  • Country: au
    • DIGSYS
Re: OSHW Universal Programmer design proposal
« Reply #17 on: January 05, 2013, 03:12:01 am »
After going through all the usual - design / make my own, bought expensive units, then cheap units .. yadda yadda, I finally settled with -
Galep-5 from  www.conitec.net/english/pricing.php
It's not uber-cheap, but the Germans can make good stuff, and it has a HUGE library. The *MAIN* reason I went with it, is that they
PROMISED to release a development kit for it, so "we" could create our own device algorithms !! They promised me for 2-3 years now,
and it's always soon, or on hold, then soon again. Software is quite nice as well. It would be the PERFECT base for user modifications.
IF there's anyone who lives near them, can you PLEASE go visit them and whack them upside-the-head and tell them to pull their finger out !
As others have said, with the amount of complex ICs around, and cheap units, you'd really be wasting your time starting from scratch.
Hello <tap> <tap> .. is this thing on?
 

Offline tridentsx

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: OSHW Universal Programmer design proposal
« Reply #18 on: January 05, 2013, 04:13:47 am »

I have been close to pull the trigger many times for the conitech but its just a bit to rich for hobby use, my pain threshold is up to $300. that programmer is close to twice that.
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2107
  • Country: au
    • DIGSYS
Re: OSHW Universal Programmer design proposal
« Reply #19 on: January 05, 2013, 04:40:19 am »
Quote from: tridentsx
I have been close to pull the trigger many times for the conitech but its just a bit to rich for hobby use, my pain threshold is up to $300. that programmer is close to twice that.
I can well understand the cost / usage dilemma. It used to be a lot worse in the "old" days though, my ALL07s, ALL11s etc cost in the $1,000s.
They all still try to slug you for adapters, but it's very easy to source cheap (price) compatible ones on ebay.
I still have a complete ALL07, with the PLCC adapters. Haven't had the heart to ditch it :-)  I'd offer it to you for P+P, but it probably won't do
any of the new stuff. I think the device list is still around on www (or I can send it), IF remotely interested.
Hello <tap> <tap> .. is this thing on?
 

Offline tridentsx

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: OSHW Universal Programmer design proposal
« Reply #20 on: January 08, 2013, 06:29:08 am »

Thanks for the kind offer, but I already have a TOP programmer that is old obsolete and only windows that I can use if needed.

Have been thinking a lot the last night maybe I will attempt making a true universal pin driver for 48 pins,

If I would design it I would use an MCU such as an LPC1768 (very inexpensive development tools) controlling an fpga that works as a pin matrix for the data connections to the device under test,
I would use shift registers for VPP, VCC and VSS to controll the supplies of power to the device under programming, outputs of shit registers would connect to transistors feed by the supplies
I would use two DAC's controlled by the MCU for VCC and VPP.
Use a simple pullup to VCC to support 1.2 - 6.5 volts for the data lines connected to FPGA IO

The fpga would be fed by the MCU each device type would neeed a very simple verilog implementation.

This would be quite simillar to how the TOP devices are implemented, only they are not true universal since only certain pins has been connected to VSS, VCC and VPP

Will see if I get time over to make a schematic
 

Offline tridentsx

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: OSHW Universal Programmer design proposal
« Reply #21 on: January 27, 2013, 01:40:59 am »

I have been thinking about how to make an universal PIN driver and I have a basic idea,

since I am not an electrical engineer, just some college in software engineering, I would like some feedback.  The attached schematic is just for one PIN and very high level. Please give comments.

VCC is the 1.8 v that the FPGA is running
VCCX is the variable voltage the target chip is using
VPP Programming voltage

The test position ZIF PIN is a pin on the ZIF socket
The test position FPGA IO is one FPGA IO pin
The shift register is used to setup supply rail layout on the ZIF socket, ie to setup the VSS VDD and VPP pins for programming

I am thinking about two s/w controlled DC-DC regulators one from 0 - 7 volts and one 5 - 28 volts
There would also be a need to meassure current consumption on both rails for faulty device detection, incorrect device insertion detection and PIN driver self test

Let me know what you think, sorry for hijacking the thread. Maybe I should start another thread?

Carl
 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf