7 Segment Counting
August 12, 2013
http://drumcoder.co.uk/blog/2013/aug/06/555-timer-astable/ shows how to set up a 555 timer so that it outputs pulses that have the same length. We can use a 4026 decade counter to count these pulses and show them on a 7 segment LED display.
4026 Decade Counter
The 4026 Decade Counter pinout is shown below. I used a 9v power supply to drive both the 555 timer and the 4026 chip.
This is a CMOS chip, and they dislike floating pins. Always connect all the pins to somewhere, even if it's just ground or the positive supply.
- Supply power to the 4026 on pins 8 and 16.
- The pulses from the 555 timer go into pin 1 of the 4026.
- Pin 2 (Disable Clock), Pin 4 (Enable Out), Pin 14 (Not-2 output) and Pin 15 (Reset) should be connected to ground.
- Pin 3 (Enable Display) should be connected to positive.
- Pin 5 (Carry Output) should be connected to ground (for now).
- Pins 6, 7 and 9 to 13 should be connected to the appropriate pin on the 7 segment LED display.
The pinouts vary for the display component, but the letters don't. I had to do a fair bit of trial and error to wire my LED digit correctly to my chip, as I didn't know which connector on the LED was for which bar.
I had a common cathode led display, which means that the negative ends of all the LEDs that make up the digit are all connected together. I connected these directly to ground. In my case, these were the fourth and fifth pins from the right at the top of a two digit display when looking at the digits normally.
This setup should count the pulses from the 555 timer, and increase the digit from 1 through 9 before changing to 0 and counting up again.
Chaining Counters
It's possible to chain a second 4026 chip to drive a second digit. Take the second chip's clock input from pin 5 of the first chip, and it will count up in 10's, making it perfect for the next digit. Configured this way, you'll be able to count pulses from 00 to 99. Of course, if you want to count to 999, just add another 4026 and another 7 segment LED...