Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use 74HC4017: Examples, Pinouts, and Specs

Image of 74HC4017Design with 74HC4017 in Cirkit Designer

Introduction

The 74HC4017 is a high-speed CMOS device that serves as a 5-stage Johnson decade counter with 10 decoded outputs. It is designed to produce a sequence of output pulses, one at a time, for every input pulse received. This component is widely used in digital logic circuits for creating LED chasers, frequency dividers, and various timing and counting applications.

Explore Projects Built with 74HC4017

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Teensy 4.0 and MAX7219-Based 7-Segment Display Counter: A project utilizing 74HC4017 in a practical application
Teensy 4.0 and MAX7219-Based 7-Segment Display Counter

This circuit uses a Teensy 4.0 microcontroller to control a MAX7219 LED driver, which in turn drives three 7-segment displays. The microcontroller runs code to display numbers from 0 to 999 on the 7-segment displays, with the SN74AHCT125N buffer providing signal integrity and the necessary capacitors and resistors ensuring stable operation.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Name Description
1 Q5 Output 5
2 Q1 Output 1
3 Q0 Output 0
4 Q2 Output 2
5 Q6 Output 6
6 Q7 Output 7
7 Q3 Output 3
8 GND Ground
9 Q8 Output 8
10 Q4 Output 4
11 Q9 Output 9
12 CO Carry Out (for cascading)
13 MR Master Reset (active high)
14 CLOCK INHIBIT Clock Inhibit (active high)
15 CLOCK Clock Input (rising edge triggered)
16 Vcc Positive Supply Voltage

Usage Instructions

How to Use the 74HC4017 in a Circuit

  1. Power Supply: Connect Vcc to a positive supply voltage (2V to 6V) and GND to the circuit ground.
  2. Clock Input: Apply a clock signal to the CLOCK pin. The counter advances on the rising edge of the clock.
  3. Reset: Connect the MR pin to a logic high to reset the counter to zero.
  4. Clock Inhibit: Apply a logic high to the CLOCK INHIBIT pin to stop the counter from advancing.
  5. Outputs: Connect the Q0 to Q9 outputs to the devices you wish to control sequentially.
  6. Cascading: Use the CO pin to cascade multiple 74HC4017 chips for more than 10 decoded outputs.

Important Considerations and Best Practices

Example Circuit: LED Chaser

// Define the output pins connected to the 74HC4017
int outputs[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11};

void setup() {
  // Set all the output pins as outputs
  for (int i = 0; i < 10; i++) {
    pinMode(outputs[i], OUTPUT);
  }
  // Set the clock pin as output
  pinMode(12, OUTPUT);
}

void loop() {
  // Send a clock pulse to the 74HC4017
  digitalWrite(12, HIGH);
  delay(10); // Short delay to ensure the clock pulse is registered
  digitalWrite(12, LOW);
  delay(500); // Delay between each pulse to control the speed of the LED chaser
}

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

FAQs

Q: Can I use the 74HC4017 at a voltage lower than 2V? A: No, the device is not guaranteed to function correctly below its minimum rated supply voltage.

Q: How can I increase the number of outputs beyond 10? A: You can cascade multiple 74HC4017 counters by connecting the CO pin of the first to the CLOCK pin of the next.

Q: Is it necessary to use all the outputs? A: No, you can leave unused outputs unconnected. However, it is good practice to ensure they are not floating.

Q: Can the 74HC4017 be used with an Arduino? A: Yes, the 74HC4017 can be easily interfaced with an Arduino or any other microcontroller platform.