Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
06/12/12 13:59
Read: 556 times

#187683 - Where are you stuck?
Responding to: ???'s previous message
Martin Eliáš said:
If you decide to help me, I'd like to thank you then for your participation on my seminar work :)

Help you with what?

Where are you stuck?

You do know how PWM allows a digital output to supply more or less power by varying the amount of time the pin is active?
For a single RGB LED, you can implement PWM using a dedicated PWM functionality in the chip. Or using hw timers. Or just pure software.

To change color "randomly", you can use a PC program to create an array of random numbers that you insert in your source code. The random numbers would represent the intensity of red, green and blue. Potentially also how long time until next color.

Then you can decide if the color should changed instantly, or if you should gradually change from one color to another.

The above would represent a quite simple program - each individual thing can be broken out and implemented/tested separately.

List of 9 messages in thread
AT89S52 - PWM RGB LED Control      Martin Eliáš      06/12/12 12:17      
   a couple of notes      Erik Malund      06/12/12 13:54      
   Where are you stuck?      Per Westermark      06/12/12 13:59      
   Advice on what ?      Jim Granville      06/12/12 22:51      
   Your reset scheme is unsuited...      Kai Klaas      06/13/12 06:18      
      good tutorial      Martin Eliáš      06/13/12 07:33      
         9V rechargable alkaline battery?        Per Westermark      06/13/12 08:06      
            Definitely Primary!      Andy Neil      06/15/12 12:52      
               going by the instructions ...      Erik Malund      06/15/12 14:10      

Back to Subject List