I am using PicBasic Pro with the 12F675. I am using the internal 4MHz oscillator and seem to be having some issues.

I will need to create 30KHz, 33KHz, 36KHz, 38KHz, 40KHz and 56KHz. 38KHz is the most important and the one that I am working with first. I would like to make a 13uS on and 13uS off square wave.

If I run just a tight loop turning the output on and off the output is about 4.4uS on and 4.4uS off. Does this sound correct?

I tried to use pauseus 13 thinking that I would get a 13uS pause but it created about a 25uS pause. pauseus 1 still causes a 25uS pause. Is there that much overhead in turning the pin high and low.

Here is what I am trying.

freq38K:
HIGH IrLed
PAUSEUS 13
LOW IrLed
PAUSEUS 13
GOTO freq38k