HPWM confusion


Closed Thread
Results 1 to 4 of 4

Thread: HPWM confusion

  1. #1
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76

    Red face HPWM confusion

    Ok... please forgive. I've read the posts. I've seen the code and still I just don't get it.

    Using the PWM command requires the output pin, the duty, and the cycle... cycle being the length of time that it is running right?

    So:

    pwm portb.1,127,200 '4mhz clock

    would produce pulses on portb.1 at an approximate 50% duty cycle for 1 second right? Then you'd bounce to the next line of code.

    When you use HPWM, it runs in the background until it is stopped. So why do you need to put a cycle time? Doesn't it just run until you tell it not to?

    I know this is simple but my brain just won't allow entrance!!!

    Thanks for holding my hand!

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Ross, there isn't a cycle in the HPWM command.

    HPWM Channel,Dutycycle,Frequency

    Channel is the output you want to use.

    Dutycycle is the on/off ratio.

    Frequency is how many times it does it per second.

  3. #3
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76


    Did you find this post helpful? Yes | No

    Default Pros and Cons of Frequency used with HPWM

    Thanks CocaColaKid,

    That helps a lot.

    How is a frequency chosen for a given application? I suspect it will depend on what is being driven.

    Can someone give pros and cons of high and low frequencies for the HPWM command? Rules of thumb? Anybody?

    Thanks,

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

  4. #4


    Did you find this post helpful? Yes | No

    Default

    That's a good question. I'm not really sure, I usually just use 1kHz.

Similar Threads

  1. HPWM Confusion in spec sheet
    By lerameur in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th September 2008, 01:48
  2. HPWM of the port of two HPWM
    By ja2rqk in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th April 2007, 16:05
  3. HPWM confusion
    By lerameur in forum General
    Replies: 12
    Last Post: - 5th November 2006, 11:09
  4. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 15:14
  5. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 03: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