Pages: [1] 2   Go Down
Author Topic: How to program ATtiny45 with Arduino Leonardo as ISP  (Read 8519 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to bring a tiny sketch to the ATtiny45 chip using the instructions at http://hlt.media.mit.edu/?p=1695

I used ArduinoISP on my LEONARDO in order to use it as an ISP. After running the sketch it is keeping the LED on pin 9 blinking fine.

I'm trying to load the Blink sketch to the ATtiny using the 'Arduino as ISP'  Programmer option from the Tools Menu.

All I get is LED_PMODE blinking once and this list of errors:

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny45
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

Did anyone ever use a LEONARDO as ArduinoISP succesfully and can provide me with a hint?

Any idea if resistor or capacitor is needed for the LEONARDO as well (tried both so far - no success) in order to keep it in the ISP mode once I try to send a sketch to the ATtiny?

I guessed there are no changes in the pinout (ArduinoISP uses pins 7 - 13) from Arduino Uno or Duemilanove (from original description) to my LEONARDO or do I need some re-wiring?

Thanks for your help,

Peter
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Same problem with recently adquired leonardo.. but trying to program attiny85 or atmega 328.. 

this is the output that i get when i try to do that (following the instructions from "high-low tech" ):

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny45
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


The leonardo leds works when i try to upload the sketch to attiny85, but nothing more occurs.

Thanks for any help
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Short update:

I had no patience to wait for a solution and so I bought an USBTinyISP -> works perfectly fine without changing the ATtiny sketch or such - only needed to configure the new programmer in Arduino.

Unfortunately i still don't know how to use my Leonardo as ISP
Logged

Offline Offline
Full Member
***
Karma: 9
Posts: 109
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

By now, the issues found in this thread were fixed in the Arduino repository in gitub.
I have placed a wrap up of how to use ArduinoISP with arduino 1.0.1 on the Leonardo over here: http://petervanhoyweghen.wordpress.com/2012/09/16/arduinoisp-on-the-leonardo/.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi PeterVH

I really appreciate your effort on helping us with this issue with Leonardo boards. Thank you!
I will try your solution as soon as I get home. The process you described is very clear, but even though there is a photo of the assembly in your blog I'm not very sure about how the MISO/MOSI and SCK pins should be connected to the ICSP header of the Leonardo. I would be very grateful if you could clarify it to me.

Thank you in advance!
Logged

Offline Offline
Full Member
***
Karma: 9
Posts: 109
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree the picture is not very instructive, i'll make a better one and add some annotations.

Fortunately, all arduino ICSP headers are the same so have a look over here:
http://arduino.cc/forum/index.php/topic,84190.0.html
You don't use its reset pin.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OOOH
I got it!
THANK YOU VERY MUCH!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for the wonderful write up, peter!

i've seen all that information scattered across multiple threads, but this is the first time its been put together in a coherent manner

i'm eager to see if this will finally fix my woes...i couldn't wait and bought an UNO a few weeks ago but haven't lost hope for my leo
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've followed petervh instructions but when I try to upload the led blink sketch I get the error: stk500_getsync(): not in sync: resp=0x00 I've connected the Vcc, Gnd, MISO, MOSI and SCK pins of the leonardo onto the corresponding pins of the ATTiny85 except the RESET pin which according to petervh must be connected to pin 10, I've followed the source code modifications already, please help.
Logged

Offline Offline
Full Member
***
Karma: 9
Posts: 109
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Arduino 1.0.2 is out now. Can you try with that, it excludes possible errors in the modifs to the core...
You still have to modify ArduinoISP: #define RESET 10 and of coarse use the pins on the ICSP header.
If it does not work, can you post the exact output of avrdude (use option -v).
Logged

Offline Offline
Full Member
***
Karma: 9
Posts: 109
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To be able to test ArduinoISP/Leonardo/Arduino1.0.2/arduino-tiny, I made a small board with an attiny85, and hooked it up to my Leonardo.

Never used arduino-tiny before, I followed Coding Badly's instructions http://arduino.cc/forum/index.php/topic,132007.0.html and it all worked out of the box. Many thanks to the creators, nice job!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have an Arduino Leonardo, trying to program the ATtiny45 chip. I have connected the programming wires to the ICSP pins as directed. I am using Arduino 1.0.1 software in Windoes XP Home SP 3. I have changed the #defin RESET   SS to 10 in the ArduinoISPM sketch and compiled that using the Leonardo board. Then I loaded the blink sketch and changed the led to 0. I compiled to the ATtiny45(8 mhz internal clock) and got the following error:

Binary sketch size: 830 bytes (of a 4,096 byte maximum)
avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc


I just tried Arduino 1.0.2 software and got this error message when trying to load the Blink program:

In file included from F:\Arduino\hardware\arduino\cores\arduino/Arduino.h:193, from Blink.ino:10:
F:\Arduino\hardware\arduino\cores\arduino/HardwareSerial.h:125:2: error: #error TXC0 not definable in HardwareSerial.h


I have just purchased 50 of these chips and hope I don't have to buy a programmer or an Arduino UNO to make them work!!
Any ideas???

John
« Last Edit: December 06, 2012, 07:24:26 pm by johntech2011 » Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Binary sketch size: 830 bytes (of a 4,096 byte maximum)
avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc

Which programmer do you have selected?

Quote
I just tried Arduino 1.0.2 software and got this error message when trying to load the Blink program:

In file included from F:\Arduino\hardware\arduino\cores\arduino/Arduino.h:193, from Blink.ino:10:
F:\Arduino\hardware\arduino\cores\arduino/HardwareSerial.h:125:2: error: #error TXC0 not definable in HardwareSerial.h

Give this core a try...
http://code.google.com/p/arduino-tiny/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have tried that core too. I went back in and changed the PROGRAMMER to Leonardo as ISP  in ver 1.0.1 and it gave me this error:

Binary sketch size: 824 bytes (of a 4,096 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00

I am new to Arduino and don't have a clue why this isn't working. If I can get it working then I will make a programming shield for it.
I must be missing something!!!

John
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Have you worked through PeterVH's instructions...
http://petervanhoyweghen.wordpress.com/2012/09/16/arduinoisp-on-the-leonardo/
Logged

Pages: [1] 2   Go Up
Jump to: