• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Converting bi-directional line to unidirectional

Status
Not open for further replies.

mik3ca

Member
I want to do some I/O testing with a few pins of my AT89C2051 microcontroller using the parallel port of my PC in standard mode (not bi-directional). Why standard? because I configured it as that for other projects and I don't want to change it.

The microcontroller can output high-impedance or logic low on its pins. This means I can't send a logic high output to the microcontroller without it blowing up unless it doesn't output a logic low.

So lets say for example I want the LSB of the parallel port output as data entering one GPIO pin of the micro and the output of the same GPIO pin going to let's say the parallel port busy line.

Seeing that busy line is port pin 11 and LSB of port data is pin 2, I can't just connect pin 2 to pin 11 to GPIO without having either or both items blown up.

Only idea I have in mind is to use resistors between all connections but if that's an ok approach, then what values should I use?

And if there's a better approach (even if it means using a simple IC) then tell me.
 

Pommie

Well-Known Member
Most Helpful Member
A simple way would be to use diodes on the data lines so the PC can only pull the pins low. I believe 89 type chips are OC outputs and are held high by a pullup when set to input. This would, of course, mean communication only from PC to micro.

Mike.
 

mik3ca

Member
I just thought of an idea but then it will need a direction switching pin. I thought of using buffers (74HC126). That's probably the best I'll get
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top