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
Bit Bang PWM for RGB common cathode LED using ADC
Bit Bang PWM for RGB common cathode LED using ADC
- Attachments
-
- RGB BIT BANGED PWM CHANNELS.FCF
- (21.74 KiB) Downloaded 698 times