You have asked this already.

http://www.picbasic.co.uk/forum/show...5187#post35187

Why re-post the same question?

You could go with the example SAYZER gave you and while in the loop count to a variable every 100 ms ... Read the variable or take a look at the PULSIN command, might be easier.