Frank N. Furter Guru
 Joined: 28/05/2012 Location: GermanyPosts: 1153 |
| Posted: 11:43am 08 Sep 2023 |
|
|
|
Hello to all,
I would like to use a PicoMite to measure the amount of time between the low/high transition of two pins. So a timer would have to be started when the first pin goes high and stopped again when the second pin also switches from low to high.
What is the easiest way to program this? I don't know how to solve this with an interrupt... (It can also happen that the second pin is already High - then it would have to wait until it becomes High again...)
To poll the inputs cyclically would be one possibility - with interrupt it would be more accurate?
The task is to determine the time offset of the zero crossings of two 50Hz sinusoids, which were previously transformed into square wave voltages by two comparators.
Any programming suggestions would be very welcome!
THANKS!!!
Frank |