7-Segment Display -- Two Digits

It's pretty easy to bump things to two digits through the magic of multiplexing. As usual, we'll let Timer0 generate interrupts within the PIC16F88 to determine when each segment within each digit should be lit.  The diodes are updated at 122 Hz which is fast enough to avoid flicker.

We'll dispense with the decimal point now. So, seven pins of Port B are needed for the pairwise-ganged anodes, along with two additional ones in Port A for the cathode selection. A pair of 2N2222 NPN transistors takes care of enabling the latter.

 As always, take time to study the source code. By this point, you should be quite comfortable with Timer0 interrupts, setting the port data direction, using variables, constants and arrays in memory, and more. See! PIC Micro Pascal really is so easy to use, and elegant as can be.

Click to get the source code.
Click to get the schematic PDF.

Next Project: 7-Segment Display -- Latched

No comments:

Post a Comment