CD4051BE CMOS Analog Multiplexers/Demultiplexers with Logic Level Conversion

Used Products:

1. Arduino UNO
2. CD4051BE
3. CD74HC4051E

Content:

CD4051BE or CD74HC4051E Çeşme: http://playground.arduino.cc/Learning/4051 https://www.youtube.com/watch?v=9R0e8Hufi9I

Code:

#define aPin 2 #define bPin 3 #define cPin 4 int r0 = 0, r1 = 0, r2 = 0, count = 0; void setup() { pinMode(aPin, OUTPUT); pinMode(bPin, OUTPUT); pinMode(cPin, OUTPUT); } void loop () { for (count = 0; count <= 7; count++) { r0 = bitRead(count, 0); r1 = bitRead(count, 1); r2 = bitRead(count, 2); digitalWrite(aPin, r0); digitalWrite(bPin, r1); digitalWrite(cPin, r2); delay(200); } }