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
