SPI MISO and MOSI on same Eval Board Pin

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
skcalanderson
 
Posts: 3
Joined: Sun May 23, 2010 6:45 pm

SPI MISO and MOSI on same Eval Board Pin

Post by skcalanderson »

Hello, I am attempting to use an older magnetic rotary sensor eval board that has a SPI interface. But it only has a Data Out pin and you have to send data into that pin to get back the data. I have found c++ code that switches the Microcontroller pins from output to input and back, i.e. using the same pin for SPI data, but how would I do this with Circuit Python. It appears that the bitbang library requires exclusive MISO and MOSI pins. Any guidance would be appreciated.

User avatar
neradoc
 
Posts: 542
Joined: Wed Apr 27, 2016 2:38 pm

Re: SPI MISO and MOSI on same Eval Board Pin

Post by neradoc »

Sorry my knowledge of SPI is not great, but busio.SPI supports half-duplex, is that what you are looking for ?
https://docs.circuitpython.org/en/lates ... #busio.SPI
It's not supported in bitbangio though.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”