Hi again Dave

Hope all is well with you :-)

Thanks for the reply.

As always it has sent me hurtling off to get more info about pulsin and pulsout

So regarding your reply ...

Assuming the reciver side is also @ 20 MHz and T =350uS and 32T as per the above code is 11200 would that mean a figure of 13440 would be acceptable
Code:
DEFINE PULSIN_MAX 13440 >13440 returns a 0
or have I done the wrong by taking 120% of 11200
Should it be less ?
The reason I am asking is what happens if the pulse is less than 13440 , let's say it is the actual max without variance and is spot on as 11200 that arrives...do we just discard it ?
If I take max as 11200 and then take off 15% that leaves me with a figure of
9520.
This seems to be the one I should use because if the pulse is anything less than this then we should discard it right ?
Now i have a MIN and a MAX for the received initial pulse and something to test against right.
So...
IF pulsein < 9520 or > 13440 then discard it

Is that correct ?

Kind regards
Dennis

Do i have it correct so far ?