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.

Want to receive data in microcontroller

Status
Not open for further replies.

Hayee

Member level 4
Member level 4
Joined
Mar 4, 2022
Messages
68
Helped
1
Reputation
2
Reaction score
3
Trophy points
8
Activity points
703
Hi Guys
I have a scenario in which two devices are connected with rs232 protocol. Device 1 asks for some data and device 2 provides the data to device 1.
Now what I want to do is to add a microcontroller which also send command to Device 2 to get some data. Here I attached the image which shows the scenario.
Device 1 asks for data at a defined interval so my microcontroller will ask for data from Device 2 at a pre-time interval.
My question is Can I do something like that as shown in the picture by placing Diode at Tx side of Both Device 1 and Microcontroller?
Maybe it looks so simple but actually this cannot be achieved.
Required suggestions from your side.
serial data scenario.jpg


Thanks and best regards
 

Hi,

in my post#3 I wrongly had the TTL levels in mind. (as already mentioned)

If you want clarificaton, do it the objective way: use one of the free simulation tools.

Klaus
 

Hi,

in my post#3 I wrongly had the TTL levels in mind. (as already mentioned)

If you want clarificaton, do it the objective way: use one of the free simulation tools.

Klaus
It means post #14. I can implement this
 

Hi,

I´ve alredy replied to your post#14. Did you read it?
Test the schematic of post#14 ... then also with reversed diodes to see which one is correct.

Klaus
 

KlausST I will definitely use some simulator and test the results and post it here.
Another scheme coming in my mind, If I convert the logic level of Device1 to TTL and then use Diodes like in the picture and then convert again to MAX232 Level. Will this be OK?

1678094067302.png

Kindly guide me in this scenario
 

Hi,

good idea.

But again I doubt that the diode direction is correct.
Code:
Truth table of what you need:
(UART is idle HIGH)
A = data coming from device1
B = data coming from microcontroller
Y = data going to device2

 A  B | Y ; Info
 ---------------
 L  L | L ; both are trying to transmit = data collision. Try to avoid this situation
 L  H | L ; A transmits, B is idle
 H  L | L ; A is idle, B transmits
 H  H | H ; A is idle, B is idle
This is an AND logic.
Instead of 2 diodes and a pull up, I´d use single gate logic, like 74HC1G08

Klaus

added:
The disadvantage (compard to post#1) is, that now the "microcontroller" is an essential part.
+ in post#1: when the microcontroller is not powered up or not connected, then device1 and device2 can communicate.

- in post#25: when the microcontroller is not powered up or not connected, then device1 and device2 can not communicate.
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top