- British Engineering Systems - http://britishengineeringsystems.com -

More on Flashey lights

Posted By peter On 12/02/2007 @ 05:00 pm In Stuff | No Comments

People have commented to me about [1] my post on PWM and wondering how it works. The basic idea it this. A byte of data is allocated to each colour red, green and blue giving 256 discrete levels for each or 16.7M coulours in total. A third byte is used as a counter. Firstly all three LEDs are turned on, then as the programme cycles it takes the counter value away from each of the RGB values and if the result is zero for one of these it turns off the appropriate LED. Once the counter reaches 255 it is reset and the LEDs turned on again. If you want more info on this i have written a [2] programme for the PIC10F202 (the teeny wee microcontroller in a SOT23 form factor) which cycles through all 16.7M colours. what’s more the chip is so small you can actually embed it behind the LED!!


Article printed from British Engineering Systems: http://britishengineeringsystems.com

URL to article: http://britishengineeringsystems.com/2007/02/12/more-on-flashey-lights/

URLs in this post:
[1] my post : http://britishengineeringsystems.com/2007/02/03/still-dont-get-where-the-fish-ca
me-from/

[2] programme : http://www.greenwallabygroup.com/light.asm

Click here to print.