Project 7 - Embedded Programming

To make the board from week 5 work I did a lot of tutorial reading, there is a list for reference at the bottom of this page. My first major problem was that the ATtiny wsn't connected to VCC. I also had a capacitor in the wrong location, as circled below. The capacitor was meant to go between GND and VCC to smooth out changes in current, but here it's connected to the reset pin.

vacuume bubbles

After fixing these by jumping wires and removing the capacitor, my board still didn't work. In the mean time I milled a FabDuino with an ATmega328p chip from the PNGs posted on the Fab Website. Then I went back and realized I also did not connect the SCK pin. Time to start with a new board layout. This time I followed this tutorial pretty closed and made a new programming board. Note, pin 8 of the Attiny interests very closely with one of the traces, I just cut this with an exacto to break that connection before soldering on the components. many boards

When this new board still didn't work I banged my head against the table and didn't know what to do. I checked the schematic again, everything was connected this time. I laid it out and compared it to the schematic, everything was still connected. I had 3 programming boards and 1 fabISP and none of them worked. many boards

I rechecked the drivers on my computer for USBtiny, and they were there. The device manager showed my computer recognized USBtiny. usb tiny

Somehow there was a problem between my FabISP and the programming boards because Arduino was giving me these errors:


avrdude: initialization failed rc=-1
and sometimes
avrdude: verification error first mismatch at byte 0x0000

The internet told me to check cables and maybe something was wrong with my programming board? The computer side for the C programming and the Arduino looked ok. My FabISP took the program fine and looked fine, but after staring at it some more... ah ha! I saw the below image on a tutorial. I had broken the solder bridge but left on one of the 0 ohm resistors. I thought this would let the FabISP power the programming board so I wouldn't need a FTDI cable as well, but maybe it was what was preventing my programming board from working? Though I checked it with a multi-meter to and made sure the ground on the controller and ISP were grounded and the VCC for each was VCC, when I removed the 0 ohm resistor it worked. Wola! problem

Finally I had a connection between my computer and my programming board! I pushed the program and could make an LED blink however fast I wanted it to! LED

One important thing to note about the Aduino IDE though is that Arduino names pins differently than ATtiny. This caught up a few people in my lab section, be warned! Also, to go between C programs and Arduino programs on the same board you need to re-bootload the board each time you switch. pins

Tutorials

FabISP Tutorials
Fab Academy at AS220
FabISP, a fab-able in-system programmer

FabDuino
Fabkit i/o (aka Fabduino)
Fab Academy at AS220
Programming and ATtiny w/ Adruino