Machines, Programs and Tools

Mac computer, screen, GitLab, HTML site, patience.

introduction

This week we had to program a PCB board we made. The board I used was from week 4. I programmed it using UPDI pins on a ATiny412 like in week 4 using Arduino.

Projects

Soldering : Test Board

I started with soldering the test board. It came out okay because that day I was soldering the test piece I I had seizures in my hands so I wasn‘t as steady. The test board was a small board with a ATiny412 button and LED light. The boards function was to make the LED blink

Item list

Name Quantity
Item1 ATtiny 412. 1x
Item2 RES 1K OHM 1% 1/4W 1206. 1x
Item3 LED Blue Clear 1206 SMD. 1x
Item4 Capacitor 1 uF SMD. 1x
Item5 Single Row Side-Insertion Pin 1X3 2.54mm. 1x
Item6 Button 6.0x6.0mm. 1x

ATtiny attached with light blinking.

I followed these instructions to program the ATtiny.

Link to ATtiny board - Árni Björnsson - Fab Academy 2022

  • Arduino program to Blink Code
  • Arduino program to Blink Code Zip

  • Programing board and cable.

    I programmed the board using UPDI pins on ATiny 412 by connecting the USB-FTDI cabel to a serial UPDI 3 pin board that was connected to my test board. I used Arduino to upload the code.


    Arduino program setup.

    I added a megaTinyCore in Boards Manager to enable me to program the ATiny412. In the program I chose SerialUPDI - SLOW:57600 baud. I uploaded the code by going to Sketch- Upload using programmer.


    Arduino program to Blink

    #Blink
    /*
    	Blink
    											  
    	Turns an LED on for one second, then off for one second, repeatedly.
    											  
    	Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
    	it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
    	the correct LED pin independent of which board is used.
    	If you want to know what pin the on-board LED is connected to on your Arduino
    	model, check the Technical Specs of your board at:
    	https://www.arduino.cc/en/Main/Products
    											  
    	modified 8 May 2014
    	by Scott Fitzgerald
    	modified 2 Sep 2016
    	by Arturo Guadalupi
    	modified 8 Sep 2016
    	by Colby Newman
    											  
    	This example code is in the public domain.
    											  
    	https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
    */
    											  
    // the setup function runs once when you press reset or power the board
    void setup() {
    	// initialize digital pin LED_BUILTIN as an output.
    	pinMode(26, OUTPUT);
    }
    											  
    // the loop function runs over and over again forever
    void loop() {
    	digitalWrite(26, HIGH);   // turn the LED on (HIGH is the voltage level)
    	delay(1000);                       // wait for a second
    	digitalWrite(26, LOW);    // turn the LED off by making the voltage LOW
    	delay(1000);                       // wait for a second
    }
    
  • Arduino program to Blink Code
  • Arduino program to Blink Code Zip

  • Videos from week 6.

    Xiao board blinking. I used Arduino to program the chip and used these instructions to do so

    SeeedStudio



    ATtiny attached with light blinking.


    Summary

    This week went really well. I built this week on knowledge from prior weeks. Mostly week 4. The LED SMD broke so I had to replace it and that is why the light ended up being green not blue in the video. I am not sure why the LED light burned out but the replacement one works fine. I put the same program in XIAO-RP2040 to see if it would work the same way. There wasnt any difference between the boards.