page1
START
Do set up
Set next bit pattern
Minimum delay?
Yes
No
End
Get ADC channel index
ISR: Control Read
End
Update statistic data
Store mark value
Channel 0?
Yes
No
Store space value
Set to read other channel and start
Update moving space average
Update moving mark average