top of page

Commodore 64 - Making a User Port Interface Cable

Ever wanted to connect your Commodore 64 to your latest projects? Make this cable, and turn your vintage tech into a retro Arduino alternative today!


A depiction of the cable connected to a test circuit.
A depiction of the cable connected to a test circuit.

Introduction

The Commodore 64 offers the User Port, a user-controlled I/O port that can be used to directly interface with external electronics. Fortunately, like the name suggests, this is designed for users to utilise, so it's not very hard to do at all!

A close-up view of the User Port edge connection on my custom C64-C.
A close-up view of the User Port edge connection on my custom C64-C.

Unfortunately, the 24-pin edge connector for this port is not as affordable or commonly used today as other connectors that the C64 and other retro computers use. Though the connector we need can still be found, for a price. This is why I found it so important to build a cable, as we can make a single cable to be used with all of our projects, rather than needing to add this connector to each and every one.


Of course, it is crucial to keep in mind that the User Port does not come with as much protection as modern-day ports, being extremely easy to cause damage to your Commodore if not careful. This includes no overvoltage or overcurrent protection (each I/O pin only provides a measly 100mA max, supporting only 5V logic).



The Pinout

A pinout is an ordered list of cross-referenced pin designations to ensure our wires and pins are connecting to the correct part of the circuits.


The pinout of the computer's User Port can be found in the user manual. However, there is only a small select number of pins that we need. This includes the 8 data lines on the Commodore's "Port B" register, which we will manipulate, and a ground pin to complete the circuit.

User Port Terminal Label

Associated Function

A

Circuit Ground

B

Empty

C

PB0

D

PB1

E

PB2

F

PB3

G

PB4

H

PB5

I

PB6

J

PB7

The pin designation for the cable connector will match that of the computer itself. In some cases, the values of the pin labels may be different on account of letters "G" and "I" historically having issues with printing accurately at a small scale or using unclear fonts, and getting confused with other very similar characters (e.g. 'I' with '1' or 'l'). The plug I used was, however, alphabetical in order with no omissions. Make sure you alter your pinout table in accordance.


The exact colour choices for the wire in the cable are not crucial, but it is best to stick to something consistent, using colours that make sense. As we are not using a "standardised" colour format, I chose my own using the colours available by the cable selected.

Cable Wire Colour

Associated Function

Brown

Circuit Ground

N/A

Empty

Red

PB0

Orange

PB1

Yellow

PB2

Green

PB3

Blue

PB4

Purple

PB5

Grey

PB6

White

PB7



Parts of the Cable

Before using the cable, we have the fun of making it. But first, there are a few things we need.


The Socket

The most crucial part of the cable is the User Port socket, which is a 24-pin edge connector. This cable is not handed, so it is best to write with a permanent marker which side is the correct way up. Alternatively, you could 3D print a plug housing, which may additionally help pull the plug out.

The edge connector being used was marked to signify its orientation.
The edge connector being used was marked to signify its orientation.

On one side of the connector, pins are labelled with alphabetical characters, with the opposing side labelled with numbers. For use with a Commodore 64, the alphabet side we will be soldering to needs to be oriented so it uses the underside of the computer's connector.


I/O Connections

To connect with the circuits we wish to build, we can use cheaper and more generic header pins. These were used both back then and very much so today, too. Cheap kits can be found online with most of the basic components you need for soldering to PCBs and making cable plugs.

A depiction of a header pin connection kit.
A depiction of a header pin connection kit.

In this circumstance, we need to use the "female" pins that come in the kit. These pins will be crimped onto our cable for plugging into our custom cicuit boards.

The kits generally come supplied with pins that can be crimped onto wires to make plugs. "Female" type pins are used for this project.
The kits generally come supplied with pins that can be crimped onto wires to make plugs. "Female" type pins are used for this project.

The opposing "male" side of the connection can be soldered onto the circuit's PCB. I prefer to use these plated right-angle pins, as they allow for lower-profile circuit boards. The shorter side is soldered to the PCB, providing the longer pins to plug into your cable.

Right-angle pins can be used to make lower-profile connections to external plugs.
Right-angle pins can be used to make lower-profile connections to external plugs.

The Cable

Of course, to make the cable, we need the wires themselves. For practicality and neatness, a roll of ribbon cable can be used. This will provide our cable with a large number of wires to use.

A ribbon cable is a practical way of making cables that utilise a large number of wires.
A ribbon cable is a practical way of making cables that utilise a large number of wires.

Once you know how many wires are needed for the cable, you can pick the appropriately sized roll, or split off only the amount you need, and cut to the desired length.

A portion of the roll was split away, with the correct length and number of wires required.
A portion of the roll was split away, with the correct length and number of wires required.

Pin Header

To contain the cable pins in a single plug, we need a pin header for them to slot into. These come in a multitude of sizes, often with a common variety supplied in the previously mentioned kits.

A pin header can contain the pins crimped to your cable. This header has one pin blanked off.
A pin header can contain the pins crimped to your cable. This header has one pin blanked off.

As mentioned before, our plug will use 8 digital I/O pins and one ground pin. As we do not want to accidentally use this connector upside down or mix up which side has the ground pin, we can make this plug-handed, restricting it to only plug in one way.


In this circumstance, I have blanked off one pin with the rubber outside of a wire. By also removing the associated pin from the PCB connector, this plug will only be able to plug in one designated way. I have chosen the configuration so that the ground is on one side of the blank off, and the 8 I/O pins are fitted on the other side, in number order.


Advertisements provided by Google AdSense


Tools to Use

To make the cable, we need a few tools to attach the wires to the pins.


Wire Strippers

Before we can attach the pins, we need to expose the conductor under the wires' insulation. To achieve this, we can use a variety of different wire strippers, of which the two most common versions are shown below.

There is a range of wire strippers that can be used to expose the conductor under a wire's insulation.
There is a range of wire strippers that can be used to expose the conductor under a wire's insulation.

For this project, we will be using the sideways stripper. This tool will be able to remove the insulation across the whole ribbon cable evenly. The length removed can be adjusted by moving the sildable orange guard to the desired measurement on the scale.

The sidewise style wire stripper is wide enough to evenly strip back insulation across the whole ribbon cable.
The sidewise style wire stripper is wide enough to evenly strip back insulation across the whole ribbon cable.

Crimp Tool

We need a crimp tool to crimp the terminals to the wire. This will bend the small metal tabs on the temrinal to the wire, creating an electrical connection for our circuit and a mechanical connection to keep it from falling off.

A crimp tool can be used to fix a terminal to a wire.
A crimp tool can be used to fix a terminal to a wire.

This tool supports varying crimp sizes, depending on the size of the terminal and the width of the wire conductor. In this circumstance, we need to use the smallest size, size 3.

This crimp tool supports a small range of terminal sizes.
This crimp tool supports a small range of terminal sizes.

Soldering Iron

To attach the wires to the edge connector, we can use a soldering iron to create a strong and permanent connection. This is because the pins on this socket cannot be crimped, and there is minimal space between pins, so a more direct approach is needed.

A soldering iron can be used to permanently attach the wires to the socket.
A soldering iron can be used to permanently attach the wires to the socket.


Making the Cable

With all of the tools and parts collected, the cable can now be constructed.


Preparing the Wire

The wire needs to be stripped to expose the conductor. The amount needs to be enough to ensure a good connection, but not too much that it overhangs the terminals we are attaching to.

The ribbon cable was stripped to expose the correct amount of the conductor.
The ribbon cable was stripped to expose the correct amount of the conductor.

Once the conductor is exposed, we now need to feather the ends to make them accessible for crimping to the pins. This is done after stripping; otherwise, we won't get even insulation removal. The ends need to be split apart enough so that the wires can reach their associated pins across the width of the plug, but not so much that they lose their even form and tangle.

The ends of the wires can be feathered by splitting the wires away from each other. This will allow the wires to reach each side of the plug, as well as increase accessibility for crimping.
The ends of the wires can be feathered by splitting the wires away from each other. This will allow the wires to reach each side of the plug, as well as increase accessibility for crimping.

Crimping the Wire

The terminals can be placed into the crimp tool, with the wire slid in to the correct amount. With the ratchet mechanism crimp tools, these will unlock once the terminal has been squeezed down enough, ensuring the crimp is adequately pressed.



Once crimped, the terminals can then be slid into the header in order. As the outermost wire on one side will be ground, and one of the end wires was brown, I saw this as a convenient colour to indicate which side is the ground wire, where black was not available.



Soldering the Edge Connector

The final piece to the puzzle is the end connector on the computer side of the cable. I find it easier to first tin the pin with the amount of solder needed, then place and solder the wire on top. I find this method beneficial, as even with soldering aids to hold the wire, it can be very difficult to hold and feed solder to the wire at the same time for such small wires. Additionally, these wires do not like to be heated to very high temperatures, as their insulation will melt easily if too hot. Soldering the wires using this method will help reduce the amount of time the wire is heated.


Once the wire is tacked into place, more solder can be added if necessary. Heat shrinking tubing can be placed on top to insulate and further mechanically hold the wire in place. It is important to be careful when using a heat gun to shrink the tubing, as the plastic housing of the connector can melt quickly if aimed incorrectly or held for too long at too high a temperature.



Testing the Cable

With the cable finished, all that is left is to put it to the test! Over the next series of blog posts, we will explore how to make various test circuits for the C64 and write custom programs to see what we can make them do.

The cable copnnected ot the test circuit in the next blog tutorial.
The cable copnnected ot the test circuit in the next blog tutorial.


Advertisements provided by Google AdSense





Powered and Secured by Wix

bottom of page