Using pin 12 (MISO) on Teensy 4.1 as GPO when pin 11 is being used as MOSI.

lrtjosh

Active member
Hi!

I have a project that is using every pin on a Teensy 4.1, for all kinds of various things. I am using the first SPI buss (pin 11 MOSI, pin 10 CS) to send SPI data to an external display, with no need to receive data back the other way on pin 12 MISO.

Is there any way in code to tell the SPI library not to take control of pin 12 MISO so I can free it up to be used as a standard 3.3v general purpose output pin with pinMode(12, OUTPUT)?

Thanks in advance for any help!

Cheers,

Josh
 
The easiest way to do it, is simply do the pinMode(12, OUTPUT) after the call to SPI.begin();
 
Back
Top