Usin Pro Micro as ISP

I finally got a Due, after near 8 weeks in transit. Unfortunately this board is just writing garbage on serial.print(). I found loads of others reporting similar problem and they solved it by putting a new bootloader on the board. So, I'd like to do the same.

I found this guide for how to use a Uno or Mega to load a new bootloader onto the Due. http://arduino.cc/en/Hacking/Upgrading16U2Due

However, I don't have any Uno og Mega. What I do have is a Pro Micro. So can it be used for this purpose? The most obvious is that pin connections must be different. SCK - 13 (uno) - seems to be D15 on Pro Micro MISO - 12 (uno) - seems to be D14 on Pro Micro MOSI - 11 (uno) - seems to be D16 on Pro Micro slave reset - 10 (uno) - seems to be D17 on Pro Micro - but there is no D17 on the board?

So how can I get around the missing D17 pin? Are there any other issues I'll run into using a Pro Micro for this?

I suspect any pin could be used for slave reset.

...R

petterg: slave reset - 10 (uno) - seems to be D17 on Pro Micro - but there is no D17 on the board?

Pick a different one. I'm sure the sketch lets you choose different pins.

The scetch refers to the pin by name "SS". On the pinout the pin is also labeled "SS". I guess it wouldn't be labled like that unless there were any special about it. What's special about the SS-pin?

SS stands for slave-select. What pin on your Pro Micro is assigned to this?

I'm inclined to revise my original comment about "any pin will do". I hadn't realized that the Uno uses the SS pin to control reset on the breadboard device being programmed. I had placed too much weight on the fact that the SS pin is not used on the breadboard device while it is being programmed.

Can you provide a link to the Pro Micro as I can only see a Micro or a Pro mini.

...R

Robin2: Can you provide a link to the Pro Micro as I can only see a Micro or a Pro mini.

Apparently the Pro Micro is originally a sparkfun derivative.

Originally ...

According to the schematic it looks like the SS pin is connected to one of the leds.

I don't know if that precludes the board from being used to upload code to another device.

There may be two separate issues - (1) is it possible to redefine the pin that SS points to and (2) will the code work if the pin is redefined, probably not if its usage is required by the Atmel hardware.

I think you would have to use the proper SS pin if the Pro Micro was the slave device, but maybe not if it's the master.

...R

Yes, the not-existing pin D17 controls the led.

Thanks for pointing out the SS = Slave Select. As I understand the protocol, slave select is just being used for the slave device to tell it's time to listen for incomming signals. It's not serving any purpose on master device. From that I would guess that any pin would do. Then my best guess for why the sketch uses "SS" would be that they want to use a named pin in order to make the sketch compatible with (almost) any board, independent of pin numbering.

Does this thinking sound reasonable?

That's reasonable, but that doesn't mean it's correct.

I think it's time for suck-it-and-see.

...R

Guess I'll need to try to understand how the pin is used in the sketch. I don't want to kill the Due. 8 weeks wait for a new one is not what I'm up for now.

I recently tried to use the pro micro as programmer for an ATTiny85, the principle is the same I suppose, just the wiring is going to be different for the due.

There are some things you need to do in order to get the pro micro to work as programmer:

  1. You need to make a copy of the ArduinoISP program in the example folder. There you need to change the following:
  2. Definition of the SCK pin to 15
  3. Definition of the MISO pin to 14
  4. Definition of the MOSI pin to 16
  5. Definition of the RESET pin to 10
  6. Save the updated ArduinoISP as something else, for example ArduinoISP_for_pro_micro
  7. Upload the ArduinoISP_for_pro_microc sketch to the pro micro
  8. You need to update the IDE's programmer.txt file. You can find the file using this link: https://www.arduino.cc/en/hacking/preferences

At the bottom of this file you need to add the following: arduinoispleo.name=Pro Micro as ISP arduinoispleo.communication=serial arduinoispleo.protocol=arduino arduinoispleo.speed=19200

  1. Connect the due to the micro (Micro to Due):
  2. Pin 10 to reset
  3. Pin 15 to SCK
  4. Pin 16 to MOSI
  5. Pin 14 to MISO
  6. Ground to ground

  7. In the IDE, select Pro Micro as ISP to burn your bootloader to the due

I'm writing this from memory, I hope I didn't make any mistakes.

Success!