
Originally Posted by
RussMartin
Interestingly, I intend to use that 32.8 kHz coming out. Although I can probably make do with anything between 32 and 34 kHz, so the tuning may not be as fussy as I am.
It might be more accurate to run the PIC as fast as you can (8Mhz on the internal) and write a blinky LED to give you ~32khz on a single pin.
Code:
main: led (whatever pin) = 1
pauseus 29
led = 0
pauseus 28
goto main
1 cycle for each LED=x statement, 2 cycles for goto, 57 cycles for each pause = 61 cycles total.
8Mhz / 4 = 2 MIPS / 61 cycles = 32,768 Hz.
Then, between changing the pauseus values, and tweaking OSCTUNE, you should get dead-on exactly what you really want.
Bookmarks