Making a jtag2updi adapter

This article is about selection and reprogramming of an adapter to make a jtag2updi adapter using the code published at https://github.com/ElTangas/jtag2updi.

The purpose is for programming some of the newer AVR chips that use UPDI.

Above is a JTAG ICE that I purchased, but I did not check the pics carefully enough and fell foul of the Chinese Cheats. The chip arrowed is the USB-RS232TTL chip, it is a PL2303HX which will not work in Windows 10 since the driver was poisoned many years ago.

I have a small stock of PL2303TA for replacing such things, and the fix to make this usable on recent Windows is the unsolder the chip shown and replace it with a PL2303TA. You probably don’t want to do that, so don’t buy things with a SSOP28 package, they are probably Prolific and just safest to avoid.

Once the chip was upgraded, the thing was easily programmed over the COM port using the existing bootloader using avr-aosp.py as per the instructions at https://github.com/ElTangas/jtag2updi.

 

Above is a Hwayeh adapter with a CH340T USB-RS232TTL chip on it (next to the USB plug), and it does work in recent windows. Don’t assume that adapters packaged in this type of enclosure are all like this… you need to see pics to get a hint of the serial chip. In this case the SSOP20 is a strong hint of a WCH chip, but the best hint is to be able to read the label on the chip… if the seller gives that view of the internals.

Easily programmed, the window to talk to the bootloader is quite short so act quickly. The console log follows.

D:\src\jtag2updi\build>python ..\avr-aosp.py -op erase -serial com8

INFO

S = AVRBOOT #programmer id
V = 10 #software version
v = ? #hardware version
p = S #programmer type
a = Y #autoincrement support
b = ? #block mode support
t = [7400] #supported device code
s = 02941e #signature
N = ? #high fuse bits
F = ? #low fuse bits
r = ? #lock bits
Q = ? #extended fuse bits

ERASE program memory


D:\src\jtag2updi\build>python ..\avr-aosp.py -serial com8 -op write -file JTAG2UPDI.hex

INFO

S = AVRBOOT #programmer id
V = 10 #software version
v = ? #hardware version
p = S #programmer type
a = Y #autoincrement support
b = ? #block mode support
t = [7400] #supported device code
s = 02941e #signature
N = ? #high fuse bits
F = ? #low fuse bits
r = ? #lock bits
Q = ? #extended fuse bits

WRITE program memory [JTAG2UPDI.hex] #3178 bytes
0...10...20...30...40...50...60...70...80...90...100 - done.