• 1
    Step 1, convert Digispark to debugging probe

    The Attiny85 firmware need to disable Reset. If you don't have a high-voltage programmer, you won't be able to program it anymore.

    With a bootloader, you don't need a high voltage programmer to update the firmware. However, if your bootloader got damaged or you want to change the fuse, you still need a high voltage programmer.

    I used micronucleus bootloader. You can get the hex file from here.

    Before programming bootloader, use ISP programmer to set fuses correctly. I used C1 DD FE fuses. Make sure you checked SELFPRGEN.

    Then you use the command-line tool in micronucleus's repo to upload the dwire-debug's firmware.

    If you do it correctly, everytime you plug in the ATtiny85 board, it will appear as a Vendor-Specific Device with PID:0x0753 & VID:0x16d0. If you don't upload firmware, it will automatically become USBtinySPI with PID:0x0c9f & VID:0x1781 after 6 seconds.

    After you confirm your bootloader is working, set fuse RSTDISBL with the ISP programmer.

  • 2
    Step 2, prepare dwire-debug

    I did some improvement on dwire-debug and created a release here.

    If you are using Mac, you can download binary, add execute permission with chmod +x dwdebug, install libusb with brew install libusb libusb-compat .

    If you are using Windows, you need to use libusb-win32 driver for ATtiny85. Refer to Readme of dwire-debug repo for more info.

    For other OS, try to compile the source in the release.

  • 3
    Step 3, reprogram fuse on ATmega328p

    Connect all wires and USB cable. run the following command in terminal to read fuse. If the avrdude on your computer locates in a different location, change the path accordingly.

    /Users/sundeqing/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/Users/sundeqing/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -patmega328p -cusbtiny

    Check if the signature and fuses are read correctly.

    If so, program new fuse values to enable debugWIRE and disable bootloader.

    /Users/sundeqing/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/Users/sundeqing/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -patmega328p -cusbtiny -U lfuse:w:0xEF:m -U hfuse:w:0x9B:m -U efuse:w:0xFD:m

    Power cycle your board to make fuse change take effect.