ofxGPIO icon indicating copy to clipboard operation
ofxGPIO copied to clipboard

using spi1 with MCP

Open cyberboy666 opened this issue 6 years ago • 0 comments

hello, i am trying to read from a MCP3008 on the spi1 port of a raspberry pi3. (spi1 has been enabled in the config.txt)

in openframeworks if i setup my a2d like this:

a2d.setup("/dev/spidev0.0", SPI_MODE_O, 1000000, 8)

then it works perfectly for the pin-setup :

MISO -> BCM 9
MOSI -> BCM 10
CLK -> BCM 11
CS -> BCM 8

however i already have a screen attached to the spi0 pins, which is interfaced with python.

what i had hoped is that if i setup my a2d with spi1 like this :

a2d.setup("/dev/spidev1.0", SPI_MODE_O, 1000000, 8)

then i could wire my a2d like this:

MISO -> BCM 19
MOSI -> BCM 20
CLK -> BCM 21
CS -> BCM 18

however this does not work. in fact it still correctly reads from spi0 if as wired before (and messes with my screen on spi0 when that is wired in)

is it currently possible to switch this in ofxGPIO ? i can correctly set my display to use spi1 with a code change but have already ordered pcbs with it this way round.

thanks !

cyberboy666 avatar Sep 02 '19 12:09 cyberboy666