Yeah, that's a good point. I will hook an oscilloscope and see what's going on. The interesting thing is that when VirtualWire library is used, PulseIn() function returns incorrect values. For example, if pulse duration is 1900 uS the reported value is around 1500 uS. And when the pulse is 1000 uS, the reported value is around 850 uS. As soon as I remove the library, the durations are reported correctly.