Hi,
I'm starting using SPI on my Hercules HDK but have some problems. Where can I found a simple example? I need only to send 16bit commands to my device (a TI DAC7568). The protocol requires only 3 cables (clock, data and another one called sync which, requiring only to stay low during transmission, I suppose can be performed by the CS signal.
Seems that in halcogen there's not a lot to do: enabling SPI2 driver and selecting LSB first for my protocol (required by the device).
Do this code is enough?
spiInit();
spiDAT1_t dataconfig; // How to fill this?
// build command
uint16 data[2];
data[0]=...
data[1]=...
spiTransmitData(spiREG2, &dataconfig,2,data);
What must be set in the dataconfig struct? (Ive found no description about).
Where I can select to use the "Data format 0" I've setup in Halcogen?
Do I forgot something?
Thank you