• AVR Freaks

PIC12F629: doubt on Timer1 configuration

Author
elberto
Super Member
  • Total Posts : 511
  • Reward points : 0
  • Joined: 2005/05/18 06:35:17
  • Status: offline
2020/10/29 10:36:33 (permalink)
0

PIC12F629: doubt on Timer1 configuration

Hi to all users, I spent much time to write post but I lost all trying to submit post....
In short, I would like to use internal oscillator and drive Timer1 using external clock.
On Timer1 schematics (figure 5-1 of datasheet) it's reported internal LP oscillator, so I could get external clock just adding capacitor.
Is this correct?
I haven't PIC12F629/75 to test, I just need to detect when capacitor is shorted.
thanks.
#1

2 Replies Related Threads

    1and0
    Access is Denied
    • Total Posts : 11501
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: PIC12F629: doubt on Timer1 configuration 2020/10/29 10:58:36 (permalink)
    0 (2)
    elberto
    Hi to all users, I spent much time to write post but I lost all trying to submit post....

    For long post, next time write it in an external editor and then copy n paste to this forum.
     

    In short, I would like to use internal oscillator and drive Timer1 using external clock.
    On Timer1 schematics (figure 5-1 of datasheet) it's reported internal LP oscillator, so I could get external clock just adding capacitor.
    Is this correct?

    No, you need to add a crystal and two capacitors.  Read section 5.5 in your PIC datasheet.
     
    #2
    dan1138
    Super Member
    • Total Posts : 3990
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: PIC12F629: doubt on Timer1 configuration 2020/10/29 11:51:34 (permalink)
    0
    1and0
    elberto
    In short, I would like to use internal oscillator and drive Timer1 using external clock.
    On Timer1 schematics (figure 5-1 of datasheet) it's reported internal LP oscillator, so I could get external clock just adding capacitor.
    Is this correct?

    No, you need to add a crystal and two capacitors.  Read section 5.5 in your PIC datasheet.

    Perhaps not a complete answer.
     
    The PIC12F629/675 provides an RC oscillator mode on GP5 so a pull-up resistor and capacitor should be enough when the configuration words select RC as the system oscillator.
     
    This is a questionable configuration for a TIMER1 external clock source. While is seems a possible configuration it does present the problem of the TIMER1 external clock running four times faster than the instruction clock. This may not work when the TIMER1 clock source is synchronized to the system clock though TIMER1 may count in asynchronous mode.
     
    The data sheet is does not specifically state that the RC oscillator mode is available for the TIMER1 oscillation amplifier when the controller is configured with the system clock source as INTRC. So most likely only the low power 32.768KHz oscillation amplifier is available and you will need to have GP5 and GP4 connected to the crystal.
     
    To achieve the configuration you suggest would require some kind of external RC oscillator circuit to provide a logic level drive to GP5.
    post edited by dan1138 - 2020/10/29 17:28:37
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5