Using TinyUSBboard to program another TinyUSBboard

Use case:

Start with a programmer

In order to write the default firmware on the TinyUSBboard we need a programmer.

You can use an existing TinyUSBboard (both rev.3 and the SMT rev.4 version) as programmer.

The method to create a TinyUSBboard as a programmer can be found here.

Breadboard setup

Setup your breadboard according to this image:

2014-12-07 11.37.40.jpg

Connect the following pins

Pin TinyUSBboard Target Pin
22 Gnd Gnd 8
20 Vcc Vcc 7
19 Sck Sck 19
18 MISO MISO 18
17 MOSI MOSI 17
16 SS Reset 1

Arduino-To-Atmega8-Pins.png

(Note that the ATmega8 pinout is basically the same as ATmega328 and others)

Get the latest firmware from the Matrixstorm website

Check if new versions are available on the Matrixstorm website.

Pick the version for the target chip.

Example: flashing a new unused ATmega328-PU

Download the bootloader firmware for the ATmega328-PU (without "P") and save it as default328_enus_lfxf7_hfxd0_efx04_v0x97x1.hex.

Cd with the terminal to the place where the file is saved and paste the following:

avrdude -c usbasp -p atmega328 -U flash:w:default328_enus_lfxf7_hfxd0_efx04_v0x97x1.hex:i -U lfuse:w:0xf7:m -U hfuse:w:0xd0:m -U efuse:w:0x04:m -B9

Now the new ATmega328-PU is flashed with the default firmware and can be used in the rev.3 board (or a new one).

Optional: change the TinyUSBboard back to the default firmware

Now the new ATmega chip is flashed the original ATmega8 could be changed back to the default state.

Download the latest firmware for the ATmega8.

Save it as default_enus_lfx3f_hfxc0_v0x97x1.hex and upload with Avrdude like this:

avrdude -c usbasp -p atmega8 -U flash:w:default_enus_lfx3f_hfxc0_v0x97x1.hex

Labels: TinyUSBboard

This page was last edited by BauweBijl on 2021/05/17 10:16:44.

Built with BGAEWiki by BauweBijl