Pic18f24j50 usb>>rtc


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2008
    Posts
    43

    Default Pic18f24j50 usb>>rtc

    I am using a PIC18F24J50 that has a internal RTC, I need to be able to set the time from a VB program over USB, I can get the data from the VB program to the PIC, I just need to to know how to set the clock once I get the data. I will send something like this:

    Time: 06:59:23
    Date: 02:08:2011

    Thanks,
    Bob

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default Re: Pic18f24j50 usb>>rtc

    Have you checked Chapter 16 of the device data sheet?
    Why pay for overpriced toys when you can have
    professional grade tools for FREE!!!

  3. #3
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: Pic18f24j50 usb>>rtc

    Yes, I looked at section 16.2.2.1 and it states if I want to use the internal Oscillator by setting CONFIG3L<1>, I just can't find anyone who knows where you set that. Any idea?

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Pic18f24j50 usb>>rtc

    You set the fuses in the PBP *.inc file or in code space.
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    To find all of the options go to the MPASM Suite
    C:\Program Files\Microchip\MPASM Suite

    And find the *.inc file for your chip there, do not modify this file.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: Pic18f24j50 usb>>rtc

    Read the post, looked in the 18F24J50.inc file and still not seeing anything that references settiing
    CONFIG3L<1>

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Pic18f24j50 usb>>rtc

    PBP include files do NOT include every single config option. They're normally only going to include just enough to help you get the PIC up & running.

    It's up to you to read the data sheet, and config options you want to change if the default header file doesn't configure everything you want to change from the default.

    For a complete list of all config options, don't look in the PBP .INC file. Look in the P18F24J50.INC file in your MPASM Suite directory. This has a list of every single config option the PIC type has, and explains what each option does.

    In the microchip include file for this PIC type you'll see;

    ; RTCC Clock Select:
    ; RTCOSC = INTOSCREF RTCC uses INTRC
    ; RTCOSC = T1OSCREF RTCC uses T1OSC/T1CKI

    Now look in the PIC data sheet config section for what each of these options are. I do not recommend you use the internal osc for RTC if you want a precise clock.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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