M74HC259B1 8 Bit Addressable Latch

used products:

1. Arduino UNO
2. M74HC259B1

Arduino:

#define aPin 2 #define bPin 3 #define cPin 4 #define del 200 int matrix[][3] = { {0,0,0}, {1,0,0}, {0,1,0}, {1,1,0}, {0,0,1}, {1,0,1}, {0,1,1}, {1,1,1} }; void setup() { pinMode(aPin, OUTPUT); pinMode(bPin, OUTPUT); pinMode(cPin, OUTPUT); } void loop() { for (int i = 0; i < 8; i++) { digitalWrite(aPin, matrix[i][0]); digitalWrite(bPin, matrix[i][1]); digitalWrite(cPin, matrix[i][2]); delay(del); } }