CD4094B CMOS 8-Stage Shift and Store Bus Register

Used Products:

1. Arduino UNO
2. CD4094BE
3. M74HC4094B1

Content:

Products: CD4094BE or M74HC4094B1 Çeşme: http://forum.arduino.cc/index.php?topic=211583.0 http://senster.com/blog/wp-content/uploads/2009/02/expanding_outputs.pdf http://electronics.stackexchange.com/questions/113473/cd4094be-arduino-problems

Code:

// http://forum.arduino.cc/index.php?topic=211583.0 //Pin connected to Strobe (pin 1) of 4094 int strobePin = A3; //Pin connected to Data (pin 2) of 4094 int dataPin = A4; //Pin connected to Clock (pin 3) of 4094 int clockPin = A5; void setup() { Serial.begin(9600); //set pins to output because they are addressed in the main loop pinMode(strobePin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(dataPin, OUTPUT); } void loop() { //count up routine for (int count = 0; count < 100; count++) { //get the value for the tens display byte tens = count / 10; //get the value for the units display byte units = count % 10; //shift the tens value 4 bits to the left and attach the units value using a bitwise OR byte out = (tens << 4|units); Serial.print("v: "); Serial.print(out); Serial.println(); //set strobe pin low to begin storing bits digitalWrite(strobePin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, out); //set strobe pin high to stop storing bits digitalWrite(strobePin, HIGH); delay(200); } }