In this Dot matrix Counter Using PIC project, we have used two latch ICs to control the 16×8 dot-matrix. We have used an array in the SRAM for storing temporary 2 digits for displaying variable numbers on the dot-matrix. On each iteration, first, the microcontroller loads the numbers from flash memory to that array in the SRAM. Then it displays the digits on the dot-matrix.
Download the project files here.
Also take a look at this practical AVR 16×16 dot-matrix project.