Hi, I am very new to C language having only used C++ when I was in university. I am using C at work and am faced with several difficulties:
I am trying to write a program that would detect levels in digital signal (1 or 0) and then get the duration from the first 0 of a cycle to the 0 on the next cycle, ie. duration of one cycle. For example, the data obtained for a digital signal cycle is 0 0 0 1 1 1 0. I will need to get the duration from the first 0 to the last 0 to indicate the total duration of a cycle.
How do I write this in C? The key point here would be to get the duration for one cycle using level detection.
Thanks in advance!