MIC5800BN 4/8-Bit Parallel-Input Latched Drivers

Used Products:

1. Arduino UNO
2. MIC5800BN

Code:

#define strobePin 3 #define del 300 int currentStep = 0; int inputPins[] = {4,5,6,7}; int pinCount = 4; void setup() { pinMode(strobePin, OUTPUT); for (int i = 0; i < pinCount; i++) { pinMode(inputPins[i], OUTPUT); } } void loop() { for (int i = 0; i < pinCount; i++) { digitalWrite(inputPins[i], currentStep==i); } digitalWrite(strobePin, HIGH); delay(del); currentStep++; if (currentStep >= pinCount) { currentStep = 0; } }