Go Down

Topic: using leonardo to upload sketches to atmega168/328 (Read 2441 times) previous topic - next topic

#15
Nov 12, 2012, 03:40 pm Last Edit: Nov 12, 2012, 03:53 pm by kopfkopfkopfaffe Reason: 1
I still have issues with your sketch. The auto reset works fine, I can see that on the scope, see attached image. The reset line is green and is released once DTR is triggered, letting the slave Arduino run it's bootloader. (Which it does.). Shortly after that, the blue line (Leonardo TX) issues 3 requests to the bootloader of the slave Arduino, which does not respond. So the upload fails. Right now I have no idea why. If I use the regular USB connection of the slave Arduino, it works. I'd once been able to flash my Duemilanove with an external FTDI, but for some reason, that also fails now.



PeterVH

@kopfkopfkopfaffe: the plot of RESET makes me think you did not put the series cap of 100nF. (see the ascii art schematics in my post).

PeterVH

Quote
avrdude kept reporting the device signature to be 1E--0B when it says it expects the signature to be 1E--06

Ok, so you have an atmega168p instead of an atmega168. To avoid mistakes, it is better to invoke avrdude with -pm168p instead of using -F.
Not all avrdude installations have an entry for atmega168p in their avrdude.conf; if not, use the avrdude from the arduino IDE.

Oh, it's measured BEFORE the cap. Plus I can see the Arduino reset, because the high frequency blink-sketch stops and starts again after avrdude fails. So that works.

PeterVH

I am affraid this is an os dependent thing. I am using kubuntu. I just tried in win xp, it does't work for me either. I don't understand why, I see no difference between the leo setting a DTR_PIN in function of the line status, and the ftdi chip doing so for its own dtr pin. I must think about this...

What os are you on?

PeterVH

We'll get there, I found back a pic18f4550 with which I built the same thing. It works on windows too, I just need to find out what it does differently.

Go Up