Hi learner,
Let us assume we have 8x8 pixels connected as a matrix so that we have 8 terminals for rows and 8 terminals for columns.
Let us also assume that each row is a common cathode and each column is a common anode.
So, when a row terminal is connected to ground (by an NMOS transistor for example), every LED that has its PMOS transistor on (to Vcc), will light.
To produce a frame having diagonal on LEDs, it is necessary to drive the LEDs as the following steps:
Turn on row 1 and col 1
Turn on row 2 and col 2
....
Turn on row 8 and col 8
Then again
Turn on row 1 and col 1
... etc
The trick is, we need to make these steps quickly so that the eye will see a frozen frame. Therefore the period of each step should be made rather short.
For this 8x8 matrix, I am sure that a period of 2ms is adequate but you can always experiment the effect produced by longer periods than 2ms.
Kerim