Week 7: Embedded Programming

Another electronics week. Hope to get something to work!

This week's assignments: read a datasheet, and make the board do anything.

Reading a datasheet

200 pages and counting...

I thought that I would never have more reading than my friends in the Political Science Department, where the course number (100, 200, 300) corresponds with the number of pages assigned for the weekly readings. This datasheet, however, puts me at the reading amount of a 200-level Wellesley PoliSci student! Something to be proud about? I found the diagrams especially helpful, and overall, I'm starting to make more sense of what's in the ATTiny.

Reprogramming...

Trying to get week 5 to work.

This week's assignment is to program the week 5 board to do anything at all. However, I wasn't able to program the board from week 5 to begin with, so I figured that a good goal would just be to figure out how to load the echo-hello world program.

Frustration, and Zach to the rescue

Not all heroes wear capes.

I decided to use the computer in the CBA shop (E15-043), because it runs on Linux and it has a lot of USB ports. Sadly, I kept getting the dreaded "rc=-1" error, and was very ready to call it a day when Zach walked in with an armful of double-sided tape and a lot of help. Turns out, I'd missed a connection between the reset pin on the chip and the reset pin on the ISP header. On the schematic, it looked like the lines crossed, but unfortunately, this was false and the paths actually did not make contact, as evidenced by the lack of a dot at the crossing.
Damn. I'm pretty annoyed that a lot of my problems have been stemming from maybe 3 mm of missing copper, but I guess that's how it is sometimes. Zach showed me how to bridge the missing connecting by soldering on some copper wire, and I tried the board again.

Programming

It works!!!

After Zach's help, I went back to the computer and tried to program the board with the echo program, and lo and behold, it worked. It was cathartic, relieving, and exciting. I don't think I've ever been so excited by seeing a bunch of letters on a screen before... maybe except for when I got my acceptance email to Wellesley. It also served as a confidence boost, as I'd started falling into the trap where I believed that I was somehow cursed to not get a single working board all semester.

Re-making a programmer

On a roll

During week 3, I barely managed to get a working programmer. Due to various USB connectivity issues and other unknown reasons, my programmer worked maybe once or twice before permanently giving me errors. Very frustrating.
So, to fix that, I decided to build a new programmer! After going through the same milling and soldering steps as week3, I plugged the board into the computer and, to my surprise, it worked! I also used it to re-load the echo board program onto my board from two weeks ago. Success!

Programming something new?

It doesn't work!!!

After getting both the week 3 and the week 5 assignments to work in the span of two hours, I was feeling pretty psyched to start working on new code. I decided to translate some arduino code from the class site into C code. Unfortunately, I have no idea what I'm doing, so I felt like I was just following patterns and making very uneducated guesses. With that in mind, perhaps it's not surprising that I couldn't get the code onto my board. I'm not sure if it's a new problem that popped up with the board, or if it's an issue with the code, which is a bit frustrating, but I did get two weeks of failed projects to actually work, whch I'm happy about. Hopefully, this is a good omen for the upcoming electronics weeks!