16f628a Hpwm-stop??


Closed Thread
Results 1 to 5 of 5
  1. #1
    Caddydan's Avatar
    Caddydan Guest

    Red face 16f628a Hpwm-stop??

    I am using the 16f628a as a lamp dimmer for my mountain bike light. I can change the duty cycle of the hpwm but can't get the pin to just stop without setting the on time to 0-HPWM just runs and runs and.... Any ideas??
    Thanx Dan

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink 0% equals ... Low output

    Hi,

    just have a ZERO for PWM value ...

    CCP1CON = 0 Disables the PWM unit ... think to re-Enable it somewhere.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    AND it's probably safe to set the pin low after that... Maybe.
    Steve

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

  4. #4
    Caddydan's Avatar
    Caddydan Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    I know setting on time to zero turns things off but I wanted to use the same pin for flashing the light and hpwm does not run slow enough. CCP1CON = 0
    worked great.
    Thanx for helping us newbies out.
    Dan

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


    Did you find this post helpful? Yes | No

    Default

    This is why forums exist dude!

    Good luck!

    PS: keep it for you... i learn almost everything here by reading other posts and solutions, datasheet, do experiments and, when possible, helping others. Don't give up.. oh no, don't give up.
    Last edited by mister_e; - 14th April 2006 at 17:30.
    Steve

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

Similar Threads

  1. need help on hpwm
    By helmut in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th August 2007, 15:49
  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. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 14:14
  4. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  5. HPWM and 16F628A
    By Michael in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th February 2006, 14: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