Society of Robots - Robot Forum

Software => Software => Topic started by: nwmike on February 13, 2012, 07:06:52 PM

Title: Programming Axon Mote with AVRISP MKII
Post by: nwmike on February 13, 2012, 07:06:52 PM
I have purchased a new Axon Mote and am trying to program it with the MKII.  Axon Mote is as shipped and I have installed the latest revs of Studio 4 and the MKII firmware.  I've seen similar issues described on this forum, but this is somewhat different.  Whenever I try to look at the Fuses or Lockbits or read the signature I get a long error meassage that says I need to slow down the ISP freq.  I also get the following responce
Setting mode and device parameters.. OK!
Entering programming mode..Failed!
Leaving programming mode..OK!
I've tried the command line software, STK500 and it cannot detect the Axon Mote.  Does anyone out there know what I've missed?  From the documentation, I don't know what the ISP freq is on the Mote or how to slow it down w/o Studio 4 or the command line software working.  Thanks in advance for any help on this.  Obviously I'm new to this tool chain.
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: newInRobotics on February 14, 2012, 01:22:02 AM
Make SPI frequency less than "uCclock / 4" and You should be fine.

Read How to Configure AVR Studio 4 to Talk to an Atmel STK500 (http://www.robotroom.com/Atmel-ATtiny-STK500-Programming-2.html) article.
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: joe61 on February 14, 2012, 05:31:34 AM
I've tried the command line software, STK500 and it cannot detect the Axon Mote.  Does anyone out there know what I've missed?  From the documentation, I don't know what the ISP freq is on the Mote or how to slow it down w/o Studio 4 or the command line software working.  Thanks in advance for any help on this.  Obviously I'm new to this tool chain.

I thought the Axon Mote had a bootloader. Can't you just use that? The documentation pages on this site for the Mote should tell you how that works.

Joe
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: Admin on February 15, 2012, 10:19:05 AM
In this window below, click Settings... to reduce the frequency to 4MHz.

(http://www.robotroom.com/STK500/Verifying-good-chip-communication-in-AVR-Studio.jpg)
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: nwmike on February 15, 2012, 02:42:58 PM
First off, thanks to all who took the time to respond.
Using the menu below, I did as suggested and tryed resetting the ISP frequency to 4M, 1M, and 125K, just to be sure.
(http://i.imgur.com/qeFaT.jpg)

In all cases, it seemed to work, but I still can't read the signature, fuses or lock bits.  I get the error message below.
(http://i.imgur.com/GVGmT.jpg)
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: newInRobotics on February 15, 2012, 02:49:06 PM
Are You sure that ISP cable is connected to right pins of uC?
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: Admin on February 15, 2012, 11:18:03 PM
Just to cover the obvious . . . is the Mote properly powered on before reading the signature? Does it still program using the bootloader?

Also, read this too:
http://www.societyofrobots.com/axon_mote/axon_mote_FAQ.shtml#ISP_fail (http://www.societyofrobots.com/axon_mote/axon_mote_FAQ.shtml#ISP_fail)
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: nwmike on February 16, 2012, 04:20:47 PM
I have the mkII connected to the Axon Mote exactly as shown  in the Axon Mote FAQ so it should be correct.

I'm powering the board off the USB port and the 3.3v supply remains solid when I try to read the signature.

I'll try to test the boot loader, but I'm not strong in writing code so it will take awhile to see if I can boot load a program and blink a LED to see if it successfully loaded.  I expect the boot loader to work as I haven't done anything to the Axon Mote except power it up.
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: nwmike on July 03, 2012, 01:52:06 PM
Lot of water under the bridge since February, but still can't program the Axon Mote with the MKII or the bootloader.  Using an ATMega8535 development board I have successfully built a photovore robot using AVR Studio 5 and have come back to the Mote with known working programs.  I'm still getting the same error messages I was getting back when I started this thread.  With the bootloader program I followed the proceedure laid out in "Axon Getting Started".  I got as far as hitting flash and seeing the spinning / in the Flash DOS window and that was it.  Is it possible that I have accidently set a "lock" bit that is preventing me from going any further?  Obviously, I can't read the "lock" bits so I can't be sure. :-[  The Mote seems like a great board and I'd really like to get it working.  Any thoughts??
Title: Re: Programming Axon Mote with AVRISP MKII
Post by: Admin on July 03, 2012, 02:59:21 PM
As it was four months ago you may not remember, but . . .

1) Did you ever tell it to program using the MKII with it set to program something other than the ATMega128RFA1?

2) Did you ever try to program it without it being powered up (ie forgot to plug a battery in, or a battery with a low voltage, or at least not plug in USB, etc)?

3) Did you try programming it above 4MHz?

4) Did you accidentally unplug something while it was in the process of programming?

5) Does your MKII program your other microcontroller without any problems?