CD4052BE CMOS Analog Multiplexers/Demultiplexers with Logic Level Conversion

Used Products:

1. Arduino UNO
2. CD4052BE
3. CD74HC4052E

Content:

CD4052BE or CD74HC4052E

Code:

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