DSPIC Oscillator/Timer Questions.

Status
Not open for further replies.

variaseng

New Member
Hi, I would just like to ask about some things I'm confused about the timers/oscillators in the dsPIC. In one site I saw,


I'm confused about what the internal clock here is. For example, I'm using a primary oscillator which is 8MHz. This is the Fosc, right? And Fcy = Fosc/4. But which is the internal clock that I should use for calculating the period of interrupt requests?

Thank you very much!
 

Correct.

9.2 Timer Prescaler
The input clock (FOSC/4 or external clock) to the 16-bit
Timer has a prescale option of 1:1, 1:8, 1:64 and 1:256,
selected by control bits TCKPS<1:0> (T1CON<5:4>).

The input to the timer prescaler is FOSC/4. Therefore you should use Fcy to calculate timer periods.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…