Multiplexed 8x8 LED array

The LED array is driven by 8 row outputs and 8 column outputs. This is a total of 16 outputs which can be used to individually turn any one of 64 LEDs on.

Only a maximum of 8 LEDs can be turned on at any given time, so to produce the illusion that all the LEDs are on at the same time, the entire display is refreshed very quickly and the human eye is fooled into seeing all the LEDs illuminated. This effect is know as persistance of vision and it is same effect that allows us to see pictures on televisions and computer monitors.

The entire LED display must be refreshed at least 25 times a second to prevent the observer from seeing a flicker effect. Since the hardware is restricted to displaying only a maximum of 8 LEDs at a time, each group of 8 LEDs must be displayed in turn. Although the refresh rate for a single group is 25 times a second, the total number of groups is 8 so the total number of times all groups must be refreshed is 8 * 25 (which is 200) times a second.

Refresh is done from a RAM buffer. The user program writes the image to be displayed on the LED array and the service function is responsible for repeatedly transfering the image from the RAM buffer to the LEDs.

The service function is called from the intserv function. This function is executed 200 times a second in response to the timer 0 interrupt. This is controlled by setting the heartbeat to 200.