Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #555 on: October 19, 2012, 03:00:21 am » |
I've received today my AVRISP MkII, so I can finally program the microcontrollers in a professional way. Unfortunately I have no luck. When I try to upload a sketch using 1.01 IDE with the option "Upload using programmer", with the correct board an programmer selected, I get the errror:
avrdude: stk500v2_command(): Command failedavrdude: stk500v2_programm_enable(): bad AVRISPmkII connection status: SCK fail avrdude: initialization failed, rc=1 Double check connection and try again, or use -F to override this check
So I thought I've made something wrong on the connections. Then I tested this in an official Arduino Uno and Mega2560 boards, with exactly the same result.
I do the following: Connect the AVR to my computer. Red light lights. Connect the Arduino to the USB, it powers up. And the red light of the AVR turns green. Upload using programmer: another green light of the AVR lights on, then goes off and red light of the AVR starts to blink.
Jesus! Is that difficult to program the Atmel micro's???
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10148
|
 |
« Reply #556 on: October 19, 2012, 03:24:12 am » |
What about running the 1284p at 20Mhz? 0.39% error in millis... http://arduino.cc/forum/index.php?topic=70475.0I believe micros is way off.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #557 on: October 19, 2012, 04:18:53 am » |
Interesting, so I can run the processor at 24 Mhz without problems on the software side (I don't have it clear enought what will happen on the hardware). With an improvement in speed of 33%. I must point that I'm doing that for learning, so don't try to found a "reason".
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Online
Brattain Member
Karma: 242
Posts: 16505
Available for Design & Build services
|
 |
« Reply #558 on: October 19, 2012, 12:29:16 pm » |
@svalls, Do you have the driver installed for it? Need to dig down into the arduino files to find it, do a search within arduino path for libusb.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #559 on: October 19, 2012, 04:11:54 pm » |
Dear Crossroads,
I forgot to mention that i'm using a Mac, with Snow leopard. I was looking into the arduino path, and I found that I have under Arduino/Contents/Resources/Java/hardware/tools/avr/lib two files: libusb.a libusb.la
and also: libusbpp.a libusbpp.la
I noticed also on Google, that some people says I must install a big sort of things, and others nothing ¿? I'm really lost! PD: I also tried on Ubuntu Linux with the same results.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Online
Brattain Member
Karma: 242
Posts: 16505
Available for Design & Build services
|
 |
« Reply #560 on: October 19, 2012, 09:03:48 pm » |
Here's my full path to the files: c:/arduino-1.0.1\hardware\tools\avr\utils\libusb\bin there are avrisp2... named files there.
Could be you're looking in the wrong place. I don't know if it makes a difference for your PC type.
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #561 on: October 19, 2012, 11:23:36 pm » |
BTW, I'm reminded that 1.0 introduced a bug in ArduinoISP; I keep forgetting because it's one of the bugs that's actually been fixed in 1.0.1 If you're still using 1.0, you should upgrade or apply one of the patches! http://code.google.com/p/arduino/issues/detail?id=860
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Online
Brattain Member
Karma: 242
Posts: 16505
Available for Design & Build services
|
 |
« Reply #562 on: October 20, 2012, 12:51:54 am » |
Glad I haven't been using ArduinoISP!
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #563 on: October 20, 2012, 02:16:15 am » |
I'm using Arduino 1.01, thanks for the appointment. I'm sure it must be a dummy think, but what?
I will test it in another computer.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Online
Brattain Member
Karma: 242
Posts: 16505
Available for Design & Build services
|
 |
« Reply #564 on: October 20, 2012, 08:47:59 am » |
Did you find the avrisp2 drivers & try those? I don't know. You need MAC person to jump in here.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #565 on: October 22, 2012, 08:37:58 am » |
Well the thing is moving forward! It results that my stupidity it's only surpassed by my ignorance: I connected the MKii to the wrong ICSP... It results that both the Uno and the Mega2560 have TWO ICSP, one for program and the other for...
But it can be that easy! Now I get the following error: - Trying to program an Arduino Uno board (tested with two boards): Wrong microcontroller found. Expected signature for the ATMEGA328P is 1E 95 0F - Trying to program an Arduino Mega2560: Wrong microcontroller found. Expected signature for the ATMEGA2560 is 1E 98 01
WTF! And this are original Arduino boards! I will appreciate so much any help. Thanks!
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #566 on: October 22, 2012, 09:47:18 am » |
Ok, I have now more info: The signature corresponds to the MEGA16U2, so I am connected to the wrong chip.
Any ideas?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Online
Brattain Member
Karma: 242
Posts: 16505
Available for Design & Build services
|
 |
« Reply #567 on: October 22, 2012, 09:54:49 am » |
What happens when you connect to the correct chip?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #568 on: October 22, 2012, 10:07:41 am » |
Well, this will cause some laughs...
The UNO shares the ICSP pins with Pin13, 12, 11, so if one wants to program via ICSP, please: disconnect any I/O cables/sensor/etc. from pins 13, 12 and 11.
It that simple! I was changing the boards, but connecting the exactly same cables to the same pins, so no way. Hope it can help to anybody.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Online
Brattain Member
Karma: 242
Posts: 16505
Available for Design & Build services
|
 |
« Reply #569 on: October 22, 2012, 10:09:22 am » |
Yes, if external devices were driving those pins while you were programming, that would be a problem.
|
|
|
|
|
Logged
|
|
|
|
|
|