I was thinking that 1 is represented with missing pulse.
You can try something like this
Code:DEFINE PULSIN_MAX 65535 ' Limit wait-for-pulse and maximum-pulse count While PORTC.4=0 'wait for rising edge of start pulse WEND FOR I=0 TO 33 PULSIN PORTC.4,0,W3 IF W3>XXX THEN GOTO GotData NEXT I




Bookmarks