Why are you compilcating things?
Just put a crystal or resonator on the pic and have it working on a precise time base. What you are doing now is screwing the timing of the commands and may be locks the pic at the time the freq. is changing. Also at 4MHz and lower the PIC should use XT settings and above that HS settings.
I strongly recommend the PIC using its own clock.
Ioannis




Bookmarks