Reading multiple buttons/switches
Input expansion for microcontrollers
Industrial control systems
Keyboard/button matrix scanning
Family: 74HC (High-Speed CMOS)
Package: SOP-16 (150-mil body width)
Supply Voltage: 2V to 6V (HC family)
Input Voltage: 0V to VCC
Output Current: ±7mA (max, per pin)
Propagation Delay: 13ns (typical, CL=15pF)
Clock Frequency: Up to 50MHz (typical)
Power Consumption: 80µA (quiescent, typical)
Inputs: 8 parallel data inputs (A-H)
Outputs: Serial output (QH), complemented serial output (QH’)
Control Pins:
SH/LD (Shift/Load): Loads parallel data when LOW
CLK (Clock): Shifts data on rising edge
CLK INH (Clock Inhibit): HIGH disables clock
| Pin | Name | Function |
|---|---|---|
| 1 | SH/LD | Shift/Load control (active LOW) |
| 2 | CLK | Clock input (rising edge) |
| 3 | D | Parallel input D (bit 3) |
| 4 | E | Parallel input E (bit 4) |
| 5 | F | Parallel input F (bit 5) |
| 6 | G | Parallel input G (bit 6) |
| 7 | H | Parallel input H (bit 7) |
| 8 | QH’ | Complemented serial output |
| 9 | QH | Serial output (MSB first) |
| 10 | SER | Serial data input (optional) |
| 11 | A | Parallel input A (bit 0) |
| 12 | B | Parallel input B (bit 1) |
| 13 | C | Parallel input C (bit 2) |
| 14 | CLK INH | Clock inhibit (active HIGH) |
| 15 | VCC | Supply voltage (2V–6V) |
| 16 | GND | Ground |
Parallel-to-Serial Conversion: Reads 8 inputs, outputs serially
Cascade Capability: Connect multiple chips for 16+ bit inputs
Schmitt Trigger Inputs: Improved noise immunity
Wide Operating Range: Compatible with 3.3V/5V systems
| SH/LD | CLK | CLK INH | Mode |
|---|---|---|---|
| LOW | X | X | Parallel Load |
| HIGH | ↑ | LOW | Shift |
| HIGH | X | HIGH | Hold |
#define DATA_PIN 11 // QH (pin 9) → Arduino D11
#define CLOCK_PIN 12 // CLK (pin 2) → Arduino D12
#define LATCH_PIN 10 // SH/LD (pin 1) → Arduino D10
void setup() {
Serial.begin(9600);
pinMode(DATA_PIN, INPUT);
pinMode(CLOCK_PIN, OUTPUT);
pinMode(LATCH_PIN, OUTPUT);
}
byte readShiftRegister() {
// Load parallel data
digitalWrite(LATCH_PIN, LOW);
delayMicroseconds(5);
digitalWrite(LATCH_PIN, HIGH);
// Shift in 8 bits
byte data = 0;
for(int i=0; i<8; i++) {
digitalWrite(CLOCK_PIN, HIGH);
delayMicroseconds(1);
data |= digitalRead(DATA_PIN) << (7-i);
digitalWrite(CLOCK_PIN, LOW);
}
return data;
}
void loop() {
byte inputs = readShiftRegister();
Serial.print(“Inputs: 0b”);
Serial.println(inputs, BIN);
delay(100);
}
Connect:
QH (pin 9) of first chip → SER (pin 10) of second chip
CLK, SH/LD, CLK INH pins shared
Cascade output: Read 16+ bits sequentially
Body Width: 150 mil (3.81mm)
Lead Pitch: 1.27mm
| Weight | 0.005 kg |
|---|
You must be logged in to post a review.
Reviews
There are no reviews yet.