Update attiny firmware on StepperUNO
On the stepperUNO there are 2 attiny microcontrollers. Their purpose is to send the step clock signal to each motor.
Both of them contain a firmware that might be needed to update.
Note that you might have to use the right library version against the version of the attiny84 firmware. See the compatibility table below.
|stepperUNO 1.4||attiny_stepperUNO_v1.2.ino |
|stepperUNO 1.4.1||attiny_stepperUNO_v1.2.ino |
The attiny firmware is an Arduino sketch provided in the library itself.
Open the library zip file then go to the examples folder.
The appropriate attiny sketch is called attiny_stepperUNO_vx.x.ino.
Locate the attiny's
The attiny's are the chips circled on the picture below.
The recommended programmer to program the attiny's is the Nanoprog
Prepare the IDE
We will use the Arduino IDE to program the attiny's.
Download it from the arduino website and install it. https://www.arduino.cc/en/software
In the IDE go to Tools -> Board: -> Boards Manager...
In the filter box on the top just enter tiny. Then the package ATTinyCore by Spence Konde will appear in the list (usually the first entry). Install the latest version of this package.
Now open the attiny sketch with the IDE.
Then select Tools -> Board -> ATTinyCore -> ATtiny25/45/85 (no bootloader)
Prepare the chip
Pay attention to the polarity mark on the attiny and the direction they are mounted on the stepperUNO.
Remove one attiny chip form the stepperUNO. Be really careful and gently lift it with a flat screw driver from both sides.
Place the attiny on the Nanoprog. Make sure the polarity mark is facing toward the inside of the Nanoprog.
Upload the sketch
Connect the usb cable to the Nanoprog.
In the IDE select the right serial port in Tools -> Port:
Then upload the sketch with Sketch -> Upload (or just hit the right arrow button).
Program the second chip
The second chip procedure is the same execpt that we must give it a different address.
To do this just before uploading the sketch we need to modify it slightly.
Somewhere at the top of the sketch you will find the following line.
#define I2C_SLAVE_ADDRESS 0x4
Change this line into
#define I2C_SLAVE_ADDRESS 0x5
Then now upload the sketch this way.
Any stepperUNO must have one attiny flashed with address 0x4 and the other as 0x5.