EMBEDDED PROGRAMMING
The assignment for this week is:
1. Read a microcontroller data sheet
2. Program to do something our eco hello board with as many different programming languages and programming environments as possible
ATTINY 44 DATA SHEET
The high-performance, low-power Atmel 8-bit AVR RISC-based microcontroller combines 4KB ISP flash memory, 256-Byte EEPROM, 256B SRAM, 12 general purpose I/O lines, 32 general purpose working registers, an 2 timers/counters (8-bit/16-bit) with two PWM channels each, internal and external interrupts, 8-channel 10-bit A/D converter, programmable gain stage (1x, 20x) for 12 differential ADC channel pairs, programmable watchdog timer with internal oscillator, internal calibrated oscillator, and four software selectable power saving modes.
By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processor speed.
Below you can see a schematic image of Attiny 44:
PROGRAMMING FABHELLO WITH ARDUINO
1. Install Arduino
2. Download Attiny libraries* and put them in this folder:
Arduino/hardware
*Rename downloaded folder with "tiny"
3. Make the program in Arduino.
You have to realize that you are going to program in Arduino, but you are going to use the code not in Arduino but in our echo-hello board. This board has been designed with Eagle. Let´s see the schematic:
Here is the relation between Attiny pines and Arduino pines:
So in Arduino you have to change this:
In our case the correspondence is:
LED1: Attiny pin = 10; Arduino pin=3
BUTTON (n1): Attiny pin = 5; Arduino pin=8
PLATE ENGRAVING
1. Install (USB tiny)
FABISP driver
2. Install FTDI drivers
3. Install Winavr
*Note: to install drivers you maybe have to do it manually. For this you should go to Equipo/Administrador de dispositivos:
4. In Arduino you can choose now this:
5. Now you choose the serial port:
6. Check if the code is ok:
7. The last step: engraving the plate
FINAL RESULT
As you can see in this video, I had an error message in Arduino, but finally the board was perfectly working.