I hadn't come across this before so a simple resolve it what I thought was needed... However!! It didn't work and I'm not quite sure why. The thing is, I really need to know..
Problem:
I have two serial sources ( coming from the same device ) One is wireless and the other is hard wired... The switch over works really well... The wireless transceiver is stopped and serial is transmitted via RS485 once plugged in..
But! At the receiving end I have to bring both signals into the same port! The second USART on a pic1845k22...
Here was my first resolve
Didn't work!!!!
I have alredy fixed the issue using two NPN's as makeshift OR gate, But!!! I still want to know why the diodes didn't work!!
Well the door has shut now as the makeshift OR gate works very clean.. The signal is spot on.. But I can use this info at some other time... Thanks for that... Why would adding a load resistor help?? I would have thought it would make the problem worse..
Because there is nothing else to pull the signal low at the diode output except leakage current and any load resistance.
If those are insufficient to pull the output low in the time the input signal is low, then you will get the type of signal you observed.
So all I needed was a pulldown resistor... Like I said.... The input signal ( at a 3v3 level ) via the diode and a pulldown may be reduced too much any way !!!
Aha !! got it.. I see what you mean.. The input is floating!! I think that on a 5v pic the input threshold is @ 3v so it may have not worked anyway!!!
The diodes have capacitance. The cmos input has capacitance. Without the pulldown, you have created a capacitive voltage divider which would be greatly effected by hanging a scope probe on the cmos input pin...
I have to agree about the two diodes. Two diodes, alone, do not constitute a logic OR gate. A logic OR gate is made with two diodes and one resistor. The resistor is either pullup or pulldown depending on the logic used.
It might be interesting at this point to see the two transistor solution too and see the difference.
Strange isn't it?, you wouldn't dream of using two transistors without an emitter resistor, yet for two diodes it isn't instantly obvious that you need the same resistor.
Yeah i just wanted to mention that DRL (diode resistor logic) depends on both the diodes and the resistor, even if you dont intend to use it at this very point in time.
So you built your own TTL, he he, that's cool too. A little more like TRL, but hey that's ok as long as it works
Yes and strictly speaking this isnt analog exactly. The pure analog version of an OR gate would be made with two resistors and possibly if needed an amplifier like an op amp.
The transistor circuit is almost like an RTL logic creation. I actually have an RTL logic chip around or maybe it is a DTL chip. That's from the 1970's.