Maker Pro
Maker Pro

One Way Communication from Chip-to-Chip

Pradip Nepali

Jun 18, 2015
14
Joined
Jun 18, 2015
Messages
14
How to transmit data from one IC to other, i.e I want to controller relay from
One Way Communication from Chip-to-Chip
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
What data?
Control relay from one ic to another is 0/1 logic, no other 'data'.??
M.
 

Pradip Nepali

Jun 18, 2015
14
Joined
Jun 18, 2015
Messages
14
yes relay i want to control , in singal ic i can but from one ic to other i can't so plz how to start
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Set your output high when you want the relay energized and low when you don't. The other chip can monitor the logic level and control the relay.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
You'll need to be far more specific. A simple logic level can transfer the information required for the example you gave.

What is the scenario? The answer could be as simple as I suggested or maybe to need something way more complex (for example if the two ICs are on different sides of the planet).
 

Pradip Nepali

Jun 18, 2015
14
Joined
Jun 18, 2015
Messages
14
You'll need to be far more specific. A simple logic level can transfer the information required for the example you gave.

What is the scenario? The answer could be as simple as I suggested or maybe to need something way more complex (for example if the two ICs are on different sides of the planet).
I have to ic at89c51, in first ic I put 2 button switch and in second IC i put 2 reply so I want to control that Relay from first IC
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
The simplest way is to connect a port pin as output of the 1st IC to a port pin as input of the 2nd IC.
Toggle the state of the output by the 1st IC and read the state of the input of the 2nd IC. Perform the actions as required by the state of the signal.
That's essentially what Steve said in post #4 in a tiny bit more detail.

If you want to communicate more than this single on/off message, look into serial protocols like SPI, UART etc. (use your favourite search engine).
 

Pradip Nepali

Jun 18, 2015
14
Joined
Jun 18, 2015
Messages
14
The simplest way is to connect a port pin as output of the 1st IC to a port pin as input of the 2nd IC.
Toggle the state of the output by the 1st IC and read the state of the input of the 2nd IC. Perform the actions as required by the state of the signal.
That's essentially what Steve said in post #4 in a tiny bit more detail.

If you want to communicate more than this single on/off message, look into serial protocols like SPI, UART etc. (use your favourite search engine).
can you show me sample programming
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
Sorry, I don't have sample code at hand.
One will also need to know:
  • Which chip?
  • Which language/compiler/assembler?
  • How does the hardware look like (schematic)?
Every microcontroller manufacturer offers sample code for serial communication usiong their controllers.
 

Pradip Nepali

Jun 18, 2015
14
Joined
Jun 18, 2015
Messages
14
Sorry, I don't have sample code at hand.
One will also need to know:
  • Which chip?
  • Which language/compiler/assembler?
  • How does the hardware look like (schematic)?
Every microcontroller manufacturer offers sample code for serial communication usiong their controllers.
At89c51 I'm using
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I am getting the idea that these two chips are separated and not connected and you are looking for something like a wireless connection. Is that true?

Bob
 

Pradip Nepali

Jun 18, 2015
14
Joined
Jun 18, 2015
Messages
14
I am getting the idea that these two chips are separated and not connected and you are looking for something like a wireless connection. Is that true?

Bob
That is also good but now I only want to transmit thru one wire
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Okay, you have been given the answer twice then.

Bob
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I agree with the other two. Connect an output port of the sender to an input port of the receiver.

In the sender, put out a high when you want the relay on and a low when you want the relay off.

In the receiver, check the input port periodically. If it is high, turn the relay on, if low turn it off.

Bot
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
If driving a relay you will probably need conditioning of some kind, 2n7000 for e.g. etc.
If you have two identical devices, output on one - input the other plus common.
Insufficient info for detailed response.
M.
 

Pradip Nepali

Jun 18, 2015
14
Joined
Jun 18, 2015
Messages
14
If driving a relay you will probably need conditioning of some kind, 2n7000 for e.g. etc.
If you have two identical devices, output on one - input the other plus common.
Insufficient info for detailed response.
M.
I don't understand about this reply..
 

Pradip Nepali

Jun 18, 2015
14
Joined
Jun 18, 2015
Messages
14
If driving a relay you will probably need conditioning of some kind, 2n7000 for e.g. etc.
If you have two identical devices, output on one - input the other plus common.
Insufficient info for detailed response.
M.
dig.JPG
This is my diagram now let me know how can I switch on/off this two LED from two switch.
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
I am not familiar with that processor.
Are you proficient at programming?
I imagine you will need something to drive the LED's with, 2n7000 etc.
That would normally be a trivial function to implement.
M.
 
Top