Per Savniks' original post,
How to change this code to picbasic pro.Also i want to use xtal 4MHZ
I think he's looking for a similar function, but with a 4MHz osc VS 20MHz.

If not, then of course the timing in my example would indeed be wrong.