Hpwm @ Pic16f777


Closed Thread
Results 1 to 6 of 6
  1. #1
    fuhr3r's Avatar
    fuhr3r Guest

    Default Hpwm @ Pic16f777

    HPWM 2 and 3 not working. I`m using the same frequency for 1, 2 and 3.

    Can someone helpme?

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    is it me or you forget to post the code?

    BTW..
    1. look respective timer in use for each PWM module
    2. Look PBP manual in the HPWM section DEFINE....
    3. look for config fuse
    4. Datasheet
    5. goto step 1
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    fuhr3r,

    since you are new to the forum you should have a look at THIS
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  4. #4
    fuhr3r's Avatar
    fuhr3r Guest


    Did you find this post helpful? Yes | No

    Default

    Hi, the code is very big, almost 8k and commented in portugueese

    This PIC have 2 pins for CCP2, selected with the fuses, so does it need the DEFINES?

  5. #5
    fuhr3r's Avatar
    fuhr3r Guest


    Did you find this post helpful? Yes | No

    Default

    DEFINE CCP2_REG PORTB ' Hpwm 2 pin port
    DEFINE CCP2_BIT 3 ' Hpwm 2 pin bit

    Now HPWM 2 works, but HPWM3 still not working.

    I tryed DEFINE CCP3_REG PORTB and CCP2_BIT 5, but did not work. (only CCP has 2 choices of pins).

    Tomorrow i will try simulate with MPLAB or put a LCD showing CCP3CON.

    Nobody ever used 3 HPWMs?

  6. #6
    fuhr3r's Avatar
    fuhr3r Guest


    Did you find this post helpful? Yes | No

    Default

    http://www.picbasic.co.uk/forum/showthread.php?t=1770

    "Nope. The HPWM command only supports 2 channels. CCP1 & CCP2. You
    would need to modify the 16F library to support CCP3. It's much easier to
    just configure hardware PWM manually."

    Problem solved....

Similar Threads

  1. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  2. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 14:14
  3. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  4. help
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th February 2005, 20:42
  5. Need once your help one please
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th February 2005, 20:33

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