Multiplexing

Multiplex the rows of the matrix

The final task is to multiplex the rows of electrical matrix into a full image. We will be doing this by scanning through the rows in the display.

Pseudocode

In order to light up an LED, the row needs to be set high and the column needs to be set low. We will assume that at the start of a refresh cycle, that all the rows are set low and all the columns are set high. The order of operations during a refresh cycle is then, for each row:

  1. set the row high
  2. for each column
    • set low if the LED associated with that row-column pair should be on
  3. sleep for a known duration, you should find 2ms is sufficient
  4. for each column
    • set high
  5. set the row low