Daniel Garcia, Dagalo, Espapalagi, Fabacademy
 
HOME   ABOUT ME   FABLAB UPM   FINAL PROJECT
week 1
Principles and practices, project management
week 2
Computer-aided design
week 3
Computer-controlled cutting
week 4
electronics production
week 5
3D scanning and printing
week 6
electronics design
week 7
computer-controlled machining
week 8
embedded programming
week 9
molding and casting
week 10
input devices
week 11
composites
week 12
output devices
week 13
networking and communications
week 14
mechanical design, machine design
week 15
interface and application programming
week 16
applications and implications
week 17
invention, intellectual property and income
week 18
project development
week 19
project presentation

Week 8: Embedded programming

Goal: Program your Hello.Button+Led board.

For the assigment of this week I have used Arduino IDE as ISP for programming the Hello board with led and switch. Finally I could not complete the job because I have come to a standstill bug in Arduino IDE and I have not yet managed to solve.

To make the assigment of this week I used as reference www.highlowtech.org tutorials and steps are the followings:

First, I install Arduino from the official website and to connect the board to the computer. Once installed in the Device Manager (my OS is windows) check which serial port is installed, in my case COM 4.

Because what I want is to program a ATtiny board, I download the drivers of ATtiny for arduino board. I can do it from the page highlowtech.org or from another website. To find out where to install, open Arduino IDE and go to Preferences, I can see the folder where I have to copy ATtiny files, in my case Documents> Arduino. Here I have to create a folder called "Hardware" and copy the downloaded ATtiny folder. Now restart Arduino and go to Tools tab> board. ATtiny board should appear .

To start and check that the Arduino board is working properly and make sure the computer recognizes the board, open the Blink Example Sketch and Upload it to the board (before this I check that the serial port is correct, COM4, and the board is right, Arduino ONE in my case). I can see that the sketch works right because the LED flashes in the Arduino Board.

Knowing that the board is working correctly, I open the Sketch Example called Arduino ISP and upload it (COM4 port plate Arduion UNO). Now arduino board is programmed to run as ISP.

Now I connect the Arduino board to my Hello + led board through the 3x2 pins wire. I change the presets, Port keeps COM4 but board is now ATtiny84 (20Mhz), and the Programmer is Arduino as ISP. I choose Burn Bootloader in the Tools Tab and got the first error message. Also I try to push a program to see if it works, for this, open the Blink sketch and upload it, the presets are COM4, Board ATtiny 84 and Arduino as ISP, and I get the Following error message:

avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
avrdude done. Thank you.

Looking for what the failure means in internet, I find the problem is that the computer does not recognize the card correctly. This can be for two reasons:

1 - that the board is not located in the correct port, this is not my case because the device manager recognizes it correctly and I was able to program the Arduino board with Blink sketch properly.

2 - The board is not properly selected, which neither my case.

As I do not know if the error is a mistake with circuit fabrication and therefore does not recognize the board, I simplify the circuit using only the Micro ATtiny 84 placed directly in the breadboard and connected with solderless wires to the Arduino board.

So I can program the ATtiny directly in the breadboard and I can check the programming adding a LED and a resistor.

I prepare the board using the scheme found in highlowtech webpage, but I do not uso a ATtiny 45 as in the picture, but a 84, so that the pins and connections change.

 

 

 

 

 

The scheme of equivalences between ATTiny pin 45 and 84 is as follows:

Once connected, I change the pin where the LED is connected. In the example sketch it is on pin 13 and in my case it the correct pin is 9. Now I upload the programming, with COM4, ATTINY84 board (now with 1Mhz becauso is not conected to a external 20Mhz Crystal), and Programmer Arduino as ISP as presets, and the error message is the Following:

avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
avrdude done. Thank you.

Now I'm still trying to find a solution and to program the ATtiny.