1
\$\begingroup\$

I am learning to control this dot matrix LED (OSL641501-ARA datasheet). I have seen some tutorials on how to control it with 2 shift registers. The problem is I am totally confused with the concept of displaying a character on it.

It seems to me that as long as I turn off a dot by

  1. setting both corresponding col pin and row pin to 0V,
  2. or, setting corresponding col pin and row pin to 3V

The unexpected result is, a whole line of dots are effected.

Please tell me what the trick is for it? How can I avoid "accidentally" turning on or off other dots?

\$\endgroup\$
3
\$\begingroup\$

The "trick" is called "Persistence of Vision".

The idea is that you are never controlling just one dot, but that you are controlling the whole array, but doing it either one row, or one column, at a time.

You nominate one direction to be the "common" direction - in this example we'll take that to be the ROW. We'll also assume that the ROW has to be set to 0V and the COLUMN has to be set to 3V to light an LED.

You then need to scan through each row, setting that row to 0V, and all the other rows to 3V, so that only LEDs on that row can turn on. You then turn on the LEDs for that row (by driving the COLUMN pins to 3V). Then you turn them off again, and move on to the next row. Repeat until you have done all the rows, then go back to the start.

If you do it fast enough it looks like you have all the rows running at once, but each row gets its own set of LEDs turned on.

You would normally maintain an array of LED states in your program (also called a "Frame Buffer"), and drawing a character is then a matter of setting the different LED states in that array. Your display routine then uses those LED states to determine which LEDs to turn on for any specific row.

\$\endgroup\$
  • \$\begingroup\$ Thank you!! The explanation "doing it either one row, or one column, at a time" really helps! I now manage to control it by always setting only one ROW to 0V with others to 3V, and by changing the ROW number and COLUMNS pin voltage, it was scanned through and drawing a character. However there is still one problem. It looks really choppy and if I do it too fast, some dots are skipped. \$\endgroup\$ – Znatz Jun 15 '14 at 7:36
  • \$\begingroup\$ It's all down to delays and order. You have to get it right. 1: set row, 2: set column, 3: delay, 4: clear column, 5: repeat. Step 4 is important to reduce ghosting. The delay in step 3 is what determines the brightness, and also the flickeriness. \$\endgroup\$ – Majenko Jun 15 '14 at 10:32
  • \$\begingroup\$ Thanks a lot! I finally rewired it and it looks great now. To avoid transferring the dot array of character, I had wired it so that one shift register controls all anodes and the other one controls all cathodes. But now each of them is wired to control only one side of the LED separately. The delay is reduced and looks way much better. \$\endgroup\$ – Znatz Jun 17 '14 at 13:01
1
\$\begingroup\$

Firstly you build your character interms of what dots you want to select. the trick is that you show your character by breaking its components into either rows or column. for the sake of simpllicity you break it into columns. For each column of your character you turn on that column and turn only rows that are supposed to be on for just that perticular column. Then you will see the first column of your character. Now you do the same thing for your next column in your character but the first column you showed will be gone right. but don't worry. You show each column of your character one by one. Now the trick to show the whole character is to increase thre rate from your controller to switch between each columns faster. Remember you eyes can't see frequencies more than 30 Hz. So if you sweep each of your columns by 8*30 Hz (you multiply by 8 as you have 8 columns, 30 hz is between) = 240 Hz then you should see the whole character on your matrix. higher frequency you go better the character will be shown. but you don't want to increase it too much other wise your light intensity may decrease. So , minimum time between start of first column and start of second column must be 1/240 s.

\$\endgroup\$
  • \$\begingroup\$ Thank you! I adjust the interval and finally settle down to about 0.038s. And it looks good! \$\endgroup\$ – Znatz Jun 17 '14 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.