Flashing the Commander X16 SMC


Programming the SMC with avrdude would look something like this:

avrdude -CATTinyCore\hardware\avrdude.conf -v -pattiny861 -cstk500v1 -PCOM3 -b19200 -Uflash:w:firmware_with_bootloader.hex:i -Ulfuse:w:0xF1:m -Uhfuse:w:0xD4:m -Uefuse:w:0xFE:m

Above command is borrowed from Wavicle and slightly modified.
For more information about avrdude, have a look at its documentation.


When programming the SMC with a minipro (TL866A or TL866II) and the Xgpro software, it is necessary to specify the fuse bits manually.
The hex file with bootloader can be loaded directly into the software but the fuse bytes needs to be set like this:

Note that the fuse bytes, marked with red, are the same as in the above avrdude command


The TL866xx series of programmers can also be used toghether with the opensource minipro program.
If you want to program the fuses together with the firmware, you need to create a file called fuses.cfg

The file should contain the following:

lfuese = 0xf1
hfuse = 0xd4
efuse = 0xfe
lock = 0xff

The command for programming the SMC is:

minipro -p ATTINY861@DIP20 -c config -w fuses.cfg -c code -w firmware_with_bootloader.hex

If the chip has previously been programmed for the X16, you can propably skip the part:

-c config -w fuses.cfg

Above borrowed from Stefan Jakobsson on Discord