In some cases when there are separate oscillators on chip. What does the datasheet have to say on the matter?Hi,
My project is working using a 32mHz Crystal, and one of the timers I want to use uses PRE and POST scale to achieve the correct timing, that uses an 8mHz INT osc.
Can both internal and external run at the same time.
Camerart
Depends on the processor.Can both internal and external run at the same time.
Hi P and I,Depends on the processor.
On ARM processors, yes they can. It starts up on the internal oscillator, and software can select which oscillator it uses.
Two cycles a minute? Or do you mean 32MHz?My project is working using a 32mHz Crystal, a
For most PIC18 devices, yes. There are options to select or have failover for FOSC and usually options to select either with most module (like timers) clocks.Hi,
My project is working using a 32mHz Crystal, and one of the timers I want to use uses PRE and POST scale to achieve the correct timing, that uses an 8mHz INT osc.
Can both internal and external run at the same time.
Camerart

Are you asking can you use one to clock the processor and one to clock the timer, the answer is no, but you can use a separate (secondary) external oscillator to clock the timer, while the processor is clocked by either the internal or the primary external oscillator.Hi,
My project is working using a 32mHz Crystal, and one of the timers I want to use uses PRE and POST scale to achieve the correct timing, that uses an 8mHz INT osc.
Can both internal and external run at the same time.
Camerart
Hi E,Hi C,
This clip from the 18F4431 d/s suggests that it cannot be used for an external Xtal.
2.6.1 INTIO MODES
Using the internal oscillator as the clock source can
eliminate the need for up to two external oscillator pins,
which can then be used for digital I/O. Two distinct
configurations are available:
In INTIO1 mode, the OSC2 pin outputs FOSC/4,
while OSC1 functions as RA7 for digital input and
output.
In INTIO2 mode, OSC1 functions as RA7 and
OSC2 functions as RA6, both for digital input and
output
Why do you need two different Xtal clock sources, how will the 8MHz be used?
E
Hi I,Two cycles a minute? Or do you mean 32MHz?
Hi N,For most PIC18 devices, yes. There are options to select or have failover for FOSC and usually options to select either with most module (like timers) clocks.
View attachment 317779
Hi B,Are you asking can you use one to clock the processor and one to clock the timer, the answer is no, but you can use a separate (secondary) external oscillator to clock the timer, while the processor is clocked by either the internal or the primary external oscillator.
Hi P,The information in the datasheet, but as we know they can be intimidating to assimilate. Refer to datasheet DS39616D-page 34 §3.7 Clock Sources and Oscillator Switching for the rundown. If you still don't get it, then post again and we'll take a walkthrough. The relevant paragraph(s) is
The secondary oscillators are those external sources not connected to the OSC1 or OSC2 pins. These sources may continue to operate even after the controller is placed in a power-managed mode....Most often, a 32.768 kHz watch crystal is connected between the RC0/T1OSO/T1CKI and RC1/T1OSI/ CCP2/FLTA pins. Like the LP Oscillator mode circuit, loading capacitors are also connected from each pin to ground. Pretty hard to miss IMHO.
Exactly what chip and timer are you talking about. For a PIC18 PRE and POSTSCALE are usually timer parameters that some have and others don't. Using the K42 processor series as an example: TMR2 does and TMR3 does NOT.Hi N,
The main program runs at 32mHz Crystal, after setting it up for years.
My mate wants PRE and POSTSCALE, and I don't see it in Crystal.
(I have difficulty in taking all of the D/S in)
C
Hi N,Exactly what chip and timer are you talking about. For a PIC18 PRE and POSTSCALE are usually timer parameters that some have and others don't. Using the K42 processor series as an example: TMR2 does and TMR3 does NOT.
Do you have a copy of the datasheet? Mine is revision D from 2010. Document # DS39616D, titled:Hi P,
Pretty hard to miss IMHO.
If there's too much to miss, I'll read it and not remember, but the time I need to use it.
I may take you up on the offer of a 'walkthrough' later on, thanks.
C
OK, just switch the timer clock source and rescale if necessary for the correct timing.Hi N,
18F4431.
Looking at earlier answer #7, I think a choice has to be made, so I don't think 2x can be run at the same time.
C
Hi N,OK, just switch the timer clock source and rescale if necessary for the correct timing.
Are saying you can't change the TMR CLock Source and adjust the pre and post for the correct TMR timing?Hi N,
I'm afraid that doesn't sound correct.
C