only the duty cycle change, Ton+Toff remain the same. so using Pulsin to read it should work. case not, the internal timer would be perfect...
Code:
' just a snip... not the whole thing...
while InputIO=0 : wend ' wait for rising edge
Start timer
Whiel InputIO=1 : wend ' wai for falling edge
stop timer
copy Timer register to a variable
enjoy!
Or use an interrupt to start and stop the timer and dump the results to a variable.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks