RCX and NXT communication

Does anyone know how to program an NXT to simulate being an RCX’s rotation sensor? I want to be able to use one of these and connect together the sensor ports of the RCX and NXT and program them so that the NXT pretends to be a rotation sensor. Programing know how in any language would be appreciated.

I need to know how to do this because this is the only way I know of to use 4 motors without buying another NXT.

The part that you show is simply an adapter to allow NXT users to connect RCX sensors to their new NXT brick. It does not allow you to simulate using an RCX and NXT together.

There is a legacy block available for NXT-g that will support the older rotation sensor. The cable you reference can connect the older rotation sensor to the NXT. The legacy block(s) can be found as patches atthe Lego support site.

However, you mention wanting to control four motors with the NXT. I’m not sure how that’s possible with only another rotation sensor. There are other, non-Lego, methods for gaining extra motor control from a single NXT. Perhaps you can be more specific about what you’d like to accomplish with your proposed configuration?

I don’t think I made myself clear as to what I want to do.
First, imagine this:

When one rotation sensor is turned by hand, the RCX makes the other’s value match it by turning on the motor in the appropriate direction and speed. Thus the motor’s motion is dictated by the sensor readings from the rotation sensor. Now picture this:

In this picture the RCX uses the same programing but now the control rotation sensor has been replaced by a NXT programed to emulate a rotation sensor and give the RCX fictitious values.

I want to know how to program the NXT to do this. If I just knew how to control the raw IO from the sensor port on the NXT I think I have an idea.

The rotation sensor used in the RCX version is simply a wheel with light and dark places and a photo diode/LED combination. As I remember it gives 16 output transitions per rotation. The NXT version has better resolution and that is why it can be used for angular detection. Remember that the RCX has only two wires per port. I found this in a quick search that might be something interesting for you.