HappyJTAG2 – JTAG AND SPI AVR8 interface using ATmega32

New version released ! V2.45 (Check version list for details)

This construction is based on HappyJTAG Idea, to implement JTAG interface into target avr system and debug it remotly via USB, without specific JTAGICE hardware. All job is done by PC softraware. HappyJTAG version is easy , but not powerfull enough.There is barriere with performance, if you are manipulating with bits via USB interface. USB trafic is to huge to be effective.

Happy JTAG2

This is why I have realized more poverfull version HappyJTAG2.This version uses specialized FT2232 ( or FT2232H ) chip, which has integrated JTAG interface on chip. It radically reduces USB interface communication and speed up overall process. There are two channels in FT2232, Channel A is used for JTAG and channel B is still free for standart serial communication between target and host PC.


Unfortunatly, the FT2232 chip requires more external components than FT232 chip. For example, external crystal oscillator, few more resistors and so on. But the result is balanced, because of overall performance is 100 times better if you compere with original HappyJTAG version.


HappyJTAG2 hardvare is standart published in datasheets, as you can see from schematic file. The main idea is to integrate FT2232 in target board and to use USB interface as standart target board interface for all communication, serial as well as JTAG or SPI. But there is also possible to replace target AVR8 with JTAG or SPI connector and to operate this interface as standart AVR JTAG or SPI interface ( remember, there is not in/out signals level convertors and so on, you have to add them to interface in this case )


All logic is covered by PC application. This application has two connection One is via USB to target and second is via TCP to AVRStudio. All commands are interpreted to FT2232 commands and sended to target FT2232 chip to process JTAG and SPI data integrchange. This PC software works in two modes:
The first mode alows run as independent software. There is support for connecting target via JTAG or SPI, read signature, reset target, download software (*.hex) into tagrget and to manage target fuses (read, write).
The second mode is AVRstudio mode. In this mode PC software interprets AVRStudio requests and communicate with target via JTAG or SPI. For AVRStudio it works as JTAGICEMK2 emulation.
Since version 2.31, there is no need for external Virtual Serial Port emulator. The HappyJTAG2 emulates one of serial port COM1-COM4 byself. You just have to start HappyJTAG2, select “ComX port emulation” radiobutton and open AVRStudio. In AVR Studio choose COMx ( pre-set in menu ) port for JTAGICEMKII device. Its all !

However, external serial port emulator its still supported. You can use third party freeware software and utility, for exaple HW group´s “Virtual Serial Port” . You can download this emulator from :
HW Virtual serial port

This port is bridge between COM port oriented serial commmunication of AVRStudio and TCP oriented communication of HappyJTAG2 PC software. This is why you have to set up VirtualSerialPort into mode, where it redirects communication from COM port to TCP. You have to enter IP address and port 2232 into Virtual serial port and let it run before you setup AVR studio to work with JTAGICEMK2 hardware and run HappyJTAG2 pc software. You have to connect HappyJTAG2 PC software with VirtualSerialPort by pressing “”Connect to AVRStudio” button. Dont forget to set baud rate as high as possible (115000) in AVRStudio dialog box, because it is limitation factor for overall performance.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top