CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PWM LED

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
horizontech



Joined: 09 Nov 2003
Posts: 13

View user's profile Send private message Send e-mail

PWM LED
PostPosted: Sun May 02, 2004 6:45 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon May 03, 2004 5:30 am     Reply with quote

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

View user's profile Send private message Send e-mail Yahoo Messenger

LED PWM
PostPosted: Tue May 04, 2004 11:54 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group