9. Embedded programming¶
This week was quite challenging and I ultimately used my final project to demonstrate embedded programming skill and completion of this assignment. Please see my Final Project Electronics Design and Production.
Amtel Data Sheet¶
I spent 1 hour reading through all 200+ pages of the Amtel 8 bit Microcontroller data sheet!
Download Atmel ATtiny44 Data Sheet
One thing I learned about was power consumption. This is of interest to me for my final project in that I will need to minimize the consumption as much as possible so one doesn’t need to charge the batteries all the time. Here is a paragraph about this on page 34:
“Minimizing Power Consumption There are several issues to consider when trying to minimize the power consumption in an AVR controlled system. In general, sleep modes should be used as much as possible, and the sleep mode should be selected so that as few as possible of the device’s functions are operating. All functions not needed should be disabled. In particular, the following modules may need special consideration when trying to achieve the lowest possible power consumption.”
One question I have is which of the modules I should focus on for reducing power consumption:
-Analog to Digital Converter -Analog Comparator -Brown-out Detector -Internal Voltage Reference -Watchdog Timer -Port Pins
Arduino IDE Programming¶
This week I programmed my Hello Echo board to blink an LED light in the Arduino IDE. I’ve also added a button to turn it on and off. I used the sample code provided in the Arduino Environment.
This diagram was really helpful in mapping the pin connections between Attiny44 and the arduino.
Loading the code via Arduino was fairly easy, I just needed to make sure I had the right ports set, and importantly, having the right USB port selected. I used my FabISP board that I made in Week 5 to connect to and program the LED board.
Arduino code¶
Here’s the code I used for blinking the LED.
Here’s the board in action, with the LED light lit up.
Please see my Final Project Electronics Design and Production section for documentation of embedded programming. Here is where I’ve demonstrated how to modify code from others to suit my needs.