Is this possible to do on the Arduino Pilot Mega? Mine suffered an accident while programming it and i get Out of Sync and other errors now. If it is, which are the pins?

Views: 1198

Reply to This

Replies to This Discussion

You use the Atmega1280 SPI port. You need an AVR programmer (we use the AVRISP II).

Ok , I have one of these will it work? It says JTAG or Serial on it

xilinx Platform Cable

So what do i do, upload bootloader using the arduino gui?

Thanks
That's hard to say due ATmel chips want to have programmer that is specific for them. Any ideas what is model/maker of your JTAG programmer. You can always try if jtagice/avrdude recognizes your programmer. Also JTAG is usually using different pins, on mega board there is no pins specific for JTAG tho Atmega1280 do have a JTAG interface.

ATmega datasheet says: Programming through the JTAG interface requires control of the four JTAG specific pins: TCK, TMS, TDI, and TDO. Control of the reset and clock pins is not required.

PF7 ADC7/TDI (ADC input channel 7 or JTAG Test Data Input)
PF6 ADC6/TDO (ADC input channel 6 or JTAG Test Data Output)
PF5 ADC5/TMS (ADC input channel 5 or JTAG Test Mode Select)
PF4 ADC4/TCK (ADC input channel 4 or JTAG Test ClocK)

So it looks like you need to connect totally different pins on cpu to use your programmer... Maybe be easier to go on sparkfun and get one of those Pocket AVR programmers.. They are cheap and works great :)

Or if you happen to have atmega328 based boards like arduinio mini pro, arduino duemilanove or similar, you can make them work as SPI programmer too..
I actually have an Arduino Mega (regular) lying around. Any links for a tutorial using that?
Well look Arduino IDE it self.. There under examples is ArduinoISP and then under Tools is Burn Bootloader and under that menu is "w / Arduino as ISP"

On ArduinoISP example sketch you can find all pinnouts etc stuff.. Including links to google code http://code.google.com/p/mega-isp

I've been using that few times with Arduino Mini Pro and it works nice tho never burned mega chips only 328's.. But that should not matter and mega is internally supported.

So when you burn it, just select Arduino Mega as your board and then hit burn..
Actually, I cant find any reference to which pin is which on the APM. Is the square one ground or MISO?
I was looking at the wrong pins heh.
Do i have it right?
These defines are from the ISP program
#define SCK 13 --->PF4
#define MISO 12-->PF6
#define MOSI 11-->PF7
#define RESET 10 -->PF5 ??
That connector follows all normal pin sets, every Arduino/Atmega based pcb follows it. Fastest schema i did find was from Sanguino http://sanguino.cc/hardware

Look schematic lower left corner
Does the reset go to PF5?
Using the connections posted below i get:
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50

avrdude: initialization failed, rc=-1

Double check connections and try again, or use -F to override
this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
Pin 1 MISO
Pin 2 Vcc
Pin 3 SCK
Pin 4 MOSI
Pin 5 Reset
Pin 6 GND

APM Schematic http://www.sparkfun.com/datasheets/DevTools/Arduin/ArduPilotMega_v1...
APM PCB in Eagle http://www.sparkfun.com/datasheets/DevTools/Arduino/ArduPilotMega_v...

WIth those you should find all the info that you ever need to connect it properly :)
Thank you so much, unfortunately it did not work. I think my crash was so fatal that it broke the APM. I already have a replacement but i have yet to test my shield. Under a magnifying glassi noticed the leds shattered =(. Would it be safe to test it with my new APM?
As long as you don't connect +5 and GND upside down.. you can only mess bootloader from it :P

And well that can be re-programmed as you know. But how in earth did you mess up your APM that badly?

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service