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.

How to read and write on same data lines

Status
Not open for further replies.

hithesh123

Full Member level 6
Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Visit site
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 ?
 

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.
 

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?
 

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

Back
Top