source= http://www.piclist.com/piclist/2005/04/03/044249a.txt? --- Volkan Tore http://www.piclist.com/member/volkan-fenomen-N88 PIC/PICList FAQ: http://www.piclist.com Led color mixing can get quite annoying. Programming the pic and designing the hardware is just not enough to get a satisfactory result. Physics of leds and the retina physiology gets involved with the topic also. Timing: AFAIK there are no PICs with internal 3 channel PWM circuitry, (since I'm an old programmer recycling himself and a newbie to electronics), PWM should be software driven A.K.A. a virtual instrument. Pic should be programmed with accurate timing. So forget about loops. Interrupts will serve very well but one should have at least 20MHz chips (not the P4 ones) which leave 5MHz of instruction frequency, leaving enough time for calculating what the next color should be etc. I tried things on a 4MHz 16F84A (1M instr/sec), well it works but... you can not do anything else while doing the color drive. Color accuracy: Human color vision (photopic vision) is sensitive to logaritmic energy level changes. So tuning a 16 step PWM bursting for 8 recognizable brightness levels of a single led can become a pain. One may understand that after the efforts of obtaining a simple good old white out of r,g&b leds. Led choice: Choice of the leds are crucial. Unfortunately since leds are driven by PWM which manufacturers generally do not take into account, choosing the correct leds sometimes are left to trial and error. It is frustrating to browse the catalogs to find three ( R, G & B )leds with the same peak intensity at the same voltage (not so necessarily), with the same current characteristics (aaah ! that would be an utopia). When you find one, (usually three leds in one package), the price becomes interestingly high (agilent). Mixing: Opaque silicon sealants are very useful. Power: In a single led pixel (made of R,G & B leds) power is not an issue at all. Frying the leds are really easy :). You can try adding a cool out time slice at the end of each PWM cycle. But for driving bright big panels, I would recommend Allegro driver chips as ULN2803etc. Good Luck, Volkan -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist