HPWM frequency range


Results 1 to 7 of 7

Threaded View

  1. #6
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by paul borgmeier
    (Yes, the calcs are a tad confusing at first, but once you get it you will never go back.)
    I find the formulas obfuscate things. Using the MElabs example, with OSC=4MHz each instruction cycle takes 1µS. The period for 1kHz is 1/1000=.001=1000µS=1000 instruction cycles. With the prescaler set to 4, 1000 becomes 250 and since it's Base0 it becomes 249. The duty cycle is the number of instruction cycles that the output is high. 20% of 1000 = 200 and 80% of 1000 = 800. All you are doing is defining the period and duty cycle in numbers of instruction cycles. Once you grasp what's involved you can do the calculations in your head.
    Last edited by dhouston; - 15th June 2006 at 23:02.

Similar Threads

  1. HPWM command and oscillator frequency
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th March 2009, 22:41
  2. HPWM of the port of two HPWM
    By ja2rqk in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th April 2007, 15:05
  3. inaccurate frequency using TMR1 PI18F452
    By nkarpovich in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 14th October 2006, 16:22
  4. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 14:14
  5. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43

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