Showing posts with label Userport. Show all posts
Showing posts with label Userport. Show all posts

Sunday, 14 December 2025

I Sold One! (now I have to write the documentation)

This is a situation I mentioned in a social media post last week, and it's just happened again.

The "Yay!" moment of "I Sold One!", followed quickly by the realisation "Oh!, now I have to write the documentation."

When I was writing up a PET mainboard repair a few months, I used one of my standard bits of test kit, a simple LED display board connected to the userport.

It occurred to me that I had designed this many years ago, but never got around to listing it on my online stores. I think at the time I was moving between the old SellMyRetro store (which is currently mothballed) and the new Tindie store (which only appears like that sometimes, maybe more tumbleweeds than mothballs.....).

To coincide with the blog post going live, I decided to list it and got together the various bits I needed for the Tindie listing.

The obligatory photograph of the board at a jaunty angle of my world famous desk top.

The knolled kit photo.

And various examples of use with the various supported machines.

In this case I also took some screenshots of a simple test program.

I think they were as usual pretty awful, so I used screenshots of the vice emulator instead.

(hang on, how have I only just noticed the VIC in the vice name, is it VIC Emulator? how did I not twig that until now?, in which case "vice emulator" is one of those cases or unnecessary duplication, I should just say "in vice".)

That was everything I needed for the Tindie listing

Once I had taken all the photos etc., I thought I may as well write that up as a blog post.

So I did.

That used mostly the same content, but I wanted to add a schematic.

The version I had originally drawn was just functional enough to enable me to make the PCB.

That didn't look quite right, so I thought I should tidy it up a bit. How hard can it be?

That didn't look right either, too squashed up.

That's a bit odd, sort of zig-zagging across the page.

Turning the resistor array around seemed to look better, and when I exported that to get the image to use in the blog, I added some colour to the LEDs.

That was the version I finally unleased on the world in the blog post.

Then came the tumbleweeds as nothing happened for a month.

And continued to happen into a second month.

Then I sold one!

Yay!

Thank you to the person who bought one, any order is always appreciated.

However when I came to pack the order, I realised I hadn't actually written the documentation.

Now it's not that difficult to see what you need to do, solder eight LEDs and one resistor array and an edge connector and away you go.

But I did think I should probably include my usual style datasheet to describe the POKEs required and include the test listings etc.

So, time to write some documentation.

I had most of the things, already, all that was missing was the component placement diagram I usually include.

I was going to leave the schematic as it was, but I still didn't think it was right, so I had another go.

I haven't split up a resistor array in a schematic like that before, but it seemed to work here.

A final flourish after export was to add the LED colours and change the line style to dashed for the container box for the resistor array.

I think that will do (for now at least).

I know it's the sort of thing most people don't care about, but I like to try to find the clearest and neatest solution when I can.

The documentation is now complete and you can see it on the listing marked as "datasheet".


When I found I had kept all the old versions of the schematics, I thought it might be interesting to show the process and the hoops I have to go through. Actually, I don't have to go through, I chose to go through to make what I think is a better product.

I hope you did actually find that interesting.


Adverts

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

PET ROM/RAM:

PET Diagnostics:

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.

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.