Simulating pull-down resistor

Hi!

I am trying to set up a serial communication with the IEC bus of a C64. Now I noticed that the ports on the ATmega are so-called pull-up resistors, but the IEC bus uses pull-down resistors. How can I simulate a pull-down port with the Arduino?

Thanx!

How can I simulate a pull-down port with the Arduino?

You can't, use a real resistor.

Thanx for the quick answer!

Well, I am a newby, so how would I go about using a real transistor? I already tried something in that direction, but am not sure I did it right. I placed a 10K resistor between the pin and gnd. The line to the IEC bus is also on the pin. Then I put the pin in INPUT mode and set it to HIGH with digitalWrite. This should then simulate FALSE. To pull-down the line I write LOW to the pin. Is this the way to go?

so how would I go about using a real transistor?

Transistor? No resistor.

I placed a 10K resistor between the pin and gnd.

Yes that is the way to do it although not 10K.

Then I put the pin in INPUT mode and set it to HIGH with digitalWrite.

That enables the internal pull up resistor.

This should then simulate FALSE.

No you will get a TRUE or logic one.

To pull-down the line I write LOW to the pin. Is this the way to go?

No. Writing a LOW to the pin that is set to an input will remove the pull up resistor. If then there is an external pull down resistor then that pin will look like a logic zero, to an appropriate device on that line. However it depends on what that device is. The pull down value might not be enough to ensure a logic zero. For example if it were a TTL device with a 10K pull down it will look like a logic one. This is because TTL required a certain current to be pulled out of the pin (or sunk) before it registers as a logic zero.

The IEEE-488 bus (as it is more correctly known) requires both pull up and pull down resistors for correct termination. I haven't got the reference to hand but last time I looked at this (in about 1982) I seem to remember they were in the 470R region not 10K. If the pin is not actively pulled in any direction then the voltage on the signal line sits in no mans land as far as logic levels are concerned.