I'm interested in utilizing the MISO pin for another use while I'm doing SPI. As I'm out of digital pins and have no need to talk back to the controller. Is this doable? Or will using the SPI library enable me to only use this pin for SPI? Thanks for your help!
The SPI hardware does not let you use pin - while MOSI clocking data out, data is being clocked on MISO.
See Section 19 of the datasheet.
"When the SPI is enabled, the data direction of the MOSI, MISO, SCK, and SS pins is overridden according to Table 19-1 on page 164."
The current SPI lib does a bidirectional transfer, hardware SPI is used so no you can't use this pin for other things. You can use the analog pins for digital I/O have you used all of them up.
What are you using all the other pins for?
Mark
holmes4:
What are you using all the other pins for?
Motor control. I'm using an existing library that utilized pin 12 of the Uno. I'll change the function of the pin in the library and find a work around.
If your using a motor shield you wont find a software work around. Which motor shield are you using.
Also look at using software SPI.
Mark
I've been using the Adafruit motor shield to drive a small stepper motor. The SPI function is being used to control a D-A Converter for variability in a DC Motor. This will be a custom PCB Arduino shield, so physically moving pins won't be an issue, as long as I update the library for the AF shield.