[PIC] Internal Oscillator Select

Status
Not open for further replies.

M.Rehan

Full Member level 2
Joined
Feb 10, 2016
Messages
129
Helped
2
Reputation
66
Reaction score
33
Trophy points
28
Activity points
972
I want to use internal oscillator for all clocks and timers and other operations

which bits should I chose?




18F46k22
 

Wrong question.
There are two separate things you need to sort out: 1) the available clock sources and 2) the clock source to use for a particular timer/other peripheral.
For that device you need to look at the "Oscillator Module" Section (Section 2) in the data sheet to determine the oscillator for the device. This will let you set Fosc. Some devices let you set up several clock sources so that you can have one for Fosc and another for specific peripherals (e.g. if the device has an RTCC then it often gets driven from the secondary oscillator with a 32.768KHz crystal).
Next you need to look at the section in the data sheet for the available clock sources the peripheral can use. In the example you have provided, the clock can come from an external source (via a pin on the package) or from Fosc (either directly or divided by 4). What options you have after that (e.g. in your example you can apply a pre-scalar as well to further slow the clock pulses that get used by the timer) depends on the capabilities of the device. Again you need to read the data sheet to see what is available and then determine what suits your purpose.
Susan
 
Reactions: M.Rehan

    M.Rehan

    Points: 2
    Helpful Answer Positive Rating
In oscillator selection mode I already have selected internal oscillator and further I want to use internal oscillator for the operation of Timer1.

Red block on image actually confused me . it says different than above arrow lines


I have knowledge of Pre and Post scaller
 

What is confusing?
What have you set the TMRxCS bits to? I assume it is 0b01 (0x11 is reserved and 0b10 is for an external clock source) so the box you have highlighted is preceded by the words that the TxSYNC bit is ignored and so is not relevant.
Susan
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…