Stufin
Home Quick Cart Profile

Decade Counter/Divider IC - CD4026

Buy Now on Stufin

Pin Configuration

  • CD4026 Decade Counter/Divider IC Documentation
  • Overview
  • The CD4026 is a decade counter/divider IC that can be used to count from 0 to 9 or divide an input frequency by 10. It is a 16-pin dual in-line package (DIP) IC that operates on a single power supply voltage.
  • Pin Description
  • Here is a detailed explanation of each pin on the CD4026 IC:
  • Pin 1: VCC (Positive Power Supply)
  • Function: Positive power supply pin
  • Description: Connect to a positive power supply voltage (typically 5V) to power the IC
  • Recommended voltage range: 3V to 15V
  • Pin 2: CKB_IN (Clock Input)
  • Function: Clock input pin
  • Description: Receives the clock signal to be counted or divided
  • Input signal: A square wave signal with a minimum high-level input voltage of 0.7VCC and a maximum low-level input voltage of 0.3VCC
  • Pin 3: RCO (Ripple Carry Out)
  • Function: Ripple carry output pin
  • Description: Outputs a pulse on the 10th count, which can be used to clock another CD4026 IC in a cascaded configuration
  • Pin 4: Q0 (Output 0)
  • Function: Output pin for the least significant digit (LSD)
  • Description: Outputs the binary value of the count (0 or 1)
  • Pin 5: Q1 (Output 1)
  • Function: Output pin for the next most significant digit
  • Description: Outputs the binary value of the count (0 or 1)
  • Pin 6: Q2 (Output 2)
  • Function: Output pin for the next most significant digit
  • Description: Outputs the binary value of the count (0 or 1)
  • Pin 7: Q3 (Output 3)
  • Function: Output pin for the most significant digit (MSD)
  • Description: Outputs the binary value of the count (0 or 1)
  • Pin 8: GND (Ground)
  • Function: Ground pin
  • Description: Connect to the ground reference point to complete the circuit
  • Pin 9: DI (Disable Input)
  • Function: Disable input pin
  • Description: When high, the counter is disabled and the outputs are reset to 0
  • Input signal: A logic high (VCC) disables the counter, while a logic low (GND) enables the counter
  • Pin 10: CLR (Clear Input)
  • Function: Clear input pin
  • Description: When high, the counter is reset to 0
  • Input signal: A logic high (VCC) clears the counter, while a logic low (GND) has no effect
  • Pin 11: ENP (Enable Preset)
  • Function: Enable preset input pin
  • Description: When high, the preset input pins (P0 to P3) are enabled
  • Input signal: A logic high (VCC) enables the preset input, while a logic low (GND) has no effect
  • Pin 12: P0 (Preset 0)
  • Function: Preset input pin for the LSD
  • Description: Sets the count to the corresponding binary value when ENP is high
  • Pin 13: P1 (Preset 1)
  • Function: Preset input pin for the next most significant digit
  • Description: Sets the count to the corresponding binary value when ENP is high
  • Pin 14: P2 (Preset 2)
  • Function: Preset input pin for the next most significant digit
  • Description: Sets the count to the corresponding binary value when ENP is high
  • Pin 15: P3 (Preset 3)
  • Function: Preset input pin for the MSD
  • Description: Sets the count to the corresponding binary value when ENP is high
  • Pin 16: VSS (Negative Power Supply)
  • Function: Negative power supply pin
  • Description: Connect to the negative power supply voltage (typically GND)
  • Recommended voltage range: 0V to -15V
  • Connection Structure
  • Here is a general connection structure for the CD4026 IC:
  • Connect VCC (Pin 1) to a positive power supply voltage (e.g., 5V)
  • Connect GND (Pin 8) and VSS (Pin 16) to the ground reference point
  • Connect CKB_IN (Pin 2) to a clock signal source
  • Connect Q0 to Q3 (Pins 4 to 7) to the desired output devices (e.g., LEDs, displays, or logic gates)
  • Connect DI (Pin 9) and CLR (Pin 10) to logic gates or switches to control the counter's operation
  • Connect ENP (Pin 11) to a logic gate or switch to enable preset inputs
  • Connect P0 to P3 (Pins 12 to 15) to logic gates or switches to preset the counter
  • Use RCO (Pin 3) to connect to another CD4026 IC in a cascaded configuration, if desired

Code Examples

CD4026 Decade Counter/Divider IC Documentation
Overview
The CD4026 is a decade counter/divider integrated circuit (IC) that is used to count or divide clock signals. It is a 14-pin DIP package IC that can be used in a wide range of applications, including digital clocks, counters, and frequency dividers.
Pinout
The CD4026 IC has the following pinout:
| Pin No. | Pin Name | Description |
| --- | --- | --- |
| 1 | VCC | Positive supply voltage (5V) |
| 2 | GND | Ground |
| 3 | CLK_IN | Clock input |
| 4 | RST | Reset input |
| 5 | Q0 | Output (0) |
| 6 | Q1 | Output (1) |
| 7 | Q2 | Output (2) |
| 8 | Q3 | Output (3) |
| 9 | Q4 | Output (4) |
| 10 | Q5 | Output (5) |
| 11 | Q6 | Output (6) |
| 12 | Q7 | Output (7) |
| 13 | Q8 | Output (8) |
| 14 | Q9 | Output (9) |
Functional Description
The CD4026 IC is a synchronous decade counter, meaning that it counts clock pulses synchronously with the clock signal. The counter can be reset to zero by applying a low-going pulse to the RST pin. The IC also has a divide-by-10 function, where the output of the counter is divided by 10.
Code Examples
### Example 1: Simple Counter using CD4026
In this example, we will use the CD4026 IC to create a simple counter that counts from 0 to 9. We will use an Arduino board as the microcontroller.
Components
CD4026 IC
 Arduino Board
 Breadboard
 Jumper wires
 Power supply (5V)
Code
```c
const int CLK_PIN = 2;  // Clock input pin
const int RST_PIN = 3;  // Reset input pin
const int OUTPUT_PINS[] = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13};  // Output pins
void setup() {
  pinMode(CLK_PIN, INPUT);
  pinMode(RST_PIN, OUTPUT);
  for (int i = 0; i < 10; i++) {
    pinMode(OUTPUT_PINS[i], OUTPUT);
  }
}
void loop() {
  // Generate clock pulses
  digitalWrite(CLK_PIN, HIGH);
  delay(10);
  digitalWrite(CLK_PIN, LOW);
  delay(10);
  
  // Check if count has reached 9
  if (digitalRead(OUTPUT_PINS[9]) == HIGH) {
    // Reset the counter
    digitalWrite(RST_PIN, LOW);
    delay(10);
    digitalWrite(RST_PIN, HIGH);
  }
}
```
### Example 2: Divide-by-10 Frequency Divider using CD4026
In this example, we will use the CD4026 IC to create a divide-by-10 frequency divider. We will use a 555 timer IC to generate a clock signal, and then divide it by 10 using the CD4026 IC.
Components
CD4026 IC
 555 Timer IC
 Breadboard
 Jumper wires
 Power supply (5V)
Code
```c
const int CLK_PIN = 2;  // Clock input pin
const int OUTPUT_PIN = 3;  // Output pin
void setup() {
  pinMode(CLK_PIN, INPUT);
  pinMode(OUTPUT_PIN, OUTPUT);
}
void loop() {
  // Generate clock pulses using 555 timer IC
  // (assuming 555 timer IC is connected to CLK_PIN)
  
  // Divide the clock signal by 10 using CD4026 IC
  digitalWrite(OUTPUT_PIN, digitalRead(CLK_PIN));
  delay(10);
}
```
### Example 3: Binary Coded Decimal (BCD) Counter using CD4026
In this example, we will use the CD4026 IC to create a BCD counter that counts in binary-coded decimal format. We will use an Arduino board as the microcontroller.
Components
CD4026 IC
 Arduino Board
 Breadboard
 Jumper wires
 Power supply (5V)
Code
```c
const int CLK_PIN = 2;  // Clock input pin
const int RST_PIN = 3;  // Reset input pin
const int BCD_PINS[] = {4, 5, 6, 7};  // BCD output pins
void setup() {
  pinMode(CLK_PIN, INPUT);
  pinMode(RST_PIN, OUTPUT);
  for (int i = 0; i < 4; i++) {
    pinMode(BCD_PINS[i], OUTPUT);
  }
}
void loop() {
  // Generate clock pulses
  digitalWrite(CLK_PIN, HIGH);
  delay(10);
  digitalWrite(CLK_PIN, LOW);
  delay(10);
  
  // Check if count has reached 9
  if (digitalRead(BCD_PINS[3]) == HIGH) {
    // Reset the counter
    digitalWrite(RST_PIN, LOW);
    delay(10);
    digitalWrite(RST_PIN, HIGH);
  }
  
  // Convert BCD output to decimal
  int decimal = 0;
  for (int i = 0; i < 4; i++) {
    decimal = (decimal << 1) | digitalRead(BCD_PINS[i]);
  }
  Serial.print("Count: ");
  Serial.println(decimal, DEC);
}
```
Note: The above code examples are for illustration purposes only and may require modifications to work with specific hardware and software configurations.