Skip to content

Week 04 - Embedded Programming

Fab Lab BCN equipment videos

Group Assignment

  • Demonstrate and compare the toolchains and development workflows for available embedded architectures
  • Document your work to the group work page and reflect on your individual page what you learned

ATTiny420 Setup Guide


Physical connection

More info on hardware coming soon!

../../images/week_4/atiny_hardware.jpg

Install Board Package

This board package can be installed via the Arduino Board Manager.

Boards Manager URL:

http://drazzy.com/package_drazzy.com_index.json

Steps:

  1. Go to File → Preferences
  2. Enter the URL above into "Additional Boards Manager URLs"

../../images/week_4/atiny_boardmanager.jpg

  1. Open Board Manager from the left side of the Arduino window
  2. Search for "megaTinyCore by Spence Konde"
  3. Click Install
  4. For best results, choose the most recent version

Issue: Board Manager Timeout Error

If you encounter a connection timeout error during installation:

../../images/week_4/atiny_issue.jpg

Fix:

  1. Navigate to:
User → username → .arduinoIDE → arduino-cli.yaml
  1. Open the file in Visual Studio (or any text editor)

  2. Add the following:

network:
  connection_timeout: 300s
  1. Increase the timeout duration if necessary
  2. In this case, the timeout had to be increased to 1000s

Example:

network:
  connection_timeout: 600s

../../images/week_4/atiny_issueresolution.jpg


Setup to Load Code to the Microcontroller

1. Select the Board

  • Go to Tools → Board
  • Select the correct ATTiny board

../../images/week_4/atiny_selectboard.jpg


2. Select the Port

  • Go to Tools → Port
  • Select the correct port

Once the board and port are set, additional options will appear in the Tools menu.

../../images/week_4/atiny_selectport.jpg


3. Select the Programmer

  • Go to Tools → Programmer
  • Select SerialUPDI – Slow

If this does not work, try another option.
(There is a more precise way to determine this, but it is more advanced.)

If the connection is faster, you may be able to use a different programmer, but in this case it failed on this microcontroller.


Upload the Program

To upload your sketch:

  • Go to Sketch → Upload Using Programmer

../../images/week_4/atiny_progupload.jpg