OSHW Universal Programmer design proposal - Page 1
Forum section: electronics / general

author: hlavac
author_rank: Frequent Contributor
timestamp: December 12, 2012, 04:00:53 pm
content: 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 makeEasy to makeMaximum flexibility - universal pin drivers, scaleable in groups of 8 up to 48 or soNo FPGA / CPLD with hostile licensing policiesNo programmer required to avoid the chicken-egg problemPowered by a cheap wall socket adapter (24V/1A or so)Programmable logic threshold levels, including 1.8V logicTwo 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 registersUSB 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 systems160x100 mm board size limit so I can use my Eagle hobbyist edition to do itPreferably single sided boardsBecause 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 suppliesVariable 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 headersSocket 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 brickATmega32U4 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 sorryNo 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

author: shebu18
author_rank: Frequent Contributor
timestamp: December 12, 2012, 05:40:55 pm
content: 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.

author: hlavac
author_rank: Frequent Contributor
timestamp: December 12, 2012, 07:34:09 pm
content: I think it can be one side anyway, I can put the ATmega32U4 on the bottom sideSMD 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.

author: free_electron
author_rank: Super Contributor
timestamp: December 12, 2012, 08:16:07 pm
content: Quote from: hlavac on December 12, 2012, 04:00:53 pmyou 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 ...

author: chrome
author_rank: Regular Contributor
timestamp: December 12, 2012, 08:26:56 pm
content: Quote from: hlavac on December 12, 2012, 07:34:09 pmWhat?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.

author: hlavac
author_rank: Frequent Contributor
timestamp: December 13, 2012, 12:12:43 am
content: Quote from: free_electron on December 12, 2012, 08:16:07 pmWhat 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...Quote from: free_electron on December 12, 2012, 08:16:07 pmLots of them, but dirt cheap!Quote from: free_electron on December 12, 2012, 08:16:07 pmThat 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?Quote from: free_electron on December 12, 2012, 08:16:07 pmDatasheets, 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.Quote from: free_electron on December 12, 2012, 08:16:07 pmDepends 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!

author: free_electron
author_rank: Super Contributor
timestamp: December 13, 2012, 12:28:44 am
content: 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...

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: December 13, 2012, 12:46:54 am
content: 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.

author: EEVblog
author_rank: Unknown
timestamp: December 13, 2012, 01:13:06 am
content: 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'sallabout the software, device support, and user support when X doesn't work. It is ahugejob.I'd put it under the category of being "a mugs game"Dave.

author: EEVblog
author_rank: Unknown
timestamp: December 13, 2012, 01:16:05 am
content: Quote from: free_electron on December 13, 2012, 12:28:44 amThat brings back memories of an old project:Dave.

author: hlavac
author_rank: Frequent Contributor
timestamp: December 13, 2012, 09:38:47 am
content: 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 someIf 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.

author: EEVblog
author_rank: Unknown
timestamp: December 13, 2012, 09:43:49 am
content: Quote from: EEVblog on December 13, 2012, 01:16:05 amAnd holy crap, I just realised that was 20 years agoI'm getting oldDave.

author: Unknown
author_rank: Unknown
timestamp: December 13, 2012, 11:38:52 am
content: 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.

author: ptricks
author_rank: Frequent Contributor
timestamp: December 17, 2012, 01:01:16 pm
content: 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

author: tridentsx
author_rank: Regular Contributor
timestamp: January 04, 2013, 10:07:28 pm
content: There are many good reasons for an OSHW device programmer,1) Native Linux and OSX support2) Community additions, it can grow over time to be superior to commecrcial offerings3) 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 standardsThe 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 soa 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

author: david77
author_rank: Frequent Contributor
timestamp: January 04, 2013, 11:31:32 pm
content: 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.

author: tridentsx
author_rank: Regular Contributor
timestamp: January 05, 2013, 02:25:59 am
content: That's already been done look at the toprammer project. There has been other attempts for open source universal pin drivers such ashttp://www.edaboard.com/thread227388.htmlIf 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.

author: digsys
author_rank: Unknown
timestamp: January 05, 2013, 03:12:01 am
content: After going through all the usual - design / make my own, bought expensive units, then cheap units .. yadda yadda, I finally settled with -Galep-5 fromwww.conitec.net/english/pricing.phpIt'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 theyPROMISED 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.

author: tridentsx
author_rank: Regular Contributor
timestamp: January 05, 2013, 04:13:47 am
content: 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.

author: digsys
author_rank: Unknown
timestamp: January 05, 2013, 04:40:19 am
content: Quote from: tridentsxI 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 doany of the new stuff. I think the device list is still around on www (or I can send it), IF remotely interested.

author: tridentsx
author_rank: Regular Contributor
timestamp: January 08, 2013, 06:29:08 am
content: 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 suppliesI 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 IOThe 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 VPPWill see if I get time over to make a schematic

author: tridentsx
author_rank: Regular Contributor
timestamp: January 27, 2013, 01:40:59 am
content: 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 runningVCCX is the variable voltage the target chip is usingVPP Programming voltageThe test position ZIF PIN is a pin on the ZIF socketThe test position FPGA IO is one FPGA IO pinThe shift register is used to setup supply rail layout on the ZIF socket, ie to setup the VSS VDD and VPP pins for programmingI am thinking about two s/w controlled DC-DC regulators one from 0 - 7 volts and one 5 - 28 voltsThere would also be a need to meassure current consumption on both rails for faulty device detection, incorrect device insertion detection and PIN driver self testLet me know what you think, sorry for hijacking the thread. Maybe I should start another thread?Carl