Have you seen this thread? Might have the answer to your question.

http://www.picbasic.co.uk/forum/show...t=delay+cycles