That was what I was thinking. I could have an infinite loop containing a few pin high/pin low commands, and a pause command, where the pause variable is set in the interrupt routine.

As I understand it, although this would not give me an exact frequency due to the time taken to execute the commands, the offset from the desired frequency should be constant whatever the value of pause needed? I guess it depends how PICBasic implements the code in assembler ...?

Cheers,


Ben