The SP Duo is an In-System Programmer for Atmel's AVR series of microcontrollers. It can program the target CPU through the SPI or JTAG standards, fast. Hardware and firmware had been developed by Embedded Creations.
The adapter communicates with the PC via the serial RS232 port. A programming software must be installed on the PC to be able to upload the compiled firmware to the target.
Although equipped with a JTAG interface, the SP Duo is not useable for JTAG debugging. It is a programmer only.
How to Determine the SP Duo Version
The SP Duo hardware is based on an AVR microcontroller. There are currently two hardware versions. The first one contains an ATmega8, while an ATmega168 is built into the newer SP Duo 2.
You can use a simple terminal emulator to query the SP Duo's firmware version via the serial port.
Step 1: Connect the SP Duo to the target hardware. This is required, because the SP Duo draws its supply current from the target. Make sure to connect the correct plug, either JTAG or SPI. If in doubt, consult the manual of your target board. Using the wrong plug may damage your target hardware.
Step 2: Connect the SP Duo to the PC using a 1:1 serial cable with a female DB-9 connector on the PC side and a male DB-9 connector to connect the SP Duo.
Step 3: Start a terminal emulator on the PC, either Hyperterminal (not recommended, but available everywhere), TeraTerm (much better) or any other Windows program or Minicom on Linux.
Step 4: Configure the terminal emulator, using 115200 Baud, no paraity, 8 data bits and 1 stop bit. Disable any handshake and make sure you selected the right com port.
Step 5: Switch on the power supply on the target hardware. The LED on the SP Duo should lit up with green color.
Step 6: Enter Ctrl+V in the terminal emulator window. The SP Duo should immediately respond with its version number.
Firmware versions up to and including 2.2 are used on the older ATmega8 based SP Duo, while the newer SP Duo 2 requires version 2.3 or any later release.
Firmware Version 1.0
Initially the first adapters had been shipped with this version. There are two known problems with this version:
Problem 1: The programmer doesn't set the PROG-ENABLE line during SPI programming. This causes a problem with Ethernut 1.3 Rev-F and all previous Ethernuts, which use this line to switch between programming and UART I/O. Thus, during programming It is required to set the jumper on the Ethernut, which use located near the programming adapter.
Problem 2: The fuses had been misprogrammed and it is not possible for users to upgrade the adapter with a new firmware version.
Firmware Version 1.1
In April 2005 a few SP Duos had been shipped with this version. It fixes the PROG-ENABLE and the upgrade bug of version 1.0.
Problem: The PROG-ENABLE was not released after programming. This required to cycle the target's power supply.
Firmware Version 1.2
Soon after the release of 1.1 the firmware had been updated again. This version releases the PROG-ENABLE line after programming.
Problem: Initially the version number hasn't been updated. Some version 1.2 programmers still respond with version 1.1.
Firmware Version 2 (Beta)
Starting with AVRStudio 4.11 Build 410 RC3 Atmel removed the STK500 V1 support and switched to STK500 V2. This new protocol had been introduced earlier, but the old V1, which is expected by the SP Duo firmware, had been still include in previous releases of AVRStudio.
This firmware version had been successfully tested with AVRStudio 4.11. The AVR CPU used in the SP Duo is quite limited, so the STK500 V1 had to be removed to make room for the new V2 protocol. This introduced new issues:
Problem 1: Most Open Source programming software (e.g. uisp) still uses STK500 V1 and doesn't support V2. The latest 5.0 beta of avrdude claims to support the new protocol, but we have to find out, that this implementation (not even the latest CVS) doesn't work reliable with our new SP Duo firmware. Windows users may use AVRStudio or switch to the STK500.EXE command line tool. But there's currently no solution for Linux.
Problem 2: Not all CPUs had been tested with this firmware release, though it works fine with all Ethernut boards or other boards using the ATmega103/128.
Unfortunately egnite shipped a several Ethernut Starterkits with this new firmware. Blame their general manager for this bad decision. In case you own an SP Duo with this firmware, you may want to downgrade to version 1.1.
Firmware Version 2.1
(Minimum Version Required for AVR Studio 4)
This version fixes a problem with some older AT90 devices and the AT90CAN128. It had been successfully tested with AVRStudio 4.11 and avrdude 5.0 (using option -c stk500v2).
As with the previous 2.0 beta, the STK500 V1 protocol is no longer supported. Thus you may have to upgrade to AVRStudio 4.11 or later. In case you are using uisp or avrdude 4, you need to swtich to avrdude 5 or later.
Firmware Version 2.2
Once more Louis achieved the impossible and reduced the code size to squeeze in the ATmega256 support. This works with AVR Studio, but may provide problems when using avrdude.
Firmware Version 2.3
This is the first version for the SP Duo 2 hardware. Functions are almost identical to version 2.2. The problem of programming the ATmega256 with avrdude had been fixed.
Up- or Downgrading the Firmware
Note, that at least version 1.1 is required. Version 1.0 is not upgradable by the user. Another bad news is, at least for Mac and Linux users, that you need a Windows PC to change the SP Duo firmware.
Connect the SP Duo to the target hardware and the serial port of the PC. Switch on the target's power supply.
Next download one of the following firmware versions and the update utility. You may use the right mouse button in your browser window and select Download or Save As from the context menu.
SP Duo firmware version 1.1
SP Duo firmware version 1.2
SP Duo firmware version 2 (Beta)
SP Duo firmware version 2.1
SP Duo firmware version 2.2, recommended for the original SP Duo
SP Duo firmware version 2.3, recommended for the SP Duo 2. Will not work with the original SP Duo hardware.
This update utility must be used for the original SP Duo. Be aware that the update utility is different from the one that comes with the AVRStudio package.
Use this one for the newer SP Duo 2.
On the Windows command line enter
update.exe spduo22.enc -COM1for the original SP Duo or
update-sp2.exe spduo23.enc -COM1for the newer SP Duo 2. You may replace spduo22.enc or spduo23.enc with the version to upgrade or downgrade and COM1 with the serial port you use for upgrading. You should get an output similar to
update v1.0 - Copyright (C) 2003 Atmel Corporation COM1 opened. Transferring.. 100% done. Target updated successfully.
avrdude 5.0 binary for Windows (WINAVR) is available at
For Linux you can download the latest source of avrdude from
AVR Studio (Windows only) is available at
More Questions and Answers
Can I use the SP Duo for JTAG Debugging?
No, you can only upload or download FLASH and EEPROM memory contents or set or clear the fuses and lock bits.
AVRStudio offers to upgrade the STK500. Should I?
No, the SP Duo is no STK500 or ATJTAGICE clone. Thus, the firmware upgrade offered by AVRStudio will not work on the SP Duo. Ignore this message and AVRStudio will work just fine with the current SP Duo firmware.
I accidently let AVRStudio do an upgradeand the SP Duo stopped working. Can I
In some cases it has been reported, that the AVRStudio upgrade will indeed spoil the SP Duo firmware. You can re-enable the SP Duo by uploading any original SP Duo firmware version.
Can I disable the AVR upgrade request?
Andreas Heinzen found a solution by modifying the following registry keys: