Turn off HPWM?


Closed Thread
Results 1 to 5 of 5

Thread: Turn off HPWM?

  1. #1
    Join Date
    Aug 2009
    Posts
    3

    Default Turn off HPWM?

    Once you turn on HPWM, can you turn it off?

    Example: (Melanie's LCD Contast?Backlight tips)

  2. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default Re: Turn off HPWM?

    It may differ from PIC to PIC so check the data sheet, but taking the 18F1320 as an example, the following would turn off HPWM:

    CCP1CON=0
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  3. #3
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default Re: Turn off HPWM?

    Depends on what you consider "off". If you set the duty cycle to 0% and leave it there your output pin will be '0' (low). If you set the duty cycle to 100% and leave it there your output pin will be a '1' (high). You might also put the CCP1 pin into the hi-z input state.

    Regards, Mike

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


    Did you find this post helpful? Yes | No

    Default Re: Turn off HPWM?

    Hi,

    The one and only question is :

    1) do you want to stop the PWM output ( set it to 0% )

    2) or turn HPWM Module really off ... which is not compulsory, but some kind of " double security ".
    you then can use Timer2 for other purposes ...

    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 " !!!
    *****************************************

  5. #5
    Join Date
    Aug 2009
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: Turn off HPWM?

    Thanks for the replies:

    I wondered about turning off the HPWM in software, i.e. save battery, use Timer2 for other purposes, etc.

    I was thinking about using the HPWM to drive an LCD backlight. I wanted to turn on the backlight ,i.e. start HPWM, with a button push and somehow turn it back off again when no longer needed.

    Charlie

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