I have a device that uses a SPI-like clock / data mechanism, however the transfer length depends on what form of command you are sending to the device. This makes standard SPI 8/16 bit transfers impossible. For certain commands though the device has a 'bulk' write option that is 8 bits wide.
I have taken adavantage of this on a PIC by bit-banging in the non 8-bit commands and then using SPI to handle the bulk transfers. This really speeds up communication, but unfortunately I can't seem to replicate this behaviour on the NetDuino as once I initialise SPI the SPI pins are not longer available to write to manually i.e.
SPI.Configuration conf = new SPI.Configuration(Pins.GPIO_PIN_D4, false, 0, 0, false, true, 1000, SPI.SPI_module.SPI1); SPI SPI_port = new SPI(conf); OutputPort _clkPin = new OutputPort(Pins.GPIO_PIN_D13, true);
causes an exception CLR_E_PIN_UNAVAILABLE.
Is there someway to get around this or perhaps I am looking at this the wrong way?
Thanks in advance
-(e)