Enquiry Matrix display concept

Discussion in 'Embedded Systems and Microcontrollers' started by oookey, Apr 26, 2012.

  1. oookey

    Thread Starter Well-Known Member

    May 24, 2010

    Please refer to the attach pdf, showing my setup sketch for the purpose of matrix display.

    I got stuck at entire row of the LEDs lit up, and blinking ON and OFF all together. For example I failed to specifically ON the LED at RB1 and C4.
    I could keep the row RB1 ON, but how do I control the shift register to ON C4 at the correct time? The shift register will always start from the 1st bit then shift to next bit on the next clock.

    I need your pointers and advice.

    Thanks for your time.
  2. John P

    AAC Fanatic!

    Oct 14, 2008
    You need to set up a timer to generate repeated intervals. When the timer triggers, you increment a counter that goes from 0 to 4, and then repeats. At state 0 of the counter, you send out 1 to the shift register, and that sets output C1 high. At each of the other 4 states, you send 0, and that simply moves the single high bit from C1 to C2, then C2 to C3, then C3 to C4, and finally it falls off the end and a new bit gets set at C1.

    For each of these states, you need to store a byte of data corresponding to that column, and place this data on the PortB outputs when that column is enabled. Actually to keep the display clear of unwanted "ghost" operations, whenever there's a shift to a new column you should set PortB all low, make the change, and then load the new data to PortB.
    oookey likes this.
  3. oookey

    Thread Starter Well-Known Member

    May 24, 2010
    Thanks John, Please refer to the PDF, i figure out into flow chart, please advice if it's on the correct track to display matrix.

    thanks for your time.