Go Down

Topic: 74HC595 Equivalent for shiftout (Read 9163 times) previous topic - next topic

ejasoft

hello, i want to do this shifting out to add more pins
http://www.arduino.cc/en/Tutorial/ShiftOut

i have search all over electric parts stores and i cant find this ic 74HC595

what is the trade name for this ship, is hc595?

and if there are any replacement or any project can add more output pin please help me


thank you

Grag38

try www.Farnell.com

with 74HC595 there is some ic !

ejasoft

thank you sir but there are no egypt branch for them,
if there are some ic replace to this ic please tell me
anyway thank you

CrossRoads

There are plenty of shift registers, or other parts can be wired to act like shift registers.
For example, an octal latch like '374 can be wired up to act like a single stage shift register.

What are your choices for incountry suppliers?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

ejasoft

hello, thank you for reply
i have found alot of this http://focus.ti.com/lit/ds/symlink/sn74ls245.pdf
some say it's can use i dnot know how to use it,
if it's can use like the hc595 how to connect it to arduino?

i our country it's too hard to find this parts, i can find some transitors or caps but ic's i can find some amplifirer ic's power, not digital and microconttroler related ic's , atmega328 is not found i have order it form ebay

anyway i will keep search for it, thank you so much

ejasoft

i found this part http://pdf1.alldatasheet.com/datasheet-pdf/view/11973/ONSEMI/MC14094.html
it's  8-Stage Shift/Store Register with Three-State Outputs

can i use it ?

CrossRoads

LS245 is just a buffer , no latching capability.
The MC14094 description sounds good. (I can't get  the datasheet to open, network issue on my end.)
Or if you could get 74AC299PC from newark.com, that's a nice part. 24 mA source & sink capability.
Shift-in , shift-out, shift left or right also. Lots of functionality.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

ejasoft

thanks CrossRoads,
i have upload photo about pin assignment from pdf file for MC14094

can you tell me how to connect it to arduino like
http://arduino.cc/en/uploads/Tutorial/ShftOutExmp1_2.gif
http://www.arduino.cc/en/Tutorial/ShiftOut

thank you

CrossRoads

This one is easy.
You will define 3 output pins:
data_pin, connect to pin2
serial_clock, connect to pin3
storage_clock, connect to pin1
connect pin15  high to enable the output drivers.
You will define a variable 'data_byte' which will hold your data to be shifted out

To load up data, you  will do this:
data_byte = next_data_to_be_shifted_out;   // up to you to set that up

shiftout (data_pin, serial_clock, MSBFirst, data_byte); // the 8 bits are loaded into input stage of shift register
digitalWrite (storage_clock, HIGH); // setup to latch the output data
digitalWrite (storage_clock, LOW); // clock going Low latches data into the output stage

check the reference page to make sure the correct letters are capitalized.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

ejasoft

thank you crossroads it's work very nice,
but is there any way to connect another one to same pin from arduino like
http://arduino.cc/en/uploads/Tutorial/ShftOutExmp2_1.gif

i have two ic of MC14094 , thank you so much
regards

CrossRoads

#10
May 06, 2011, 05:50 pm Last Edit: May 07, 2011, 01:56 am by CrossRoads Reason: 1
Yes, you connect them in series.
Connect serial_clock, storage_clock, and output lines together.  << Sorry, output_enable   
\
Connect Q's, or Qs, from device 1 to SER pin in device 2.
(typically one inverts the data, the other does not - experiment a little).
Then do 2 shiftouts:

shiftout (data_pin, serial_clock, MSBFirst, data_byte2); // goes into 2nd in line part
shiftout (data_pin, serial_clock, MSBFirst, data_byte1); // goes to 1st on line part
digitalWrite (storage_clock, HIGH); // setup to latch the output data
digitalWrite (storage_clock, LOW); // clock going Low latches data into the output stage

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

ejasoft

thank you mr crossroads,
i will try it soon, but i want to ask about blink some led on some pin of the shiftregister
eg pin 2 i use this code and led not blink it's on all the time

Code: [Select]
//Pin connected to ST_CP of 74HC595
int latchPin = 8;
//Pin connected to SH_CP of 74HC595
int clockPin = 12;
////Pin connected to DS of 74HC595
int dataPin = 11;



void setup() {
  //set pins to output so you can control the shift register
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}

void loop() {


    byte outVal = 0; // Define output data
    bitSet(outVal, 2); // Set bit 2
    digitalWrite(latchPin, LOW);

    shiftOut(dataPin, clockPin, MSBFIRST, outVal);

    digitalWrite(latchPin, HIGH);
   
    // pause 
    delay(1000);
// }
}


what is the problems in my code or if there are simple way to high a pin without this

Code: [Select]

    byte outVal = 0; // Define output data
    bitSet(outVal, 2); // Set bit 2
    digitalWrite(latchPin, LOW);

    shiftOut(dataPin, clockPin, MSBFIRST, outVal);

    digitalWrite(latchPin, HIGH);




i will use the shiftregsiters to control a 16 rely

----------------------

on the scend one of the shift register
when i want to high one pin like 1 or two
the code will
Code: [Select]


    byte outVal = 0; // Define output data
for the pin two one the scend register it's will 8+ 2 ?

    bitSet(outVal, 10); // Set bit 2

    digitalWrite(latchPin, LOW);

    shiftOut(dataPin, clockPin, MSBFIRST, outVal);

    digitalWrite(latchPin, HIGH);

thank you so much

CrossRoads

Try the Strobe line in the order I suggested:

shiftout (data_pin, serial_clock, MSBFirst, data_byte); // the 8 bits are loaded into input stage of shift register
digitalWrite (storage_clock, HIGH); // setup to latch the output data
digitalWrite (storage_clock, LOW); // clock going Low latches data into the output stage


Strobe LOW is what latches the data.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

ejasoft

thank you mr crossroads,
i have do alot of serach and found this http://www.pauloricca.com/index.php?a=blog&project=ExtraOutputs
it's very easy, but i will try yours and try to understand it,
thank you
regards

CrossRoads

Okay, just keep in mind that Your part, MC14094, requires a  Low signal to hold the output data, while the 74HC595 uses a clock signal going from Low to High to latch the data.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up