Hi
I tried to adapt a 3D "touchless" sensor which was based on arduino to pic.
The theory is "simple" set pin to output then set pin low. then set pin as input and wait for pin to go high. i did not use the timer i just used a for loop of 10000 and a count variable. but i think it is not enough "time" (10000) for the pin to go high, I tried using the timer but i am not sure if the interupt is firing or if i have the "bits" set correctly. BUT importantly, are there perhaps any issues relating to timing between setting a pin to an output and then setting it back to an input in oshon?
I tried to adapt a 3D "touchless" sensor which was based on arduino to pic.
The theory is "simple" set pin to output then set pin low. then set pin as input and wait for pin to go high. i did not use the timer i just used a for loop of 10000 and a count variable. but i think it is not enough "time" (10000) for the pin to go high, I tried using the timer but i am not sure if the interupt is firing or if i have the "bits" set correctly. BUT importantly, are there perhaps any issues relating to timing between setting a pin to an output and then setting it back to an input in oshon?