24 PIN EDGE DZM 12 DREH Male Connector at the computer.
The Commodore 64 User Port is a 24-pin edge connector on the rear of the computer, present on both the C64 and the Commodore 128, which share identical pin assignments. Introduced with the C64 in 1982 and specified in the C64 Programmer’s Reference Guide (Commodore Business Machines), the port exposes eight bidirectional I/O lines (PB0–PB7) from CIA #2 Port B at address $DD01, together with serial handshaking, counter, and flag signals from the two CIA chips. It also provides regulated +5 V (100 mA), unregulated 9 VAC (50 mA), and a buffered /RESET line. The port is most commonly used for TTL-level RS-232 serial communication via OS device 2, though the logic levels are 0–5 V rather than the EIA-232 standard of ±12 V.
| Pin | Name | Description |
|---|---|---|
| 1 | GND | Ground |
| 2 | +5V | +5 VDC (100 mA max) |
| 3 | /RESET | Reset, will force a Cold Start. Also a reset output for devices. |
| 4 | CNT1 | Counter 1, from CIA #1 |
| 5 | SP1 | Serial Port 1, from CIA #1 |
| 6 | CNT2 | Counter 2, from CIA #2 |
| 7 | SP2 | Serial Port 2, from CIA #2 |
| 8 | /PC2 | Handshaking line, from CIA #2 |
| 9 | ATN | Serial Attention In |
| 10 | +9V AC | +9 VAC (+ phase) (100 mA max) |
| 11 | +9V AC | +9 VAC (- phase) (100 mA max) |
| 12 | GND | Ground |
| A | GND | Ground |
| B | /FLAG2 | Flag 2 |
| C | PB0 | Data 0 |
| D | PB1 | Data 1 |
| E | PB2 | Data 2 |
| F | PB3 | Data 3 |
| H | PB4 | Data 4 |
| J | PB5 | Data 5 |
| K | PB6 | Data 6 |
| L | PB7 | Data 7 |
| M | PA2 | PA2 |
| N | GND | Ground |
Notes
The connector is a 24-pin (12 per side) edge connector; the computer-side socket accepts a male edge connector plug on the peripheral device. Pin numbering uses numerals (1–12) on one side and letters (A, B, C–N, skipping I and O) on the other. The +9 VAC on pins 10–11 is unregulated AC derived directly from the power supply’s secondary winding; the combined current limit is 50 mA, not 100 mA as sometimes stated. The +5 V supply on pin 2 is regulated DC with a 100 mA limit. The /RESET line (pin 3) is both an input and an output: asserting it low resets the computer, and the computer asserts it low during power-on reset, so peripherals should treat it as bidirectional. The C64 and C128 share the same physical connector and pin assignments for this port.
Signals
- GND — Signal and power ground (pins 1, 12, A, N).
- +5V — Regulated +5 VDC logic supply; maximum 100 mA from pin 2.
- /RESET — Bidirectional reset; active low. Forces a cold start when driven low; also driven low by the computer during power-on reset.
- CNT1 — CIA #1 serial port counter input/output (pin 4); used for clocking the SP1 serial data line.
- SP1 — CIA #1 serial port data line (pin 5); used together with CNT1 for CIA #1 serial transfers.
- CNT2 — CIA #2 serial port counter input/output (pin 6); used for clocking the SP2 serial data line.
- SP2 — CIA #2 serial port data line (pin 7); used together with CNT2 for CIA #2 serial transfers.
- /PC2 — CIA #2 Port C handshaking output (pin 8); pulses low after each read or write of Port B ($DD01) to signal a data transfer to a peripheral.
- ATN — Serial bus Attention line input (pin 9); reflects the state of the IEC serial bus ATN signal.
- +9V AC — Unregulated 9 VAC from the power supply secondary winding; pins 10 (positive phase) and 11 (negative phase); combined limit 50 mA.
- /FLAG2 — CIA #2 Flag input (pin B); a negative edge on this line sets the FLAG interrupt flag in CIA #2, useful for handshaking or external event detection.
- PB0–PB7 — CIA #2 Port B bidirectional data lines (pins C–L); direction controlled by the data direction register at $DD03; default direction depends on software configuration. Used as received/transmitted data and control lines in RS-232 mode.
- PA2 — CIA #1 Port A bit 2 (pin M); in RS-232 mode this line carries the transmitted data output.