View previous topic :: View next topic |
Author |
Message |
horizontech
Joined: 09 Nov 2003 Posts: 13
|
PWM LED |
Posted: Sun May 02, 2004 6:45 pm |
|
|
HI !
I looking for the best way to use 1 Pwm to drive 3 LED ( R G B) ?
Do i need to use a TTL MUX 1@3 ?
I Would like to use a PIC 16F872 ?
Thanks
Alain Tanguay |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Mon May 03, 2004 5:30 am |
|
|
Do you want all LEDs to get the same pulse width?
I guess not, most likely you want to generate different colors by combining the three R-G-B LEDs. Is this true?
Driving 3 individual LEDs from a single PWM output will be difficult, how are you going to select the current active LED? It's possible to do that using a 1-3 MUX like you suggested, but that will use 2 i/o pins for the MUX and 1 for the PWM, total of 3. and have complicated code.
Much easier to connect each LED directly to an I/O pin, total of 3 I/O pins, and then create a software PWM.
Even the most basic PIC can handle this. |
|
|
caffca
Joined: 28 Apr 2004 Posts: 5
|
LED PWM |
Posted: Tue May 04, 2004 11:54 am |
|
|
Hi there,
I am also using picstart plus with MPLAB 5.11.......
I could really do with some pointers..... I am trying to get even just 1 LED to pulse via PWM.... I seem to be able to read and write to the pic chip on the picstart plus, but nothing happens on my circuit - i.e. the LED doesn't do anything.....
I'm using a quartz clock - AEL121-CSN 8.000 as the clock.....
And I'm using a PIC16F873
Any help on this matter would be greatly appreciated..... maybe a very simple source code example and matching schematic.....
Regards,
L |
|
|
|