WEEK 7 - Embeded Programming
Assignments: read a datasheet... and program the HelloWorld Board to do something!
Programming the HelloWorld Board!
This week's assignment seemed like a BIG challenge.. I've had never programmed an AVR chip without the Arduino IDE before.. Ports, registers and interrupts, I've seen them before in some arduino sketches but never actually understood the meaning. Reading a datasheet helped understand the chip's IOs, but I had a hard time figuring out how to actually program the chip using these new notions. What I learned from reading the datasheet though that in my opinion is the most exciting thing is that you can use the microcontroller without adding any other components thanks to the 8Mhz internal clock! This makes things really interesting for lots of simple projects that I had on mind for months. Temperature control, data logging, low speed wireless communication and actually anything that can be done that doesn't require much speed or acurate timing... which most of my projects revolves around.
I also learned that most chips can operate below the standard 5V I've been used to for the last few years.. connecting a CR2032 to an ArduinoUno hasn't provided much so far but since Attinies are so cheap and small, this leaves a lot of room for custom miniature devices.
It's also interesting to see how ports are configured setting bits in the register. I don't think I'll be seriously coding in C anytime soon though.. as I have yet to encounter the limits of Arduino.
I first tried to upload the serial code from the fabarchives. Figuring out the make file was quite simple.
I then openned the Serial Monitor in ArduinoIDE to make sure it was working. and it was!
I then tried to program my button and led to make something.. it's pretty much the most boring thing I could come up with but it's the microcontrolle handeling the button and LED. When I press the button, it turns the led on.