18F25J11 RTCC & remappable pin options


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    EE12212's Avatar
    EE12212 Guest


    Did you find this post helpful? Yes | No

    Default Pwm frequency

    hello
    thanks bruce for this code!

    i have a question for you.. if i want to change the frequency to 500Hz.. i do..

    T2CON = %00000110 ' TIMER 2 ON/ PRESCALE 1:16
    PR2 = 250 ' SETUP FOR 500HZ

    but if i want to change to 100HZ i can't.. because prescale is in max (max=16) and PR2 is almost on max(max=255)..
    how i could work with small frequencies?

    best regards

    Pedro Rodrigues

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by EE12212 View Post
    but if i want to change to 100HZ i can't.. because prescale is in max (max=16) and PR2 is almost on max(max=255)..

    how i could work with small frequencies?
    You can't - this is a limitation of the CCP module which has only an 8-bit period register. This table is from the data sheet. With an 8MHz clock, the lowest frequency is 488Hz.

    Name:  TEST-6.jpg
Views: 1981
Size:  38.5 KB

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by EE12212 View Post
    but if i want to change to 100HZ i can't.. because prescale is in max (max=16) and PR2 is almost on max(max=255)..
    how i could work with small frequencies?
    Use the newer 16F1 enhanced core devices.

    Timer2 has a 1:64 prescaler, so you can get PWM down to 62hz with a 4mhz OSC.

    __________________
    DT

  4. #4
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default Re: 18F25J11 RTCC & remappable pin options

    Hello

    I want to use your example on a 18f26j50, but instead of displaying the date
    I want to record data in an external eeprom.

    Must convert it before writing to the eeprom or convert a reading
    of the eeprom before sent to the PC? bcd format

    and that the changes to make to pass a 16F628 to 18f26j50

    Thank you for your help

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 14:55
  2. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 06:07
  3. Advice-scrutiny for my serial controller
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th December 2008, 18:11
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 18:07

Members who have read this thread : 0

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