pics with 3 hardware PWM ports


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

    Default pics with 3 hardware PWM ports

    hey people, im just wondering if anybody knows of any pics with 3 hardware ports to use the HPWM command on, i am a common user of the 16F877 which only has 2,...... to cut a long story short im after a third line as im using some full colour leds (i.e. 3 primary colours) of which im looking to control for various colours and cycling.. failing that it would mean 2 pics and linking them with a comms line, but its a bit of a waste just for one extra line.

    the reason im looking to use the hardware option rather than software is that im going to have a reasonable amount of code to allow for cycling and manual adjustment ect and feel that the refresh times would be to long to provide sufficent updating..

    many thanks

    Chris

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    the reason im looking to use the hardware option rather than software is that im going to have a reasonable amount of code to allow for cycling and manual adjustment ect and feel that the refresh times would be to long to provide sufficent updating..

    Just a idea...Would using 3 regular pins work? By changing the time the pin is held on, will vary the width of the pulse...

    Granted If you go into a menu...you may not have that "Pulse Train", and kill yourself....

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    puma's Avatar
    puma Guest


    Did you find this post helpful? Yes | No

    Default 3 HPWM Pic's

    hello,

    According to mellabs there are several pics with 3 or more HPWM channels.
    Naming only 3HPWM:
    16F737
    16F747
    16F767
    16F777

    The Puma,

  4. #4
    CBUK's Avatar
    CBUK Guest


    Did you find this post helpful? Yes | No

    Default

    thanks for that puma, the need for having hardware driven pwm is because i shall be driving LED's directly by MOSFETs and need the constant PWM to act as a brightness control hence running more efficently espically with the number of leds im driving rather than having to dissipate the excess unneeded power as in analogue outs with power transistors. using the software outputs dwayne has the disadvantage that because im using RS485 communications between pics is that if i have any errors in timing then i'll loose the software pulses and it'll be blackout! i.e. i have a time out loop to carry out other communications tasks, as well as a display and controls for the 3 sets of RGB leds's
    thanks for your help

    Chris

  5. #5
    anj's Avatar
    anj Guest


    Did you find this post helpful? Yes | No

    Default

    Gday Chris
    If i understand what you are trying to do correctly, there may be another way to do what you want with only one PWM line.
    You take the PWM output from one pin, and run it to each of the three Mosfets through suitable load limiting resistors.
    Then place pulldown diodes on each line ( from between the mosfet and resistor ), back to individual pins on the PIC.
    You can then run background PWM to set general brightness, then by pulling relevant diode pins low, you can effectively turn off those lines. As such yr main loop can control on/off times of each colour line, then adjust general brighness every now and then as reqd.
    Andrew

Similar Threads

  1. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 07:03
  2. Hardware PWM Question?
    By jhorsburgh in forum General
    Replies: 1
    Last Post: - 18th August 2008, 04:07
  3. Inverting the o/p of hardware PWM
    By AndrewC in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th August 2008, 20:36
  4. PWM: Vernacular/Function (Newbee)
    By TerryN in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd July 2008, 17:58
  5. 3 Hardware PWM.
    By sirvo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th January 2008, 13:21

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