< week.8@martin.magal@fabacademy.2013

week 8: embedded programming (Mar 13)


about the assignment

the goal was to program the board made in week 6 to do something, or many somethings.

tools used

  • the "echo hello-world board" that i made in week 6
  • EAGLE
  • fab modules
  • the SHERLINE mill
  • i didn't used my FabISP since it didn't survive very long, having too many flimsy traces and improvised jumpers. instead i used the AVRISP2, a "tool used for field upgrades of Atmel 8-bit AVR microcontrollers with ISP or PDI interfaces".
  • the arduino integrated development environment, or in short, the Arduino IDE
  • PCB design and milling

    the board from week 6 didn't mill very nicely, as one can see here:


    so i designed and miiled a new one, and this time it turned out better.
    this time i redesigned the board so that traces were not as close to one another.
    that required two jumpers, since i didn't want to run 3 traces under the IC, only two.
    the pads for the jumpers can be seen on the upper right area.



    stuffing

    the stuffing as usual takes me a looooong time, but went well.
    i improvised wire jumpers, i guess there must be a better way! this step took me quite a long time, it proved quite difficult to solder the wire jumpers.
    because they dissipate heat so well, while soldering one end the other end kept getting unsoldered!
    i also suspect the i made the pads for the jumpers too small, which also didn't improve the situation.


    programming

    the sketch used to program the attiny was the BUTTON sketch from the arduino IDE exapmles folder.
    a change had to be made to the sketch to adapt it to the different design of our board.

    the pin numbers inn these two lines:
  • const int buttonPin = 2; // the number of the pushbutton pin
  • const int ledPin = 13; // the number of the LED pin

  • had to be changed to like this:
  • const int buttonPin = 3; // the number of the pushbutton pin
  • const int ledPin = 7; // the number of the LED pin

  • in the next 2 pictures one can see the compiling and uploading of the sketch to the board:


    here i changed the sketch to make the LED blink with different delays: