Commodore Peripheral Ports - from Compute!, March 1985
Commodore Peripheral Ports
Ottis R. Cowper, Technical Editor
Commodore computers provide their users with a variety of methods for
communicating with the outside world. The devices from which the computer
receives input or to which it sends output (or both) are generically
called peripherals, and the connectors where peripherals are attached
to the computer are referred to as ports. Each of the several ports
has distinctive characteristics that make it suitable for particular
applications. For some, the computer's operating system the ROM which
controls the machine's functions provides routines that handle much
or all of the "dirty work" of communicating with devices attached
to those ports. To use other ports, you must program all the necessary
support routines yourself. That task can range from very easy (for example,
reading a joystick) to quite complex (interfacing with a parallel printer
through the user port, for example). Here's a rundown of the features
of all the ports:
The Serial Port
For most users, the serial port is the major data artery of the computer.
As the connection point for disk drives and printers, it's the port
through which most information exchanges take place. This is the one
port that is the same on the VIC, 64, Plus/4, and 16. Well, almost the
same - there are some signal timing differences. The VIC transfers data
at a slightly faster rate than the others, which is one of the reasons
the VIC is listed as incompatible with the 1526 printer, and why the
original 1540 disk drive was only for the VIC. Obviously, this port
is bidirectional - data can flow both in and out with equal ease.
Pins are as follows:
1. Serial SRQIN (NOT)
2. GND
3. Serial ATN IN/OUT
4. Serial CLK IN/OUT
5. Seral DATA IN/OUT
6. RESET (NOT)
The signal format used to exchange data over the six lines provided through this port is unique to Commodore. The format should not be confused with the more standard RS-232 serial communications format used by numerous peripherals; RS-232 communication is handled through the user port (see below). The serial port is essentially a stripped down version of the parallel IEEE-488 port used for most data communications in Commodore's earlier PET/CBM models. As the term serial implies, data can be transferred only one bit at a time (and in only one direction at a time, either in or out). Three of the other lines control the direction of data flow, and whether the signals on the data line are to be interpreted as data or as commands to the peripheral device. The computer's RESET line is also present at this port, which explains why the disk drive resets whenever the computer is turned on or off.
The operating system fully supports communications through this port. By addressing a peripheral attached to this port with a device number, and using OPEN, CLOSE, PRINT#, INPUT# and related routines provided by the operating system, you can avoid worrying with the details of controlling the individual signal lines. Any peripheral addressed with a device number between 4 and 31 (the highest device number allowed) is assumed by the computer to be connected to this port.
Commodore has established several standards for device numbers: Printers are usually device 4, although some can be changed to device 5, the 1520 Printer/Plotter is designed to be device 6, and device numbers 8 and above usually refer to disk drives. Device 8 is the default number for the disk drive, and almost all software assumes the disk drive will have this device number; device 9 is the most common choice for a second drive. Commodore 1541 drives allow you to select any device number via software, or numbers 8 - 11 via hardware.
The use of a unique signal format for communication with the disk drive is not unusual; almost all computer manufacturers use a proprietary disk interface compatible only with their own products. What is unusual is that this same nonstandard format is also used for communications with printers. Since so much software assumes that printers will be connected through the serial port (as device 4), most third-party interfaces for non-Commodore printers also attach to this port. These interfaces act as interpreters, reading the Commodore-format serial signal from the port and converting it to the more standard parallel (eight bits at a time) format used by most printers.
The Memory Expansion Port
This is often referred to as the cartridge port, since ROM cartridges
are the peripherals most often attached through this connector. In the
VIC, this is also the port through which RAM memory expanders are added.
The lines available at this port include most of the address, data,
and control lines of the microprocessor chip that is the heart of the
computer. Thus, any peripheral which needs to be intimately tied to
the workings of the computer - for example, ROM that must be addressed
by the microprocessor - is connected through this port. The operating
system does not support any devices through this port; in essence, anything
attached here is no longer a peripheral, but part of the computer itself.
This port is present on the VIC, 64, Plus/4, and 16. Many of the same lines are available on corresponding pins of the expansion port connectors used in the VIC and 64, but the connectors themselves are different sizes, so cartridges designed for the 64 cannot be used on the VIC, and vice versa. The Plus/4 and 16 have identical 50-pin connectors for this port (as opposed to the 44-pin connectors used in the VIC and 64), so presumably there will be some compatibility of cartridges for these models, although no VIC or 64 cartridges or memory port peripherals can be used.
Examples of other types of devices which attach through this port are the








