Bidirectional signal

There is a bidirectional IO Port Pin in the 8051 Microcontroller Core which needs to be connected to a bidirectional signal from a connector. How to make the signal bidirectional? Do I have to include a transistor before connecting it to the Microcontroller?

Reply to
pavi
Loading thread data ...

"pavi" schreef in bericht news: snipped-for-privacy@t31g2000cwb.googlegroups.com...

No, you'll have to make sure that connector and 8051 pin are never in output mode at the same time. The only extra thing you may need is a pullup resistor to make a well defined level when both pins (8051 pin and connector pin) are in input mode. But it's not sure you need it and it might as well be present somewhere in the circuit already.

petrus bitbyter

Reply to
petrus bitbyter

Apparently the two replies did not address the particular characteristics of the 8051 port so let me give it a shot.

The 8051 data book describes in detail how to operate the IO ports. They have high pull up's. If you want to operate the port as an input port, write an '1' to the port and it can be dragged down to '0' by the external device. If you want to operate it as an output port, then writing the value you want to the port. A bidirectional port can either be an input or output port but not at the same time. Either the controlling firmware or the hardware still needs to know when to configure the port as input or output.

Now for you question, the 8051 sinking and sourcing capability meets the requirement of the device it is connected to, it does not need a transistor in the interface.

Hope this help.

22/7
Reply to
pi3_1416us

the last time i've seen that was when the output was put into open collector mode using an external pull up resistor.. it thus makes the line use able in both directions many single line serial protocols work that way for bi-directional communications btw/ this mite not be what your looking for but its a thought.

--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.