STAR Firmware by JonnyC - Source Code and Explanation

Being completely new to programming ATtiny, coding C and using Atmel studio, I ran into several situations which I like to share for others, to whom all this is unknown territory as well.

  • The programmer from Fasttech (SKU 1002900) works.
  • I took a SOIC clamp from ebay, see pic above, and changed the connector. The single lines of the cable had to be adapted, the link to flashlight-wiki in the OP helps a lot, as do TomE and Sirius9 in this thread.
  • I needed to install the USBasp driver that is mentioned on flashlight-wiki. Just copying the missing libusb.dll to the avrdude directory or a windows directory was not enough. With this driver avrdude can now reach the MCU.
  • The clamp sometimes does not make contact to the ATtiny13A for several tries, but it always does in the end.
    I position the clamp not too tight to the board but slightly higher. Then I gently rotate the clamp back and forth and test with avrdude again and again until it has contact.
  • I googled for Atmel Studio 5.1 and found an installation file (“as5installer-stable-5.1.208-full.exe”) that is 631.208.120 bytes in size. It installed and works fine to load, change and compile the code. Comfy’s brilliant howto must have saved me an hour at least.
  • I first changed the code using windows-editor. Line-break gave very interesting results when compiling and I had to start over again. I now change the code in Atmel studio, but turning off line-break might help as well…
  • Don’t fiddle with fuses unless you know what you are doing. I did (fuse 78), it cost me a driver. I then found a ‘fuse calculator’ on this website which explaines a lot.
    This is what I believe to have understood: Fuses are 2 bytes of basic settings which will not be changed by the code itself. Important for us is the MCU frequency, which should correspond to #define F_CPU. So low fuse is 75 for 4800000 and 7A for 9600000. No other low fuse should be necessary.
    Low fuse 79 is like 75 but only with one setting changed: the start up time (SUT) from +4ms to +64ms. I believe this is not relevant for our use, so fuse 79 simply works as well.

greetings
HQ