Hi, Atomski

1) little mistake from me : there's no comma close to PULSIN or RCTIME ...

so: PULSIN input, 1, value ... is correct writing.

2) PuLsIn or PULSIN or pulsin are strictly the same for PBP ( and only PBP !!! )

3) offset is in count units : so, 1 unit is 2µs at 20 Mhz Clock, and 1 unit is 10 µs at 4 Mhz ...

as far as i can see, you have a 4Mhz clock ... so, offset value is zero : no reason to keep one extra variable !!!

Your code example will work ( without the comma ...) well, but it reads the high part of the first pulse, and the low part of the SECOND pulse ... generally, it' no problem, but remember it when you have an error detection or use the DEFINE PULSIN_MAX statement - or with non repetitive signals !!!

Alain