CD4026 Decade Counter/Divider IC Documentation
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.
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) |
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.
### 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.
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.
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.
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.