8mhz internal osc and 455khz


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

    Question 8mhz internal osc and 455khz

    Hi there!

    I am trying to create a quick and dirty HPWM SIGNAL AROUND 455khz
    using nothing but the internal, factory calibrated, 8mhz oscillator of a pic16F690.
    (I don't need high resolution duty cycle).

    I believe this could either be done either by:

    1) using prescaler 1:1, pr2 = 3
    and tuning the pic down to around 7mhz using OSCTUNe register:
    10000 = Minimum frequency (8mhz -12% = 7,04 ~ 7mhz)

    2) using prescaler 1:1, pr2 = 4 and using OSCTUNE TO GET
    UP TO AOUND 9 mhz

    01111 = Maximum frequency (8mhz +12% = 8,96mhz ~ 9mhz)


    For some reason I get the feeling I might be missing something though...
    All comments appreciated...


    greetz,
    mike

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default Bingo !

    Hi, Michael

    Steve's PWM calculator will confirm you an exact 455 Khz @ 50 % duty cycle with 7.28 Mhz clock ...

    http://www.mister-e.org/pages/utilitiespag.html

    Cheers !

    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 " !!!
    *****************************************

  3. #3


    Did you find this post helpful? Yes | No

    Thumbs up

    Thanks!

    And here some help for others on how its solved:


    Mister E's multi-calc outputs the following for the 8MHz oscillator when we want a 455khz pwm:

    500,0 KHz prescaler1:1 PR2=3 6 Bit resolution

    we want the pwm to be a bit slower so:

    455/500= 0.91

    0.91x8MHz = 7,28MHz

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