Bit Bang PWM for RGB common cathode LED using ADC

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
zen
Posts: 8
Joined: Tue Dec 21, 2010 9:50 pm
Has thanked: 4 times
Been thanked: 5 times
Contact:

Bit Bang PWM for RGB common cathode LED using ADC

Post by zen »

I thought I would post this FCV4 program up for anybody needing a program to control a RGB LED's color using bit banged pwm outputs that are controlled using ADC inputs from two potentiometers. I looked for a while trying to find an example of a program like this and I had no luck. This program should run on most any chip that has three outputs and two ADC available..just modify the I/O port names to those on your chip you plan on using. I have also drawn out how to make a simple circuit for this program in the component section. A better way to build this circuit would be to use three potentiometers, one for each color, however this setup will produce a wide range of colors. If any of you have any suggestions for simplifying or improving on this program I would like to hear it.
Note:
This project was built on the 16f887 using the internal osc. set to 8mhz

I owe credit to medelec's program that was posted demonstrating a bit banged led dimming program that can be found here http://www.matrixmultimedia.com/mmforum ... 12&p=14003
Attachments
RGB BIT BANGED PWM CHANNELS.FCF
(21.74 KiB) Downloaded 688 times

Post Reply