HPWM Question


Closed Thread
Results 1 to 3 of 3

Thread: HPWM Question

  1. #1
    Join Date
    May 2008
    Location
    Florida
    Posts
    64

    Question HPWM Question

    I am using HPWM to run CCP1 and can't find the answer in the ugly green book. If I change the freq. do I need to reset the PWM or does the command handle that?

    Also if I decide to use use Darrel's SPWM how would I go about changing the freq real time. I am thinking that setting SPWM_FREQ might do the trick, but got to late last night to test.

  2. #2
    Join Date
    Jun 2005
    Posts
    53


    Did you find this post helpful? Yes | No

    Smile HPWM on the fly

    After you initialize your PWM hardware and just change your PWM speed on the fly.
    0 or 255 is your on or off setting and 1 to 254 is your variable speed.

    for fanspeed=0 to 255 step 25
    hpwm 1,fanspeed,20000 ' PWM Fan Duty Cycle @ 20,000 Hz
    PAUSE 7 ' Delay speed ramp up
    next

  3. #3
    Join Date
    Sep 2006
    Location
    Mexico
    Posts
    47


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by manwolf View Post
    I am using HPWM to run CCP1 and can't find the answer in the ugly green book. If I change the freq. do I need to reset the PWM or does the command handle that?

    Also if I decide to use use Darrel's SPWM how would I go about changing the freq real time. I am thinking that setting SPWM_FREQ might do the trick, but got to late last night to test.
    Interesting question. I can't find anything about it. However, i think that you can change the freq at any time without reset the pwm or change duty cycle. With hpwm command seems to work

Similar Threads

  1. Multiple HPWM question
    By Johan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th October 2007, 13:00
  2. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 14:14
  3. HPWM and A to D interaction question 18F252
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 10th May 2006, 03:50
  4. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  5. HPWM question
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th June 2004, 23:27

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