3

I'd like to know if it's possible to use the ICSP header pins on the Leonardo as GPIO pins, for example for software serial, and how to address them. I've a project which needs all available I/O pins, and I could use having serial comms on those "extra" pins.

asked Nov 8, 2016 at 16:17

1 Answer 1

3

From packages/arduino/hardware/avr/1.6.*/variants/leonardo/pins_arduino.h:

// Map SPI port to 'new' pins D14..D17
#define PIN_SPI_SS (17)
#define PIN_SPI_MOSI (16)
#define PIN_SPI_MISO (14)
#define PIN_SPI_SCK (15)
static const uint8_t SS = PIN_SPI_SS;
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;

Those are the pin names and numbers you can use. Note that SS/17 is connected to the RX LED.

answered Nov 8, 2016 at 16:38
2
  • Thanks! I'll test it as soon as I have some time to spare! ;) Commented Nov 10, 2016 at 17:02
  • It works, though SoftwareSerial don't seem to be able to manage baud rates of 115200 bps, which I need.. :$ Commented Nov 10, 2016 at 20:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.