I am implementing a driver for a motion sensor which communicates on a single wire communication (GPIO)
I need to set the pin high and low for certain systick values then read one bit sent by the sensor, and the process is about doing this in a loop until the 32 bits are all sent from the sensor.
Is this doable, I mean setting the pin out put set it high and then low, and immediately set it input and read out the state ?
Hi Yassin,
Yes this is doable. I have heard of a project where one-wire communication has been used for control. I will try to get some more details on this. regarding the switching of a GPIO from GPO to GPI I do not have details, but you can alsways try in your code to see if the timing will fit the requirements of your sensor.
Best regards, RvA
Thanks. Yes I made it work but I had to write directly to registers to speed up the communication and the switching as fast as possible.