1) Most joystick connector cables have only 6 wires, just those needed to allow the reading of up to 5 switches. If you want more than to just determine if a switch is closed, find a cable with all 9 conductors present. (Philmore CE9 at Mark Elec. in Beltsville)
2) Not all 2068’s have pin 9 at ground; mine does not, so I added a jumper from the dock connector ground to the right side port connector.
3) Data rates are rather low if the port is controlled by a BASIC program, probably less than 70 baud.
4) The port is set for input at power up. To switch to output, execute SOUND 7,64. The data is output by SOUND 14,data. To switch back to input mode, execute SOUND 7,0. To read data use STICK. (The BASIC commands IN and OUT can also be used; this involves more statements and is slower.) The value of the data byte of course depends on which pins you want to go high or low. E.G. pin 1 is bit 0; if only pin 1 is to be high then “data”=1.
5) At power-up, all bits are set; e.g. a LED connected from pin 1 to ground will be lit. The STICK function will return 0. Now if you switch to the output mode and write a 0, all bits are reset, i.e. the LED goes out.
6) Any data written to the port is latched. If you later switch to the input mode and read some input data, it may reflect what you previously wrote. For example, write a 1, then read the port with STICK; the result is 14. This indicates that bit 0 is still set and the other bits are low, so the STICK functon thinks only pin 1 (bit 0) is not grounded.
M.S. Morris