Hey, Im using the FEZ mini and I am connecting to the AD5206 digital potentiometer over SPI. I had created a class that wraps the AD5206 and used this constructor to set it up:
public AD5206()
{
config = new SPI.Configuration((Cpu.Pin)Pins.GPIO_PIN_13, false, 0, 0, false, true, 1000, SPI.SPI_module.SPI1);
SPI1 = new SPI(config);
}
public void SendAddressValue(int potAddress, int potValue)
{
tx_data[0] = (byte)potAddress;//digipot address (0 through 5)
tx_data[1] = (byte)potValue;//value to put pot (0 through 255)
SPI1.Write(tx_data);
}
previously i had used GPIO_PIN_19 as the CS pin on the SPI but i had to move it to pin 19 so that i could put some other PWM stuff on the board but pin 13 doesnt seem to work for some reason and i am trying to wrap my head around why. I hooked a Saleae Logic to it to see why and can see that the pin 13 never seems to fire even though I can see the data on the SPCK and MOSI pins. Why would it not fire? Can Pin 13 not be used like that? Thanks
James