2 Digit Counter (PIC12F629)

14,790

Circuit Image

This article describes a 2-Digit Counter using a Microchip PIC12F629. It shows what can be done with an 8-pin chip having just 5 output lines and one input line. The chip drives two 7-segment displays and this would normally require 7 lines to drive the segments plus another one or two lines to select the displays. We have shown how a single line can be used to drive two different segments by using the tri-state of an output. More: Each output of the chip has three states: HIGH, LOW and FLOATING (high impedance). The high impedance state occurs when the line is in the input state and any line can be changed from output to input at any time during the running of the program.

The 2-digit counter circuit utilizing the Microchip PIC12F629 is an efficient design that leverages the capabilities of an 8-pin microcontroller. The PIC12F629 features five configurable I/O pins that can be utilized for output, while one pin serves as an input. This configuration allows for the control of two 7-segment displays, which typically would require more pins for segment control and display selection.

In this design, the microcontroller outputs are configured to operate in a tri-state mode. This means that each output can be set to HIGH, LOW, or FLOATING (high impedance). The FLOATING state is particularly useful as it allows for the connection of multiple outputs to a single line without interference, enabling one output to drive two segments of the 7-segment displays. By alternating the state of the output pins, the microcontroller effectively multiplexes the display, reducing the total number of required lines from what would normally be seven for the segments and additional lines for display selection.

The counter functionality is implemented within the firmware of the PIC12F629. The program controls the counting logic, incrementing the displayed number on the 7-segment displays with each clock pulse or external trigger received on the input pin. The design takes advantage of the microcontroller's ability to switch pin configurations dynamically, allowing for seamless transitions between input and output modes as needed during operation.

Overall, this circuit demonstrates the versatility of the PIC12F629 in driving multiple outputs while minimizing the number of required connections, making it suitable for compact designs where pin count is a critical factor.This article describes a 2-Digit Counter using a Microchip PIC12F629. It shows what can be done with an 8-pin chip having just 5 output lines and one input line. The chip drives two7-segment displays and this would normally require 7 lines to drive the segments plus another one or two lines to select the displays. We have shown how a single line can be used to drive two different segments by using the tri-state of an output.

Each output of the chip has three states: HIGH, LOW and FLOATING (high impedance). The high impedance state occurs when the line is in the input state and any line can be changed from output to input at any time during the running of the program. The cir 🔗 External reference