Hello All,
Longtime Embedded Systems Developer (since 1989) newbie to Arduino development.
I am using the Teensy 3.2 and the Teensyview OLED Display module (really nice little display). In addition I am also using the ADNS-9800 Laser Motion Sensor: https://www.tindie.com/products/jkicklighter/adns-9800-laser-motion-sensor/
Both devices use SPI to communicate however one device needs LSB first and Mode 3 and the doesn't. So I was thinking since the Teensy 3.2 has multiple SPI ports I would simply use one SPI port for one device and a different SPI port for the other device.
SPI0 = Teensyview
SPI1 = ADNS-9800
How do I initialize a second instance of SPI functions and choose a different SPI port? I see it as an option in the SPI.h file but I don't see how I actually select one of the other SPI ports.
If anyone has a sample snippet of code showing haw this is done that would be great.
Thanks,
Dave
Longtime Embedded Systems Developer (since 1989) newbie to Arduino development.
I am using the Teensy 3.2 and the Teensyview OLED Display module (really nice little display). In addition I am also using the ADNS-9800 Laser Motion Sensor: https://www.tindie.com/products/jkicklighter/adns-9800-laser-motion-sensor/
Both devices use SPI to communicate however one device needs LSB first and Mode 3 and the doesn't. So I was thinking since the Teensy 3.2 has multiple SPI ports I would simply use one SPI port for one device and a different SPI port for the other device.
SPI0 = Teensyview
SPI1 = ADNS-9800
How do I initialize a second instance of SPI functions and choose a different SPI port? I see it as an option in the SPI.h file but I don't see how I actually select one of the other SPI ports.
If anyone has a sample snippet of code showing haw this is done that would be great.
Thanks,
Dave