SIO1 and SIO2 Information

The NEC PC-8201A has three serial connectors: RS-232C, SIO1 and SIO2. They're not really separate ports, just separate connectors that can be activated by means of a multiplex command to carry the COM: serial signal. The multiplex control port is 144 decimal, 90 hex. The multiplex read port is 160 decimal, A0 hex. To set the multiplex bits, read the multiplex port first (INP(160)) and use the appropriate OR command to moodify its value, then write the new value to the control port (OUT 144). Here's the info on both the control and status ports:

IOCNT 090h (144) I/O control port
BIT 0-Bank #0 select
BIT 1-Bank #1 select
BIT 2-Bank #2 (0000-7FFF)
BIT 3-Bank #2 (8000-FFFF)
BIT 4-Clock strobe
BIT 5-Cassette motor
BIT 6&7- Serial interface multiplexor
  00=Not used
  01=SIO2 (RJ11)
  10=SIO1 (RJ45)
  11=COM port RS232C
IOSTS0A0h (160) Return status of IOCNT port

Here's how to switch between the RS-232 and SIO connectors:

Port to selectCommandComments
SIO1OUT 144, INP(160) AND 63
OUT 144, INP(160) OR 128
Resets bits 6 & 7 to default, then sets bit 7
144=90h
160=A0h
63=3Fh (00111111b)
128=80h (10000000b)
SIO2OUT 144, INP(160) AND 63
OUT 144, INP(160) OR 64
Resets bits 6 & 7 to default, then sets bit 6
144=90h
160=A0h
63=3Fh (00111111b)
64=40h (01000000b)
RS232cOUT 144, INP(160) OR 192Set bits 6 & 7
192=C0h (11000000b)

WARNING #1: The multiplex settings are canceled whenever you enter TELCOM, so if you want to do file transfers, you would need to program your own TELCOM-like utility that addresses port 144 and performs low-level byte transfers.

WARNING #2: Simply invoking TIME$ in BASIC will reset the multiplex settings, so be sure to check the status of port 144 frequently by polling port 160 as follows:

X=INP(160) AND 128
IF X<>128 THEN PRINT"Oops, no longer on SIO1."


There may be other BASIC commands like TIME$ that have this same undesirable side effect, so beware.

Finally, the connector you use for SIO1 is a standard RJ45 network plug, but with nonstandard pinouts. If you're trying to connect two NECs, here is the method:

Take a standard Category 5 network patch cable (i.e., straight-through cable), with wires 1-8 as follows:

1 = white-orange  (Ground)
2 = orange        (Transmit)
3 = white-green   (Receive)
4 = blue          (RTS)
5 = white-blue    (CTS)
6 = green         (Vcc +5v)
7 = white-brown   (NC)
8 = brown         (NC)
Leave one end of your RJ45 cable just as shown above. Then cut off the other end and use a crimping tool to attach a new plug there, wired as follows:

1 = white-orange  (Ground)
2 = white-green   (Transmit, connected to Receive from other machine)
3 = orange        (Receive, connected to Transmit from other machine)
4 = white-blue    (RTS, connected to CTS from other machine) 
5 = blue          (CTS, connected to RTS from other machine)
Snip (do not connect) the green, white-brown, and brown wires.

Pinouts for SIO1 & SIO2:


Pinout for RS232C (for reference):