I am measuring pulse length.This routine works fine as long as I comment out serin2 command. It appears that pulsin command is affected or timing when I add serin command. I no longer decode valid pulse that I am monoriting with a scope. Any Suggestions, I have tried numerous delays etc.
Thanks in Advanced
Stuck and sleepless
wait_for_t0:
if portb.0= 0 then wait_for_t0 ' loop until rssi goes high
pulsin portd.4,1,PLENGTH1 ' MEASURE TIME C2 IS HIGH AND STORE
IF PLENGTH1 > 255 AND PLENGTH1 < 270 THEN COUNTPULSes ' 42 usec error allowed
serin2 b2,16780,1000,wait_for_t0,[WAIT ("$$"),cmnd] ' get command wait $$ timeout 1 secs added
GOTO wait_for_t0
Bookmarks