Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help in interfacing a 74HC595 s-in/p-out shift register

Status
Not open for further replies.

seemanta

Member level 4
Member level 4
Joined
Jun 10, 2006
Messages
71
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Activity points
1,968
Hi,
Has anyone interfaced a 74HC595 with AT89S52 or similar microcontroller? If yes, any pointers would be helpful.

regards,
Seemanta
 

Re: Need help in interfacing a 74HC595 s-in/p-out shift regi

Hi,
What exactly you want to do with it, it is a simple serial in parallel out device and can be easily interfaced with a micro. Connect serial data, shift clock and store pulse pins to three I/O pins, connect output enable to ground, you get a serial to parallel converter .

Regards,
Laktronics
 

Re: Need help in interfacing a 74HC595 s-in/p-out shift regi

Hello

I'm using PIC and C18 language from Microchip ( C )

Here what i wrote, but it won't work , would you please tell me why ?

Many thanks for your help,



Code:
		     // Will send 0b11111100 to parallel outputs          		

				SER = 0;	    // 1st bit
				SRCK = 1;    // clock SRCK
				SRCK = 0;    

				SER = 0;	    // Bit n°2
				SRCK = 1;    // clock SRCK
				SRCK = 0;
				
				SER = 1;	    // Bit n°3
				SRCK = 1;    // clock SRCK
				SRCK = 0;

				SER = 1;	     // Bit n°4
				SRCK = 1;    // clock SRCK
				SRCK = 0;

				SER = 1;	     // Bit n°5
				SRCK = 1;    // clock SRCK
				SRCK = 0;

				SER = 1;	     // Bit n°6
				SRCK = 1;    // clock SRCK
				SRCK = 0;

				SER = 1;	     // Bit n°7
				SRCK = 1;    // clock SRCK
				SRCK = 0;
 			 
				SER = 1;	     // Bit n°8
				SRCK = 1;    // clock SRCK
				SRCK = 0;

				// All serial bits sent, get them on parallel outputs

 			    SER = 0;
   			  RCK = 1;   // clock RCK
        		RCK = 0;
 
  • Like
Reactions: mgp

    mgp

    Points: 2
    Helpful Answer Positive Rating
Re: Need help in interfacing a 74HC595 s-in/p-out shift regi

Hi,
Define initial states of RCK and SRCK to zero, set MR- to logic Hi and OE- to logic Lo. I hope the clock width is within specifications. Hope you have also inited the PIC pins used for output and there are pull ups on those pins. It should work then.

Regards,
Laktronics
 

Re: Need help in interfacing a 74HC595 s-in/p-out shift regi

Thanks it works fine now :D
i can now command more outputs.


Now, if i need to expand Inputs, what kind of code should i use ?
Process is different as outputs, isn't it ?

I need to get my Pic with more inputs, maybe a another circuit should suit better my needs ?
 

Re: Need help in interfacing a 74HC595 s-in/p-out shift regi

Same idea. but use a 74HC165.
I use them with dip switches, with pull ups, and take the inverted output(pin7).
I was even able to share the clock with both 74hc165 and 74hc595.

all the slow inputs/outputs you could want. just daisy-chain them together.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top