2

Are the SPI pins on the ICSP header of an Arduino Uno "separable" from the correspondent I/O pins - when one chooses to the use the ICSP header can the corresponding I/O pins be used for something else?

5
  • 4
    This is a user-level question, not about electrical engineering.
    – Olin Lathrop
    Jun 17, 2014 at 11:22
  • 3
    Pin assignment isn't about electrical engineering? That's quite a strict definition. While this could exist on the Arduino site, this is perfectly on topic for this site.
    – Adam Davis
    Jun 17, 2014 at 13:48
  • @AdamDavis Olin no doubt meant that anything with the word "Arduino" in it cannot be about electrical engineering. It may take him a decade or few to realise otherwise. Feb 4, 2015 at 13:44
  • Where does it specify that Arduino.StackExchange is only about Arduino questions related to electrical engineering? According the this page (arduino.stackexchange.com/tour) asking a question about the IDE is acceptable. I don't think this SPI / pin question is off-topic at all.
    – cbmeeks
    May 15, 2015 at 15:03
  • @cbmeeks - the comments you responded to here were added to the question while it was at electronics.stackexchange.com, not here.
    – Jules
    Apr 20, 2016 at 14:19

2 Answers 2

4

No. Those pins are not separate on the microcontroller itself. If you need to use SPI and still need more pins you may use analog inputs as digital inputs or outputs. Otherwise you'll probably have to use an expander of some sort, or use a Mega or Due for additional inputs or outputs.

1

Actually, it can. You just can not use them at the same time. One needs to be careful to wire it in ways not to comprise the shared functions. Where MISO can be used as GPIO-INPUT and MOSI/SCK can be used as GPIO-OUTPUT, avoiding any pull up/downs, etc... As such electrical items may interfere with the ICSP.

For example I use the ICSP programming, along with the MISO, MOSI and SCLK pins as hard SPI and use them as Bit Bang one-wire, all on the same board and same wires. I simply ensure the SPI is properly configured each at each use.

One additionally needs to ensure that any peripherals on the shared SPI/ICSP lines are guaranteed to be in reset. Such as a pull down on such devices reset pins. Or a Pull Up on their ChipSelects. Noting that ATmega's GPIO pins are Hi-Z out of reset and during the ICSP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.