Trying to get started w/ HPWM


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    WOW. Thanks for the serious 'pointer'! Ha. I just assumed that the HPWM command was the way to go. I haven't studied this long enough to know better, but I saw a code example on melab's own website that used this method, and never once used HPWM - I kept looking for the HPWM command.

    Trying to direct the a PWM output to an available/unused pin now is what's concerning me, but am about to do some reading on the CCPMX & CONFIG1 commands, and hopefully will find the answers.

    Your code is a great help, and I'll stop looking at 'HPWM'. THANKS.

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    The PBP HPWM command only gives something like 32Khz max PWM frequency. Although that is fine for a few things, writing directly to the registers allows frequencies to 416K and above.

    Your chip's datasheet is your friend here. It explains the PR2 value vs. max resolution. For example: In the PIC18F8722 datasheet, look up table 17-3.
    Charles Linquist

  3. #3
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by circuitpro View Post
    ....Trying to direct the a PWM output to an available/unused pin now is what's concerning me.....
    Unless you are using a device that has PPS (Peripheral Pin Select for mapping digital peripherals to various I/O for design flexibility) such as the 28/44-pin J11 and J50 series, the PWM outputs are fixed.

Similar Threads

  1. need help on hpwm
    By helmut in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th August 2007, 16:49
  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. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 15:14
  4. HPWM and A to D interaction question 18F252
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 10th May 2006, 04:50
  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