LDR with 7 seg display and PWM output

Hi,

cjcj:
Late yesterday I realized that my 7 segment digits being common cathode require a ground. I was trying to feed the converted analog signal (between 0 and 255) to these pins. So I replaced the digits with anode type, swapped the high and lows in the code and it started to work.

Assuming you mean you were connecting a pwm output to the common connection on the display, swapping the common cathode display for a common anode one can't be the reason it started working. Either type should work equally well.

cjcj:
Can I just ask another question. Am I approaching this the right way? To minimize outputs I'm multiplexing via the commons of the digits delaying using the millis function. Then to alter the intensity I'm using an LDR. Ultimately I want to convert this to large LED sign run on 24V which will be run outdoors.

For outdoor use you want to avoid multiplexing. It will be difficult enough to get them bright enough and multiplexing will make it much more difficult. Use common anode displays and drive each digit with a tpic6c595 high-current shift register.

Also, higher voltages will not give you any advantage if you are using manufactured displays. They must not be subjected to any voltage higher than their specification, or they will be damaged. For maximum brightness you need maximum current, but within the specification.

If you are making your own displays from individual leds, you can use many leds in series so that your 24V supply is appropriate.

Paul