Tmr1


Closed Thread
Results 1 to 8 of 8

Thread: Tmr1

  1. #1
    BobSpencerr's Avatar
    BobSpencerr Guest

    Unhappy Tmr1

    Dear All,
    I am trying to configure a 16f628 to run with an external 32khz watch crystal to create a truely accurate clock. The main chip oscillator is 4mhz adn so I am trying to use the tmr1 interrupt function to allow the chip to sleep between updates of the clock.

    So far, I have had absolutely no luck.

    Can anyone help.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Expand on what you've posted Bob... how exactly have you connected your 32k crystal to the PIC... is it in place of your 4MHz crystal, therefore your PIC will be runniing at 32k rather than 4Mhz?

    Melanie

  3. #3
    Join Date
    Mar 2006
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    The 32khz Xtal is connected to the Tmr1 Timer pins RB6 and RB7 with 33pf caps on each pin to ground.
    The main chip oscillator is 4mhz being driven by a 4 mhz crystal on RA6 and RA7, again with caps to ground.

    Do you have any sample code others may have submitted?

  4. #4
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Talking


    ...to allow the chip to sleep between updates of the clock. ...

    It's just THE time to update the clock ... don't you think, Savnik ???

    By the way ... DT_INTS + ELAPSED_INT might be the "couple of the year" ... just need a little SEARCH

    No, Savnik ... not the "couple of the next century" ....

    Alain

    PS : Holy Grail is here ... : http://www.pbpgroup.com/modules/wfse...hp?articleid=8
    Last edited by Acetronics2; - 13th May 2008 at 12:32.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    It's just THE time to update the clock ... don't you think, Savnik ???
    No, because my clock today show 13-May-2008
    The post of Melanie is 18th July 2003, 11:49

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink

    hi, Savnik

    Don't worry ...

    the clock I spoke about was Bob's ... NOT yours !


    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

Similar Threads

  1. Simple TMR1 application example needed
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th February 2010, 09:52
  2. TMR1 external LP xtal setup check
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th October 2009, 18:11
  3. Replies: 2
    Last Post: - 7th October 2009, 00:06
  4. Measuring change of frequency with PIC
    By Aussie in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th July 2007, 01:47
  5. TMR1 Preset Calculation help
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd December 2005, 00:53

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