Software PWM work around for seven segment displays (by Tom J.)
Hello all, just curious if anybody has tried sending a pwm signal into an input and making it enable / disable the common lines on a seven segment display to make the display dim.
I'll try it when I get a chance if nobody chimes in and says it doesn't work.
(no subject) (by MGP)
You cannot do it because of the duty cycle.
The intputs do not accept pwm signals that are faster than the duty cycle.
You better control the voltage (current) on the common anode or cathode.
Another thing, the displays are multitasking and it is difficult to intervene there without you seeing it.
(no subject) (by Tom J.)
That makes sense, we theoretically can do it as long as the duty cycle does not exceed the cycle time.
Perhaps even write a rung to determine if the duty cycle is getting fast enough to just bypass it and turn it on fully.
Due to the nature of seven segment displays the cycle time is typically very short so it may not be a problem, I'll proto it when I get a chance and make a video.
If it doesn't work I suppose one could run the common through a bunch of transistors like 3904s and PWM the transistors but a software solution would be more fun.
(no subject) (by Tom J.)
Wait a minute here, a PWM written in LDMicro should have a maximum frequency equal to the cycle time shouldn't it?
Thus there shouldn't be an option to exceed the frequency of the cycle time as long as the PWM source microcontroller is running at the same cycle time or slower... I think?