Real time clock


Closed Thread
Results 1 to 9 of 9

Thread: Real time clock

  1. #1
    Join Date
    Mar 2008
    Posts
    43

    Default Real time clock

    I am using a PIC18F2450 and need real time clock to schedule events, is this possible in the PIC? if not, is there a 28pin PIC with PIC18F2450 specs and real time clock? Is there an external chip that I could interface with?

  2. #2
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default Re: Real time clock

    Quote Originally Posted by PlantBob View Post
    I am using a PIC18F2450 and need real time clock to schedule events, is this possible in the PIC? if not, is there a 28pin PIC with PIC18F2450 specs and real time clock? Is there an external chip that I could interface with?
    Hi;
    There are various external RTC Chips. One that is very easy to interface and there are several exemples in this forum is the DS1307. There are some PICs with RTC, go to Microchip site and use the chip selector.
    Thanks and Regards;
    Gadelhas

  3. #3
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: Real time clock

    Ok, I decided to order a PIC18F24J50 that has an internal RTC, Do you know I set/read the clock?

  4. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Real time clock

    Here is a great example from Bruce:
    http://www.picbasic.co.uk/forum/cont...le-pin-options

  5. #5
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: Real time clock

    I saw that sample but I am not sure why I would need to remap pins? I not sure if that is there for something else or just for the RTC. Also, do I need external Oscillator and Capacitors for the internal RTC on the 18F24J50?

  6. #6
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Real time clock

    No, you don't need to remap the pins. It is a dual example. He show both " so I'm posting a simple example here showing how to use the RTCC, and how to assign PWM to several pins."

    For you, you can just look at the RTC part.

    From the data sheet under RTCC
    • Requirements: external 32.768 kHz clock crystal
    Code:
      ' Connect a 32.768 kHz watch crystal between pins 11 & 12 T1CKI & T1OSI
      ' with caps to match your crystal load capacitance.
      ' 11        12
      '  |---||---|
      '  |  xtal  |
      ' _|_      _|_
      ' ___      ___  2 x 12pF caps
      '  |        |
      ' gnd      gnd
    Last edited by ScaleRobotics; - 8th February 2011 at 16:19.

  7. #7
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: Real time clock

    Any idea where I can get the 12.5pf capacitors? I have checked all my online suppliers and can't find them.

  8. #8
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Real time clock

    The 12 pF capacitors should work fine.

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,796


    Did you find this post helpful? Yes | No

    Default Re: Real time clock

    And if you want the ultimum accuracy, then replace one capacitor with a trimmer (say 6-15pF) to calibrate it.

    Ioannis

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