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,612


    Did you find this post helpful? Yes | No

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

    This thread is confusing. You say you want to fade the intensity of a LED and that you need to control the "fade speed". You confuse "fade speed" with PWM frequency which we've tried to explain has nothing to do with it. Then comes the ideas of using external chips, and not that the LT8500 isn't a cool chip (thanks for pointing it out!) and totally capable of dimming a LED but why on earth would you use a $6, 48 channel PWM chip in an "impossible" to breadboard 56pin QFN package, when the CCP module in the PIC you've already got is totally capable of doing what oyu want as long as you can live with 10bit resolution.

    If 12bit is really needed then the TCL5973 is much more suitable. Or you can get a PIC capable of higher resolution PWM, like the 12F1571 which will do up to 16bit resolution on up to 3 channels. At 16bits though I think the frequency is getting on the low side but at 12bits you should be totally workable. Nope, HPWM won't work with it.

    /Henrik.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

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

    PWM frequency, not duty cycle, has do something with fading smoothness - lower the frequency, higher the smoothness is, but flicker is more noticeable. With higher frequency, flicker is almost gone, but fading will be more ugly.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

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

    Yes with the smoothness (ie the resolution or number of available dutycycles) but not with the TIME it takes to fade the LED*
    You can get a fairly high (certainly high enough to not notice any flickering) while maintaining full (10bit) resolution of the CCP module. Going below that point gives you nothing in terms of smoothness.
    [*] Of course, if have a fixed delay of 10ms between duty cycles updates and then change the frequency enough to get from 8 to 10bits without changing the delay it WILL take longer to to do a full fade but THAT's pretty obvious.

    /Henrik.

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, 06: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, 14: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, 18:41
  4. Code running 19 times slower than intended
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 15th April 2010, 12:20
  5. Servo Slower?
    By actionplus in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 4th September 2004, 13: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