Folks, I running a PIC 18F4320 at 40 MHz using a 10 MHz crystal and the HSPLL clock mode. I have another chip on my board (quadrature encoder) that requires a sampling frequency clock somewhere between 10 KHz and 100 KHz (TBD later). Thought I could use one of the timers and a digital I/O line to generate this clock in software. Thus setup Timer1 to interrupt every 50 microsec., down to every 5 microsec., to toggle the I/O line. Writing the interrupt code in C and not paying much attention to time optimization :-) I, of course, run out of steam just above 10 KHz (i.e., spend all my time in Timer1 interrupt code). Is it possible to use the special Timer1 clock features of this chip to just run an LC oscillator, which is normally used as a secondary, low-power mode clock (even though I NEVER intend to use this clock as the PIC's cycle clock)? If so, how do I set it up? Do I need to use a crystal, or can I just use a resistor/capacitor network? (BTW, I tried to sort this out using the official Microchip datasheet for this IC, but didn't get enough info.) If all else fails, I'll probably just cram an NE555 and RC on the board :-) TIA, Mike Palo Alto, CA -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist