SPI Sent and Receive
Posted: Tue May 10, 2011 1:28 am
Hello All,
Hopefully someone can help me here.
I'm interfacing a Pressure Sensor Chip to the 18F4865. The interconnection between these two is with the SPI bus.
The way it works is that the PIC has to sent a 11 bit Character which causes the sensor to respond with an 16 bit "answer"
The problem I have is the datasheet of the Pres. sensor is very precise on amount of SCLK pulses between the Dout and Din as well as a 33msec low on the SCLK.
As the clock pulses are controlled by the PIC, how can this be done in flow code.
I have programmed with SPI as to only receive devices (LED displa) or only transmit devices (TC77) but never in/out to one chip.
Any help is appriciated.
Henk
Hopefully someone can help me here.
I'm interfacing a Pressure Sensor Chip to the 18F4865. The interconnection between these two is with the SPI bus.
The way it works is that the PIC has to sent a 11 bit Character which causes the sensor to respond with an 16 bit "answer"
The problem I have is the datasheet of the Pres. sensor is very precise on amount of SCLK pulses between the Dout and Din as well as a 33msec low on the SCLK.
As the clock pulses are controlled by the PIC, how can this be done in flow code.
I have programmed with SPI as to only receive devices (LED displa) or only transmit devices (TC77) but never in/out to one chip.
Any help is appriciated.
Henk