M74HC173B1 Quad D-Type Register (3-STATE)

Used Products:

1. Arduino UNO
2. M74HC173B1

Code:

int pins[] = {2,4,6,8}; #define clockPin 10 int count = 0; void setup() { pinMode(clockPin, OUTPUT); for (int i = 0; i < 4; i++) { pinMode(pins[i], OUTPUT); } digitalWrite(clockPin, 0); } void loop() { for (count = 0; count <= 15; count++) { for (int i = 0; i < 4; i++) { digitalWrite(pins[i], bitRead(count, i)); } digitalWrite(clockPin, 0); digitalWrite(clockPin, 1); delay(200); } }