e.g. trigger handler pseudocode:
pwidth = now - last
If pwidth > 500
STATE= header
else if pwidth < 300 (microseconds)
bits[bitno++] = 1
else ( pwidth is between 300 and 500 )
bits[bitno++] = 0
If bitno >= 76
STATE = done
Thanks!
John
Sorry for crosspost but I realized it might be more suitable question for here...