I’m very new to particle, and I was having some trouble setting up the SPI interface.
The way that the hardware is set up, I only have access to SPI1, and the default slave select pin is connected to “DAC” (numeric pin 24).
I have the pin configuration set up as so:
#define COL_CLK D4 // numeric pin 52 #define COL_DATA D2 // numeric pin 45 (this is MOSI) #define COL_MISO D3 // number pin 51 #define COL_LE_N A0 // numeric pin 50 #define COL_CLR A2 // numeric pin 49 #define COL_SS DAC //numeric pin 24
Then following the particle datasheet, I have in my setup I have:
// Initialize SPI1 to transfer data to COL SPI1.begin(COL_SS); SPI1.setBitOrder(MSBFIRST); SPI1.setClockSpeed(10, MHZ); SPI1.setDataMode(SPI_MODE3);
And then in my main loop I have:
digitalWrite(COL_SS, LOW); //slave select SPI1.transfer(0xAA); //transfer 1010 1010 digitalWrite(COL_SS, HIGH); delay(1000);
I tried probing the output (COL_DATA pin D2 numeric pin 45) however I just see the output be constantly 0 (GND). (I have also tried transferring “0xFF” and when I probe the output I get a constant high signal as expected.)
Any feedback or insight would be really appreciated, thanks!