Loading...
Pages: [1]   Go Down
Author Topic: Mega as an AVR ISP  (Read 849 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 136
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am pulling ALLLLL my hair out over this.  It should be simple, everyone agrees with me it should be simple.  I have a mega R3 and an ubuntu laptop and a blank attiny2313.

I loaded the arduino as an isp sketch, with the delay changed from 40 to 20 ms in heartbeat.
I have a home made cable (good crimps!) between the arduino and the breadboard
when I try to use avrdude, the heartbeat LED freezes and it just sits til I hit reset.  the RX light on the board flashes maybe once, and thats it.  AVRDUDE repsonds that the programmer is not responding, then says its work here is done and thanks me.  A thank you has never been so sinister.  I schurnk the delay down to 10 for kicks, no help.  put a 10uf cap between reset and gnd and occasionally get a programmer out of sync 0x15, but thats it.  I tried a 1k ohm resistor between reset and VCC on the mega, still didn't help.

wits end.  there are a hundrered threads on this, and even more walk throughs.  I can't get past this little simple project?
both those lines below fail me.   please, before I combust, help.
Code:
avrdude -p attiny2313-c avrisp -P /dev/ttyACM0

avrdude -p attiny2313-c avrisp -P /dev/ttyACM0 -b 19200
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 136
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh I have at my disposal the following boards:

arduino ethernet
arduino mega R3
Sanguino

I don't care whatI use, I just want one that WORKs as an ISCP!
Logged

Denmark
Offline Offline
God Member
*****
Karma: 19
Posts: 683
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I use an Uno and windows.
Anyway this works, the partno is t2313

Code:
avrdude -P COM20 -b 19200 -p t2313 -c avrisp
Logged

Offline Offline
Full Member
***
Karma: 6
Posts: 131
Knowledge is proportional to the number of parts destroyed.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
avrdude -p attiny2313-c avrisp -P /dev/ttyACM0

avrdude -p attiny2313-c avrisp -P /dev/ttyACM0 -b 19200


1: You need to define the programmed device as "-p t2313".

2: You need a space between the devicename and "-c"

There's a good list of options at
http://www.nongnu.org/avrdude/user-manual/avrdude_4.html

Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 136
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

those were typos,, not in my original attempt to upload.  Also, isnt the t2313 different than a attiny2313?

edit, my mistake, 2313 is different from t2313, makes more sense
« Last Edit: October 04, 2012, 11:37:35 am by permnoob » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 136
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

is it impossible to use a MEGA R3 for this?  I tried a .22 cap between reset and 5v, as well as a 10 uf, no dice.
Logged

Offline Offline
Full Member
***
Karma: 6
Posts: 131
Knowledge is proportional to the number of parts destroyed.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's not impossible at all. A few months ago, I was using a Mega to program ATTiny 45 and 85 chips. Now I have a dedicated Uno to do that job and I use the Mega for other projects.

I do remember that using the Mega as an ISP required using different pins and I had to put a capacitor between Ground and Reset.

This looks very similar to my setup:
http://arduino.cc/forum/index.php/topic,99794.msg750816.html#msg750816
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 136
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am going to try that, I am almost ready to open my spare mega (sealed in box) and see if its the device, but that seems unlikely because it works in every other fasion.  Were you using 1.0?

As for pins, I am coming directly off the ICSP header on the MEGA for 5 connections, and pin 10 for reset.  which should be the same as what is in that picture. BUT I WILL TRY IT ANYWAYS BECAUSE ALKVNALDKFJLWKE.

the beutry of electronics is everything should be repeatable... Also for the record, do you recall the size of the capacitor you used?  and your mega was an R3, yes?
Logged

Sweden
Offline Offline
Full Member
***
Karma: 5
Posts: 115
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've used a MEGA to program Attiny2313 with no problems. Just don't forget the capacitor between reset and ground (on the mega). Try this line and post the output here (in case it doesn't work).
Code:
avrdude -c stk500v1 -P /dev/ttyACM0 -p t2313 -b 19200 -v -v


Edit: This is how everything should be connected (The LED is optional).
Edit 2: The capacitor is 10uF.

« Last Edit: October 04, 2012, 06:45:42 pm by baselsw » Logged

Offline Offline
Full Member
***
Karma: 6
Posts: 131
Knowledge is proportional to the number of parts destroyed.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


As for pins, I am coming directly off the ICSP header on the MEGA for 5 connections, and pin 10 for reset. 

Pin 10? On the Mega?
You need to connect the 2313's reset line to Pin 53 on the Mega. That's Port B's Bit 0 and it only appears on that pin as far as I can tell.

The other pins should be fine.

For reference I was using 1.0, a Mega R3 and a 50 uF, 25 V aluminum electrolytic. I just confirmed the first 2 and the cap value I know for sure because I have a box of 50 left over from a previous project that I've been trying to use up for years. (I'm down to under a dozen, now.)
Logged

Pages: [1]   Go Up
Print
 
Jump to: