The 2 digit 7-segment display can seem a little complicated. The main idea for this system is to connect both 7-segment cells together in parallel, but in the same time, only one that be powered.
Here is the simple sequence to show the ones at the right cell and tens at the left cell.
1. Sends data ‘ones’ though the ‘PortLED’.
2. Energizes the right cell while left cell is off by resetting P1.0.
3. Wait for a short time delay. In this project, we paused for 8.192 ms that was setted by interrupt from timer 1.
4. Sends data ‘tens’ though the ‘PortLED’.
5. Energizes the left cell while right cell is off by setting P1.0.
6. Wait for 8.192 ms too.
Here is a sample program for displaying 00~99 to 7-Segment LED common anode.Each digit activated by multiplexing every 8128 ms.
The ones will increment in 1 second.