SN74HC153N Dual 4-Line to 1-Line Data Selectors/Multiplexers

used products:

1. Arduino UNO
2. SN74HC153N
3. SN74LS153N

content:

Product: SN74LS153N or SN74HC153N

Arduino:

int selectPins[] = {2,3}; int dataPins[] = {5,6,7,8}; void setup() { Serial.begin(9600); for (int i = 0; i < 2; i++) { pinMode(selectPins[i], OUTPUT); } for (int i = 0; i < 4; i++) { pinMode(dataPins[i], OUTPUT); } } void loop() { for (int count = 0; count < 4; count++) { for (int n = 0; n < 2; n++) { for (int t = 0; t < 4; t++) { digitalWrite(dataPins[t], count==t?(n%2==0?0:1):0); } for (int i = 0; i < 2; i++) { int d = bitRead(count, i); digitalWrite(selectPins[i], d); Serial.print(d); Serial.print(","); } Serial.println(); delay(200); } } }