SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By mda_dave
#201122
I am using Arduino UNO as my microcontroller and my goal is simply to control 7 individual LEDs and their brightness altogether. I intend to keep using Arduino UNO and not upgrade to Arduino MEGA or something. Arduino UNO only has 6 PWM pins, so I am short one PWM pin, that is why I am trying to use the shift register.
It seems to me that it can help me to control the LEDs, but I do not see how I can control the brightness combined with the shift register.

Is it just not possible? or
Any suggestions for other methods or components to try?

Thank you.
By n1ist
#201147
To do it in hardware, I would follow darrellg's advice.

If the Arduino isn't busy doing too many other things, I would do the PWM in software; have the timer generate an interrupt that bumps a counter; at each tick, have it check the 7 PWM values and set the output pin corresponding to each one based on whether the counter is below or above that channel's PWM value. You may have to use register access rather than digital.write to get the speed you want.
/mike