This Project Is In This List

Description

This is an old hack that I did years ago. I want to start playing with Altera FPGA software, but my old Byte Blaster parallel port dongle won't install under Windows x64.

I dusting off my old project and make my USB Blaster clone. This is slow, but not a couple of weeks waiting for a $6 clone arriving from China slow. So this will be my back up plan if the dongle DOA or come in late.

This is designed around a TI TUSB3410 USB to Serial chip which TI uses in their programming dongles for the MSP430 series. This was also popular in earlier mobile phone serial interface dongles until cheaper chips like PL2303 clones flooded the market.

It has a non-enhanced 8052 core running at 2 mega cycle/sec (24MHz/12) and requires multiple cycles per instruction.

This was a demo for the TUSB stack. It is as mongrel as it can be and it shows the power of Open Source very nicely.

Details

USB device stack:Micah Dowty wrote the pure polling USB code which I changed into interrupt + polling using 3-4 of TI App notes and use header file from libusb for the data structure. I strip off most of TI's callback functions that are hard to understand. The resulting code works kind of like V-USB and work well under SDCC.

USB_JTAG:The hight level code came from ixo.de : http://ixo-jtag.sourceforge.net/#usb_jtagusb_jtag project that uses Cypress FX2 which is a modern day 48MHz 8051 chip. The code was nicely optimized and with machine code for the 8051. I changed the low level GPIO bit banging code and grafted the high level code on to my USB stack.

I ported the EEPROM code and USB descriptor code which are critical for cloning Altera USB Blaster back.

Hardware:

TUSB3410 connection - bus powered

Power supply and EEPROM (not actually used)

Level Translation:

Level Translation:

VIO is the I/O voltage of the target. It comes in via series resistor R20 to power the level translation circuits. Q5 is a shunt regulator. It clamps down the I/O rail to limit the voltage to about 3.4V if you connect VIO to say a 5V system.

Note: U1 has an absolute maximum suply voltage of 6.5V, it is only spec for up to 3.6V for normal operation.

For the signals going out of PCB, it passes through U1 which acts as a level translator. If my target operates on 1.8V, U1 would be on a 1.8V power supply and its output would be between 0V to 1.8V. The 74LVC series is great for that as its logic input can exceed the power supply voltage. There are series terminating resistors on the output to reduce signal reflection as the dingle is usually connected to a target using loose wires.

Note: 74LVC part is very fast and they require terminating resistors if your track is longer than about 0.5 inches!

Now what about the extra bits of transistors circuits?

Q4 (in Cascode topology) is a level translation circuit that convert the incoming TDO back to 3.3V for the TUSB3410. The capacitor C7 is for compensating for Miller capacitance that would otherwise slow down the circuit.

Q2 & Q3 forms a bidirectional level translation for the TMS/SDWIO. (SWDIO and SWDCLK are for ARM debugging not needed for USB Blaster Clone)

" Tests show that the circuit operates easily up to 300kHz. The major impediment to fast operation is the delay that occurs when Q1 comes out of saturation on a rising edge."

I played around with the circuit in LTSpice and figured out how to improve the performance by adding a couple of capacitors that speeds up the discharging of the Miller capacitance that caused the slow down.

(My LTSpice circuit on left)

LTSpice plot: Blue: 1.8V input, Green: 3.3V output.

I played with the pull up values to improve the rise time. Notice that the delay is gone as the capacitor C1 discharged the Miller capacitance. By the way, my simulation is for 10MHz!

This is how it looks like translating from 3.3V down to 1.8V

How is this useful vs the usual ones built with MOSFET circulating on the Internet?

You'll have a bit of trouble using that part
with that wide spread of a range of a threshold
for level translation. The BJT transistors have a input threshold of around 0.7V with a much smaller spread, so it can easily work down to 1.x volt range and not limited for 3.3V. I/O voltages are going down these days and 3.3V is only the first stop.

This is just here to show that discrete bidirectional level translation can be done using discrete parts that I have lying around. For any logic translation, I would not recommend this circuit as it has...