Different SPI settings; Is that possible
Posted: Thu Jul 10, 2014 1:10 pm
Hello,
I have a project where I'm using different components (real time clock, light sensor and temperature sensor) that are using the SPI protocol.
From my PIC I have made a SPI bus connecting these sensors to collect their data. The problem I have now is that of the three components, one requires a different SPI setting. For the RTC and light sensor I use
SPI clock polarity: Idle_High
SPI clock edge: Data transmit on rising clock edge
SPI sample bit: Sampled at the middle.
Unfortunately, the TC77 temp. sensor requires the following settings to work:
SPI clock polarity: idle_low
SPI clock edge: Data transmit on falling clock edge
SPI sample bit: Sampled at the middle.
Is there any way that this can be re-solved in the SPI legacy module, or, do I need to write a bit banging routine for the TC77?
Thanks
Henk
I have a project where I'm using different components (real time clock, light sensor and temperature sensor) that are using the SPI protocol.
From my PIC I have made a SPI bus connecting these sensors to collect their data. The problem I have now is that of the three components, one requires a different SPI setting. For the RTC and light sensor I use
SPI clock polarity: Idle_High
SPI clock edge: Data transmit on rising clock edge
SPI sample bit: Sampled at the middle.
Unfortunately, the TC77 temp. sensor requires the following settings to work:
SPI clock polarity: idle_low
SPI clock edge: Data transmit on falling clock edge
SPI sample bit: Sampled at the middle.
Is there any way that this can be re-solved in the SPI legacy module, or, do I need to write a bit banging routine for the TC77?
Thanks
Henk