You can reprogram these ATtiny breakouts to run your own firmware. However, the boards do not come with a bootloader. If you want to do development on seesaw (e.g. changing the configuration) you need a separate UPDI programming setup! You can build this setup with a 1K resistor and a USB to Serial cable or with the UPDI Friend board.
- USB to Serial cable power to ATtiny VIN (red wire)
- USB to Serial cable ground to ATtiny G (black wire)
- USB to Serial cable RX to 1K resistor (white wire)
- USB to Serial cable TX to 1K resistor (green wire)
- 1K resistor to ATtiny UPDI pin (white wire)
- UPDI Friend PWR to ATtiny VIN (red wire)
- UPDI Friend GND to ATtiny G (black wire)
- UPDI Friend UPDI to ATtiny UPDI pin (white wire)
Install megaTinyCore
You can compile code for the ATtiny using the megaTinyCore board support package in the Arduino IDE. There are detailed installation instructions in the megaTinyCore GitHub repository. The following steps outline how to install it using the Boards Manager.
In the Arduino IDE, go to Preferences and add the megaTinyCore boards manager URL to the Additional Boards Manager URLs list:
http://drazzy.com/package_drazzy.com_index.json
Go to Tools - Board - Boards Manager...
In the Boards Manager, search for megaTinyCore. Click Install to install the board support package.
After the megaTinyCore finishes installing, go to Tools - Board - megaTinyCore and select the board list that includes your ATtiny.
Then, select the chip of your ATtiny.
Next, set clock if needed. The default 20 MHz clock option is only valid if powering with 5V. If powering with 3.3V, select 10 MHz for the clock.
Under Programmer, select SerialUPDI - SLOW: 57600 baud.
Finally, go to Preferences and check ON Show verbose output during upload. This will give you the upload details and progress in the monitor at the bottom of the Arduino IDE, which is very useful for debugging.
Now you can compile code with the megaTinyCore to upload to the ATtiny with the UPDI programmer by going to Sketch > Upload Using Programmer.
This simple example blinks the ATTiny816 onboard red indicator LED on pin 10.
void setup() { pinMode(10, OUTPUT); } void loop() { digitalWrite(10, HIGH); delay(1000); digitalWrite(10, LOW); delay(1000); }
If using this with the ATTiny817, you'll want to update the pin to 5, as shown below.
void setup() { pinMode(5, OUTPUT); } void loop() { digitalWrite(5, HIGH); delay(1000); digitalWrite(5, LOW); delay(1000); }
Upload the sketch using the UPDI programmer. You should see this output in the monitor after the upload has completed successfully:
The red LED on the ATtiny should be blinking!
Text editor powered by tinymce.