How to make HPWM slower with 16F887?


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default Re: How to make HPWM slower with 16F887?

    Then you ARE using the correct peripheral module. I just don't undersand why you think you need (or even WANT) to have the PWM period in the seconds range. The PWM frequency needs to be at least 20-25Hz or you WILL see that the LED is actually blinking.

    If you want to slow down the time it takes to fade up/down it is not the PWM frequency you need changing, it's how often you update the dutycycle. Just insert a PAUSE 10 in your FOR-NEXT loop and the fade will take 2.5 seconds.

    But again, managing the (E)CCP module "manually" is better for this. There are plenty of examples around for that but by all means, go ahead with HPWM to get started, its drawbacks may not affect you.

    /Henrik.

  2. #2
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: How to make HPWM slower with 16F887?

    Quote Originally Posted by HenrikOlsson View Post
    The PWM frequency needs to be at least 20-25Hz or you WILL see that the LED is actually blinking.
    Hi Henrik,

    I agree with your comment however it should be noted that a lot of people can still see the LED blinking at these rates. In fact, a small percentage of the population can still see LEDs blinking at 100Hz and higher!

    Cheers
    Barry

Similar Threads

  1. Can't make RA1 a digital Input on (10 out of 20) 16F887.
    By paulgrut in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 11th October 2013, 07:53
  2. USB HID is slower than often using PIC18f2550
    By Ahmadabuomar in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 16th November 2010, 15:05
  3. Mibam at 20mhz runs slower than at 4 mhz
    By Homerclese in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st October 2010, 19:41
  4. Code running 19 times slower than intended
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 15th April 2010, 13:20
  5. Servo Slower?
    By actionplus in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 4th September 2004, 14:56

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