Go Down

Topic: ATmega1284P: End to End using 1.0 IDE (Read 77 times) previous topic - next topic

svalls

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???

Coding Badly

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.

svalls


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".

CrossRoads

@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.
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.

svalls

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.

CrossRoads

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.
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.

westfw

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

CrossRoads

Glad I haven't been using ArduinoISP!
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.

svalls

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.

CrossRoads

Did you find the avrisp2 drivers & try those?
I don't know. You need MAC person to jump in here.
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.

svalls

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!

svalls

Ok, I have now more info:
The signature corresponds to the MEGA16U2, so I am connected to the wrong chip.

Any ideas?

CrossRoads

What happens when you connect to the correct chip?
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.

svalls

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.

CrossRoads

Yes, if external devices were driving those pins while you were programming, that would be a problem.
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.

Go Up