Automatic JTAG Pinout Detection

Figuring out the JTAG pinout on a device turns out to be the most time consuming hardware portion of many hacks. [hunz] started a project called JTAG Finder to automatically detect the JTAG pinouts on arbitrary devices using an 8bit AVR ATmega16/32L microcontroller. Check out the slides (PDF) from the talk as they break down how one finds JTAG ports on an arbitrary device, with or without a pinout detection tool. [hunz] is looking for people to pick up the project where he left off.

Once you determine the correct pinout, you will need a JTAG cable: there are two main types, buffered and unbuffered, both of which I have soldered up and tested from these circuit diagrams (image of completed buffered cable here). The software most hardware people use today are the openwince JTAG Tools. To get the JTAG Tools to compile, grab the latest source directly from their CVS repository.

The last time we featured JTAG was with regards to Linksys devices, but the tools listed above can be applied to any device with JTAG.

11 thoughts on “Automatic JTAG Pinout Detection

  1. ABOUT DAMN TIME, is all I can say! (and that would be all caps, if this infernal site didn’t make all my first-person pronouns improper along with slaughtering my grammar!)

    Seriously, good job, guys! I’ve tossed this idea around for a while and never got into it enough to implement it. Now, can it be expanded to ports that have extra unrelated pins? How much extra time would that add to the detection process?

  2. This is a great project, but I’m not sure about the choice of microcontroller. It’s clear that AT90USB would be better suited since it has a USB controller built in, no USBSerial gateway needed. Even the Cypress EZ-USB/FX2 would have been a good choice, and it has been around for a while. Both chips would achieve the future USB goal, and should perform much better since they can be clocked higher (16 MIPS for the AT90USB, 4 MIPS for the EZ-USB/FX2).

    As for easy, right-now implementations, perhaps SparkFun’s USB Bit Wacker board would suffice. It’s a PIC 18F2455/18F2550 on a board for $25 assembled, $20 kit. Add in some glue and you’re set. There’s not enough pins for 30 wires at a time, but that can be fixed with a few extra ICs.

    Anyway, great project. I’d love to hear success stories using this software.

  3. This is an idea that should of been up this way before and it’s an idea that deserves a microcontroller. Actually as we’ve seen a few variations of the ultra low budget logic recorders… seeing a few variations of a JTAG pinout detector would be a cool thing.

    I wonder who can develop the most functional detector that’s the easiest to build!

  4. This is awesome!

    Funny enough, I was just looking for a JTAG pin detection method 1 day before this got posted.

    I personally like the PIC18L2550 (it has a USB interface built-in). I may try implementing this just for fun.

  5. When I can’t find the appropriate datasheets, I just find the most obvious 4 pins/pads, check out the impedance and do automatic checking of the 3 inputs. With just a parallel port.
    Of course it becomes less obvious when dealing with more than 4 available pins/pads.

  6. Someone should make an idiot-proof howto for this. I know virtually nothing about EEE, but I’d still like to be able to fiddle with the jtag port on my 2Wire 2700HGV router and some other hardware too :( I can’t figure out how to do it manually with a multimeter/oscilloscope :(

Leave a Reply to MyselfCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.