Im building a qlocktwo myself as a project, now for that i needed to control 27 leds. I also wanted to be able to change the brightness with an ldr since the clock will be hanging in my room so that when to room goes dark the clock's brightness goes down.
But since you do not have enough pwm pins i did this with 3 daisy chained 74hc595.
What i don't understand is if i set my brigthness all the way than it's working fine. if i bring the brightness only slightly down than my DS1302 suddenly starts giving times like 0:0:0, 38:38:38 or 64:05:64 and eventually the arduino stops running the program. I don't really know why since the RTC has no connection with the pwm port of the 74HC595 IC...
Set the brightness at 255 and everything works fine with no problems at all, anybody knows what's going on?