.

4017

decade counter
(5-stage Johnson counter)

Technology: CMOS Power supply: 3-15 V

16-pin DIL


.
Navigation

Pin connections RESET and ENABLE inputs
What is a decade counter? Sequencing
Basic operation LINKS . . .

contents Back to Design Electronics   beastie zone Back to Beastie Zone


.
Pin connections

4017 pin connections

The 4017 decade counter has ten outputs
which go HIGH in sequence.

Up


.
What is a decade counter?

The 4017 has 10 separate outputs which go HIGH in sequence, as shown below:

4017 counting sequence

Just one of the individual outputs is HIGH at a time. This is quite different from the behaviour of a BCD counter like the 4510 in which is is the combination of 0's and 1's which represents the count.

As you can see, the ÷10 output is HIGH for counts 0-4 and LOW for counts 5-9.

The 4017 is an extremely useful device for project work and is used in the Games Timer and in various DOCTRONICS construction kits including the Light Chaser and the Matrix Die. When you are familiar with the 4017, you will be able to think of lots of useful applications.

Internally, the 4017 contains five bistable subunits. These are interconnected in a pattern known as a Johnson counter. The outputs of the bistables are decoded to give the ten individvual outputs.

Up


.
Basic operation

Here is the complete circuit diagram for a 4017 test circuit:

4017 test circuit

You should assemble the prototype board in stages, checking that each stage is working properly before proceeding the to the next stage. To see the 4017 in action, you need to build an astable. The easiest way to do this is using a 4093 Schmitt trigger NAND gate integrated circuit. Start by building the astable section on your prototype board:

click for pins! 4093
building an astable: click for next stage

Next add the 4017. The pulse output from the astable is connected to the CLOCK input. For normal operation, the RESET and ENABLE inputs must be connected to 0 V.

Don't forget - - Connect pin 16 of the 4017 to +9 V and pin 8 to 0 V.

Connect a single LED with a 680 W series resistor to output 0 of the 4017:

click for pins! 4017
4017 essential connections: click for next stage

click to return Up to previous stage

Continue, adding new resistor/LED stages for outputs 1 and 2. Don't disconnect the power supply. It helps to see that the new connections make the LEDs illuminate in the correct sequence:

click for pins! 4017
adding more LEDs: click for next stage

click to return Up to previous stage

Connect a second prototype board and keep on adding new LEDs until all 10 outputs are used:

click for pins! 4017
10 output LEDs: click for next stage

click to return Up to previous stage

This version of the 4017 gives you a free-running light chaser. This can be useful but you will usually want to control the 4017, as outlined in the next section.

Up


.
RESET and ENABLE inputs

Modify your circuit so that the RESET and ENABLE inputs are each connected to 0 V through a 10 kW pull down resistor. Initially, the behaviour of the circuit will be unchanged. Add 'flying leads' as indicated below:

click for pins! 4017
adding RESET and ENABLE inputs

click to return Up to previous stage

What happens when you connect the RESET input temporarily to +9 V? This returns the counter to 0 and the LED for output 0 is illuminated. Although pulses are still arriving at the CLOCK input, counting has stopped.

Try connecting the RESET input instead to output 5, pin 1, of the 4017. Counting will start again but not all of the outputs are active. The LEDs for outputs 0, 1, 2, 3 and 4 light up as before. You won't see anything happen at output 5 because the instant that this output goes HIGH, the counter is reset and counting starts again from 0.

In this way, you can shorten the count for any particular application.

Disconnect the RESET flying lead so that the 4017 is free-running once more. What happens when you connect the free end of the ENABLE lead to +9 V? Counting stops but this time the last LED illuminated stays lit. The count stops wherever it happens to be when ENABLE goes HIGH.

Try connecting ENABLE to output 7, pin 6, of the 4017. Counting may start briefly but stops as soon as the count reaches 7. Now try touching the RESET lead briefly to +9 V. The 4017 resets to 0 and then counts up, stopping again when it reaches 7. This is the effect required for a count down timer such as an egg timer, or the Games Timer, described in detail in Design Electronics.

Up


.
Sequencing

You can use the 4017 to control a sequence of events, for example, to generate a traffic light sequence:

sequence
step

red

amber

green

0

0

0

1

1

0

0

1

2

0

0

1

3

0

0

1

4

0

1

0

5

1

0

0

6

1

0

0

7

1

0

0

8 1 0 0
9 1 1 0

This pattern shows the lights green or red for a suitably long time, with amber and red+amber illuminated for shorter periods.

Here is the circuit:

4017 traffic light sequencer

The 1N4148 diodes are used to make OR gates which control the LEDs. Outputs 0-3 illuminate the green LED, outputs 4 and 9 illuminate the amber LED and outputs 5-9 illuminate the red LED.

Can you think of other applications for this kind of sequencing?

Up


.
Links

click to open 4017 datasheet from Philips

Cross references in the Beastie Zone: 4510 BCD counter.

Cross references in Design Electronics: Games Timer

External links:


contents Back to Design Electronics   beastie zone Back to Beastie Zone