Hey there guys!
I am using an Arduino DUE and I have to hook it up to a really simple communication protocol.
This protocol (I analyzed it using data sheets and oscilloscopes) has the following characteristics:
-Clock idle mode HIGH, Read on clock RISING EDGE -Clock Frequency: 2 MHz -Word length (how many bits are transferred each time?): up to 25 bit. -wait time between 2 words: long enough^^... (like at least 16 µs=32 clock cycles).
So its really basic! It has no Chip selects or what so ever. It just transfers the sensor value bit-by-bit with a clock on the side... It is like a really simple version of SPI Master (from the sensors point of view).
There must be an easy way to use an Arduino to just take this master clock from the sensor and read in the bits... Isnt there? I have read a lot on SPI so far but it just seems like an overkill to my problem... The frequency of 2 MHz cannot changed though... so pure software does not work I think.
I though about using ShiftIn but the problem is that the clock comes from the sensor... And of course I do not know when the sensor is gonna send!
Thank you!! Swampy