This is what the author of the original code said to me.

That clock is much faster (meaning the 12F657) . The 12c508 has a 4Mhz clock. The return from Pulsin for the 12c508 is: 100 = 1.0 ms, 150 = 1.5 ms, 200 = 2.0 ms. You need to adjust the numbers to whatever your PIC returns in Pulsin. I have not looked at the data sheet. It will be there somewhere, or in the help data for your compiler.

Maybe this is the problem?