Hello!
I’ve searched the forum and example code and gleaned what I could but
I’m not sure how to make this work.
I am trying to use socket 6 to communicate SPI to an analog devices eval board
with a digital pot (AD5161).
I have a 10 pin connector inserted into socket 6 and then broke out the pins on the other
side of the cable to connect individually to the correct pins on a 25 pin connector into the eval board.
using pin 1 vcc, pin 4 as chip select, 7 & 8 as MOSI & MISO, 9 clock, & 10 gnd.
I believe the electrical connection is ok but my software interface is not doing anything when I write (see no clock or chip select change on osciliscope).
Here is how I configure the SPI:
m_pot1 = new SPI.Configuration(
Cpu.Pin.GPIO_Pin4, // chip select
false, // set low when accessing the chip
0,
0,
true, // clock signal will be set to high while the device is idle
false, // data is sampled on the SPI clock falling edge
1000,
SPI.SPI_module.SPI1); // is this socket 6 on the spider???
m_SPI = new SPI(m_pot1);
I’ve not used this spi interface before so wondering, how does it make the connection to socket 6? I’m assuming this is referenced by SPI.SPI_module.SPI1. I also tried SPI2 but that didn’t work either. Does this configuration look ok?
Also, I’m assuming all I have to do is configure , instantiate a new SPI and then write and all the chip select and clock signals should turn on as defined by the config. Is there another step or am I correct in this assumption?
thanks!