Pages: [1]   Go Down
Author Topic: AVR-ISP-MK2 bootloading trouble :(  (Read 983 times)
0 Members and 1 Guest are viewing this topic.
Cardiff, UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
Programmer of all sorts
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought I'd take the plunge and do some barebones Arduino progamming.  My pre loaded ATMEGA328P-PU works a treat but I can't seem to burn my own bootloaders.  I've been stuck on this for a couple of weeks and have tried lots of approaches to get it working.

I'm using IDE v 022 with LibUSB32 drivers for the Olimex AVR-ISP-MK2  and 10pin ISMP

pin 1 (MOSI) - pin 17
pin 5 (RST) - pin 1
pin 7 (SCK)  - pin 19
pin 9 (MISO)- pin 18

The error message I receve is

Code:
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500v2_recv_mk2: error in USB receive

Any ideas what I'm doing wrong?  Wrong USB driver or something?  I do notice that my LED on Arudino Pi 19 (sck) flickers.
« Last Edit: December 10, 2012, 05:47:54 am by supercrab » Logged

My Arduino 7 segment LCD/LED library

http://code.google.com/p/arduino-seven-segment/

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 819
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought I'd take the plunge and do some barebones Arduino progamming.  My pre loaded ATMEGA328P-PU works a treat but I can't seem to burn my own bootloaders.  I've been stuck on this for a couple of weeks and have tried lots of approaches to get it working.

I'm using IDE v 022 with LibUSB32 drivers for the Olimex AVR-ISP-MK2  and 10pin ISMP

pin 1 (MOSI) - pin 17
pin 5 (RST) - pin 1
pin 7 (SCK)  - pin 19
pin 9 (MISO)- pin 18

The error message I receve is

Code:
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500v2_recv_mk2: error in USB receive

Any ideas what I'm doing wrong?  Wrong USB driver or something?  I do notice that my LED on Arudino Pi 19 (sck) flickers.

Some more information about your setup would be helpful. All I can think of at the moment... considering that you are trying to RE-flash the bootloader..... are you flashing the 328P in the Arduino board or are you doing it in a bare ZIF socket and home made programmer? If the latter, do you have a crystal connected?

Literally the very first thing I ever did when I started with the Arduino boards was build an ISP with a ZIF socket on a Proto-Shield. I double and triple checked everything, I saw "good looking" signals on the ISP lines, yet the MCU would not program. I never thought about the fact that a crystal was needed!  I'm an EE, I've been doing electronics for 40+ years (yes it was even a childhood hobby) , yet I forgot the crystal!! LOL!
Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you trying to program a virgin atmega chip, or is it one that has already had a bootloader installed?  If the latter, do you have a crystal/caps or ceramic resonator connected to the mcu XTAL1/XTAL2 pins?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Cardiff, UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
Programmer of all sorts
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have my Atmega in a bread board.  The setup works fine with a preloaded chip as I can upload and run blink.  I used a CP2102 USB to serial chip for the uploading. I have an Olimex programmer connected to my arduino via ICSP 10 pin.
Logged

My Arduino 7 segment LCD/LED library

http://code.google.com/p/arduino-seven-segment/

Global Moderator
Melbourne, Australia
Offline Offline
Brattain Member
*****
Karma: 511
Posts: 19358
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know what is wrong with your setup, but I have done similar things here, which may help you:

http://gammon.com.au/forum/?id=11637
Logged

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

Cardiff, UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
Programmer of all sorts
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the chip all setup as if was preloaded.  If it was it would work as the setup works with the blink program.   I think my problem lies somewhere in the drivers for the Olimex programmer (LibUSB).  Unfortunately, I reinstalled them and now when I use the programmer it crashes windows :

I've abandoned this and I'm going to knock up a parralel programmer :/
Logged

My Arduino 7 segment LCD/LED library

http://code.google.com/p/arduino-seven-segment/

Cardiff, UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
Programmer of all sorts
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know what is wrong with your setup, but I have done similar things here, which may help you:

http://gammon.com.au/forum/?id=11637

Thanks for this link I shall give it a blast smiley
Logged

My Arduino 7 segment LCD/LED library

http://code.google.com/p/arduino-seven-segment/

Pages: [1]   Go Up
Jump to: