LeoStick as ISP not working!

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
Ashley James
Posts: 9
Joined: Sun Mar 08, 2015 1:00 pm

LeoStick as ISP not working!

Post by Ashley James » Mon Apr 27, 2015 4:50 am

Hi,
I have some issues with a LeoStick that I bought a bit of a while back. I cannot use the LeoStick as an ISP despite multiple testing, using both Windows and Linux.
  • I have the latest bootloader from GitHub currently loaded.
  • I have used alternate bootloaders, including v1, v2 and the latest GitHub revision.
  • The LeoStick is assigned a valid port, those ports are correctly recognised in both OS.
  • I use both IDE v1.0.1 & v1.6.3 in Linux; I use IDE v1.6.1 in Windows.
  • I have remapped the RST pin in the 'ArduinoISP' sketch from 'SS' to '10', have also tried RST mapped as 'SS'.
  • I have the latest board profile in my Arduino sketchbooks.
  • I have additionally tried avrdude.
  • I have tried the 'ArduinoISP' sketch both uploaded using a bootloader, and burnt on without a bootloader.
Going from here, I need to reprogram the ATmega16U2 on board an Eleven and replace the ISP program, however I can currently still use it as an ISP. I am using a temp setup of an ATmega328p as a 'Breadboard Arduino', to attempt to load a bootloader/sketch from the LeoStick, however I also get the same results when connected to the Eleven.

The LeoStick itself, I can upload sketches to via. both Windows and Linux without problem and they work, I have also tested simple LED/Button circuits using another breadboard to ensure all the digital & analog I/O pins function as expected (they all do). I can burn a bootloader to the LeoStick using an Uno, as well as flash sketches directly to it via. both avrdude and Arduino IDE.

On to the issue, under the Arduino IDE when attempting to burn an Uno bootloader onto the 'Breadboard Arduino', I I get:

Code: Select all

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

Error while burning bootloader.
Using avrdude with the same setup and using the following syntax, I get:

Code: Select all

avrdude -p atmega328p -c avrisp -P /dev/ttyACM0 -b 19200 -v

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.
I have an Eleven & Uno also, where I am additionally required to set a baud rate of -b 19200 in order to verify the breadboard chip as per the 'ArduinoISP' sketch. I cannot use the Uno as an alternate ISP, it's hard-wired to a project 20m in the air.

What can be causing this?, I know bad connections can however like stated I have tested all I/O pins and specifically D10-D13 and they function correctly.

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: LeoStick as ISP not working!

Post by angusgr » Thu Apr 30, 2015 6:17 am

Hi Ashley,

It sounds like you've tried a lot of permutations, and all the likely stuff.

Are you able to take some photos of your wiring setup and post those, please?


Angus

Ashley James
Posts: 9
Joined: Sun Mar 08, 2015 1:00 pm

Re: LeoStick as ISP not working!

Post by Ashley James » Tue May 05, 2015 7:34 am

Sorry for not getting back sooner, out of the state for family.

I remade the circuit today, posted some photos of the setup.
DSC_0024.jpg
LeoStick failing burning bootloader
DSC_0021.jpg
LeoStick failing burning bootloader
DSC_0019.jpg
Eleven successfully burning bootloader
The circuit is a replica of ArduinoToBreadboard; 10KΩ Resistor, 2x 22pF Capacitors, 16MHz Crystal, ATmega328P-PU, the issues also arise without the external clock and the IC only connected to VCC/GND.

One of the pictures there, shows the Eleven connected which successfully burnt the bootloader before/after attempting the LeoStick. I additionally just tried to upload a sketch via. FTDI on the already bootloaded IC, to no avail on the LeoStick, successful with the Eleven.

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: LeoStick as ISP not working!

Post by angusgr » Wed May 06, 2015 11:31 pm

Hi Ashley,

Unfortunately the LeoStick (same as Leonardo) does not use the same SPI pins as the Eleven/Uno, so the digital pins 11-13 that are connected when using the Eleven as a programmer can't be used when using the LeoStick.

The connections need to be moved to the 6 pin ICSP pin header on the LeoStick.

There's a diagram and a table on our site that shows the connections you'll need:
http://www.freetronics.com.au/pages/usi ... rogrammers

The diagram shows an ICSP connector on both ends, where the Eleven programmer programs the LeoStick target. However you can place a LeoStick in the programmer position and a atmega328p in the target position. The table underneath shows which pin to connect on each end.

Please let me know how you get on.


Angus

Ashley James
Posts: 9
Joined: Sun Mar 08, 2015 1:00 pm

Re: LeoStick as ISP not working!

Post by Ashley James » Thu May 07, 2015 1:49 am

I can't believe I forgot about that... :roll: The IC is working both on a breadboard and when placed into the Eleven. It seems I must use an external crystal when placing it into a breadboard though, must get set after bootloading it a first time.

Under avrdude; it now correctly reads the IC:

Code: Select all

avrdude -p m328p -P COM5 -c arduino -b 19200 -v
The IDE also burnt a bootloader with each setup just fine, seems to be all working well. I haven't soldered another ICSP header onto the Eleven yet, so can't test a new program with the onbard ATmega16U2 but seems like it'll work just fine.

Oh by the way, I burnt the bootloaders under Windows. Arduino IDE 1.6.x has a new programmer specifically for the Leonardo -- "Arduino as ISP (Leonardo)". The toturial page still mentions that the LeoStick/Leonardo won't work under windows, as long the IDE is at least 1.6.x they now work. I believe that a patch could be made to add the programmer entry into older IDEs also.

Cheers Angus :oops:

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: LeoStick as ISP not working!

Post by angusgr » Tue May 12, 2015 10:36 pm

Thanks Ashley, glad you got it working. Thanks for the heads-up about LeoStick/Windows programmer support, I've updated the tutorial.

Angus

Altamirano
Posts: 1
Joined: Mon Dec 04, 2017 9:30 am

Re: LeoStick as ISP not working!

Post by Altamirano » Thu Dec 07, 2017 12:57 pm

angusgr wrote:
Tue May 12, 2015 10:36 pm
Thanks Ashley, glad you got it working. Thanks for the heads-up about LeoStick/Windows programmer support, I've updated the tutorial.

Angus
Thanks for the tutorial Angus!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests