spi4teensy3 alternate pins + usage with SPI lib

Status
Not open for further replies.

tenkai

Well-known member
Pardon me if these questions have been asked / answered previously. I searched but found nothing.


1 - I would like to use the spi4teensy library, but using alternate pins 8 for MISO, 7 for MOSI and 14 for SCK. I have not been able to find an example of this. In the SPI library I just use SPI.setMOSI(7) etc...

2 - Is it possible to use the spit4teensy library for one device, and the SPI library for other devices? I am trying to control a 16 bit Octal DAC using spi4teensy library, while also using the SD library to communicate with some flash memory. Has anyone gotten this to work? When I try to enable both, my teensy freezes, I have not been able to figure out a cause. I am trying to put together a smaller test case that I can post easily.

Thank you!
 
Pardon me if these questions have been asked / answered previously. I searched but found nothing.


1 - I would like to use the spi4teensy library, but using alternate pins 8 for MISO, 7 for MOSI and 14 for SCK. I have not been able to find an example of this. In the SPI library I just use SPI.setMOSI(7) etc...

2 - Is it possible to use the spit4teensy library for one device, and the SPI library for other devices? I am trying to control a 16 bit Octal DAC using spi4teensy library, while also using the SD library to communicate with some flash memory. Has anyone gotten this to work? When I try to enable both, my teensy freezes, I have not been able to figure out a cause. I am trying to put together a smaller test case that I can post easily.

Thank you!

re 1, not the most elegant way, but here's one way: https://github.com/mxmxmx/temps_uti...ies/spi4teensy3_14/spi4teensy3_14.cpp#L19-L21 , ie edit the init function.

re 2, i don't know. in theory yes, i suppose. afaik, spi4teensy doesn't use transactions though, so that might be one cause.
 
Pinging this thread again. I am still curious if anyone has successfully used the spi4teensy library at the same time as the built in SD library / SPI.h?
 
Status
Not open for further replies.
Back
Top