control the brightness of the 2 digits 7 segment disp

Discussion in 'Programmer's Corner' started by duckhong, Feb 23, 2012.

  1. duckhong

    Thread Starter New Member

    Feb 23, 2012
    Hi, I was given an assignment to display 8 bits counter on the 2-digits 7 segments display in verilog. While the counter is counting, i can use the slide switches to set the duty cycle of the pulse width modulation to control the brightness of the display. I got the counter part and i can control the brightness of a single LED using pwm. but when i applied it to the 2-digits display, then 1 digit is brighter than the other. the 2-digits display that i used are connected by a common cathode so that if i have 60% duty cycle, 1 digit will be brighter than the other.

    i was told to use pwm together with state machine to control the brightness but i couldn't see the relationship between pwm and state machine. without modifying the based frequency, what do i need to do so that no matter how change the duty cycle, the brightness will be the same for 2 digits?