Sunday, 9 November 2025

Userport LED tester for PET, VIC, C64

This is a very simple board I use for testing the userports of various Commodore machines.

The userport pinout on the PET, VIC20 and C64 have some similarities but are not entirely interchangeable (most importantly, the 5V and 9V AC power available on the VIC20 and C64 are not available on the PET and beware any userport devices which use those in case you damage your PET).

They do have two useful things in common, an 8 bit wide IO port on the middle 8 pins of the bottom row, and ground on all four corner pins.

That means I can make one board which will fit the PET, VIC20 and C64 (but not the plus/4 - that does have a 24 way edge connector userport, with an 8 bit IO port, but the pins are randomly arranged around the connector so this will not work on a plus/4)

Usage is very similar, the only difference between the machines is the addresses of the IO ports used to control the LEDS.

To drive the LEDs, first set the port to all outputs with one POKE:

  • POKE 59459,255 (PET)
  • POKE 37138,255 (VIC)
  • POKE 56579,255 (C64)

Then write a value to the port which is displayed by the LEDs as a binary value. There is no inversion, so write 0 ($00, 0000 0000) to turn all the LEDs off, and write 255 ($FF, 1111 1111) to turn all the LEDs on.

  • POKE 59457,42 (PET)
  • POKE 37136,42 (VIC)
  • POKE 56577,42 (C64)

I wrote a test program and adapted it for all the machines, this sets all LEDs as outputs, and then writes the numbers 0 through 255 to the port in sequence, with a short delay between each one.

If you want the full "blinkenlights" effect, you should write a random number.

You could also create a "Larson Scanner", which if you are not from the 1980s (let's face it, you probably are), that is the sequence of LEDs used on the Cylons from Battlestar Galactica and on KITT from Knight Rider.

The LEDs display the binary value sent to the port, with the MSB to the left, LSB to the right, so for example the display below is 1000 1101, $8D in hex or 141 in decimal (or if the Glen A. Larson reference is a bit modern for you and you want your blinkenlights 1970s style, that is 010 001 101, or 215 in Octal)

Aside from pretty patterns, it is useful to test the userport is working.

It also doubles as a power indicator when working on boards on the test bench.

The LEDs are driven to ground (remember there is no power on the PET userport connector), which has the useful side-effect that the LEDs will light dimly when the port pins are configured as inputs, due to the pullup resistors in the VIA / CIA chips.

The reset state of the chips have the pins set as inputs, so all being well, when power is applied, the LEDs will all light dimly.

Sometimes if you have a dirty edge connector you might not get the full set, clean the connector if you want them all to light.

I first made one of these to help with testing the Mini PETs.

I used a 20 way LED bar display, but I think I there were only a few more LEDs wired up than the 8 bit port.

That worked fine, but I thought I needed a slightly neater version, so designed the PCB version and have now made that available as a kit.

These are available as DIY kits from my Tindie store.

They are also available built, but it should be fairly easy to solder up.

I can even supply different colour LEDs if you like.

If you want more userport LED goodness, check out this video from Tim's Retro Corner

And for more on Octal LED displays, this one from Curious Marc.

If you aren't already following Tim or Marc, why not? go and give them a like and a follow now.


Adverts

This and other PET repair parts are available from my Tindie store:

PET ROM/RAM:

PET Diagnostics:

PET Dual Userport Joystick:

Mini PET 40/80 Internal

Or if you decide you want to take the easier route, I have recently built some more Mini PET 40/80 Internal boards, that are a drop in replacement for boards like this one.

Shipping

I can still ship worldwide from my Tindie store and US orders are now tariffs paid.

Currently it looks like Royal Mail to the US is working. I pay the 10% tariffs as part of the postage to (hopefully) avoid delays and additional costs at customs. The increased US postage costs cover this.


Patreon

You can support me via Patreon, and get access to advance previews of development logs on new projects like the Mini PET II and Mini VIC and other behind the scenes updates.This also includes access to my Patreon only Discord server for even more regular updates.