4 digit PIC counter

A counter is a very useful tool, i for one could use one when I’m winding coils. These days a counter project caught my attention, because it can be configured for many applications. Basically it’s a 4 digit decimal counter that can go from 0 to 9999 in either direction, can stop when it hits the maximum counting value or can be left in free run.

The maximum counting number can be set by the operator to a desired value, which is stored in the EEPROM of the PIC16F88. This is very helpful, looking at my coil winding example i can set this way the number of windings. You can also set it to count up or down and has an overflow output which can be used to control an external device once the counter reached the preset number, in my case to turn off the winding motor.

The clock input is port B0 of the PIC and can be set to count either rising or falling clock fronts with or without zero suppression. Schematics show a debounce circuit to be used with mechanical contact switches at the clock’s input, which will accept 5V logic only.

The counting is displayed on four 7-segment LEDs and operation mode is shown on other four LEDs. D7 will indicate overflow, D8 Count Hold and D9 and10 will indicate it’s counting up or down. The whole display is multiplexed, more information about that you can find here. There are five push buttons you can use to configure the counter.

Schematics, source code and hex file for PIC as well as detailed explanation of operation can be found in the link.

4 Digit PIC Counter: [Link][Via]