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.

How to read and write on same data lines

Status
Not open for further replies.

hithesh123

Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Activity points
3,548
Some serial protocols need reading and writing on same data lines, like PS2 protocol.
Let's say device1 is sending data to device2.
But device2 can pull the line low and make a request.
In this case, how does device1(a microcontroller) read the data lines.

Let's say data is being written by Microcontroller on Port P0.1, and device 2 pulls it low.
To read the LOW, I will have to use another port on the micro as input and this port will be connected to P0.1 ?
 

errakeshpillai

Full Member level 5
Joined
Oct 17, 2011
Messages
256
Helped
64
Reputation
128
Reaction score
59
Trophy points
1,328
Location
Chennai, India
Activity points
2,738
There are specifications for every protocol. If any master in the network is sending, then the slaves will not pull it down. Also there are provisions like "Start/Stop" conditions to let the slaves know about the commencement/end of the communication session.
Even after the request to send/ receive data, every device waits for an acknowledgement from the receiver side. Then only it will start to send/receive data.
The protocol used itself will take care of it.
 

hithesh123

Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Activity points
3,548
There are specifications for every protocol. If any master in the network is sending, then the slaves will not pull it down. Also there are provisions like "Start/Stop" conditions to let the slaves know about the commencement/end of the communication session.
Even after the request to send/ receive data, every device waits for an acknowledgement from the receiver side. Then only it will start to send/receive data.
The protocol used itself will take care of it.

I just want to know how to you implement in the hard ware. How do you read the same lines.
Do you connect them to input of micro?
 

Venkadesh_M

Advanced Member level 4
Joined
Jun 26, 2013
Messages
1,375
Helped
258
Reputation
516
Reaction score
254
Trophy points
83
Location
Coimbatore, India
Activity points
6,738
Some serial protocols need reading and writing on same data lines, like PS2 protocol.
Let's say device1 is sending data to device2.
But device2 can pull the line low and make a request.
In this case, how does device1(a microcontroller) read the data lines.

Let's say data is being written by Microcontroller on Port P0.1, and device 2 pulls it low.
To read the LOW, I will have to use another port on the micro as input and this port will be connected to P0.1 ?

That will done in the end of the communication as acknowledgement.............
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top