Pages: 1 ... 36 37 [38] 39 40   Go Down
Author Topic: ATmega1284P: End to End using 1.0 IDE  (Read 57034 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Shannon Member
*****
Karma: 176
Posts: 12286
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What about running the 1284p at 20Mhz?

0.39% error in millis...
http://arduino.cc/forum/index.php?topic=70475.0

I believe micros is way off.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What about running the 1284p at 20Mhz?

0.39% error in millis...
http://arduino.cc/forum/index.php?topic=70475.0

I believe micros is way off.


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
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6378
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Glad I haven't been using ArduinoISP!
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you find the avrisp2 drivers & try those?
I don't know. You need MAC person to jump in here.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Jr. Member
**
Karma: 0
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What happens when you connect to the correct chip?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, if external devices were driving those pins while you were programming, that would be a problem.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: 1 ... 36 37 [38] 39 40   Go Up
Jump to: