18F2620 32mhz pll and Timer1 250ms ticks


Closed Thread
Results 1 to 2 of 2
  1. #1

    Default 18F2620 32mhz pll and Timer1 250ms ticks

    I think i have configured my 18F2620 to run at 32mhz. Prev 8mhz and timer1 4hz ticks no problem.

    Now i'm after Timer1 interrupting every 250ms with clock running at 32mhz..

    Using mister e's calculator T1CON seems to need a 1/32 prescaler. But i don't see how to select that. Not listed?..

    Am I missing something or is a 1/32 prescaler just not available with the 18F2620.

    TMR1CS seems to suggest a 1/4 divider from fosc? I'm a bit confused..

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: 18F2620 32mhz pll and Timer1 250ms ticks

    That's correct, 1:32 is not available - and I'm pretty sure that's not specific to the 18F2620.

    When the instruction clock is selected as the source for TMR1 then it's Fosc/4 so for your 32MHz clock the timer would run at 8MHz. You will not be able to get 250ms "in one go" when running at such high speed as 32MHz. What you need to do then is make it interrupt at some faster rate, say 25ms and then count ten interrupts for a total duration of 250ms.

    An alternative is of course to connect a 32.768kHz crystal to the TMR1 oscillator pins and run it off of that.

    /Henrik.

Similar Threads

  1. Bootloader pic16f1825 @32mhz pll
    By richard in forum General
    Replies: 10
    Last Post: - 13th July 2016, 12:42
  2. Using INTOSC 32Mhz as RF Radio Control and Data Communication
    By rayzrocket in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 13th January 2011, 12:10
  3. Accurate ticks generation
    By Thardin in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th May 2010, 01:36
  4. Restart 18F2620
    By cerio in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 27th June 2007, 14:29
  5. 18F2620 Interrupt
    By Ron Marcus in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd February 2006, 03:12

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts