Sunday, 8 March 2026

PET Serial Interfacing

It turns out it is actually quite easy to interface a Commodore PET or Mini PET to serial, as long as you don't want to go too fast.

There are various ways to do this, and this post by Paul Rickards describes several of them.

Those were all using vintage software, which has a couple of disadvantages, firstly it is difficult to change, but mainly it was designed to interface using crude RS232 level shifters.

The RS232 serial communication protocol was designed in 1960, and as such, was designed to be robust. Communicating over large distances in electrically noisy environments.

The RS232 standard* varies by revision and applications, but by the 1980s was mainly working with signals at +/- 12V. With +12V representing a binary 0 and -12V representing a binary 1. In practice you might find +12V down to +5V representing the zeroes, and anything from 0V down to -12V for the ones.

* it is with pure optimism that I use the words "standard" and "RS232"in the same sentence

This shows the "real" serial port on my PC which is giving 5V and -7V. This is the byte $42, a capital B. It is sent big-endian, with one stop bit (a 0 on the end). You can read that from right to left in the order it was sent as 0100 0010 (42) and then 0 the stop bit. (I realise now that 42 is a binary palindrome, so it not a particularly good example here)

Inside the communications equipment, there will be drivers to convert these RS232 levels to TTL levels. In the 1980s, these were 1488 and 1499 drivers, which required +/- 12V supplies. But the 1990s (when I started fiddling with serial comms) there was a family of chips starting with the MAX232 which did the level conversion and inversion and also generated it's own supplies from a single 5V rail.

In TTL land, the 0s are 0V (or there abouts) and the 1s are 5V (or somewhere over 2V at least).

Here is the same B, and it is now the more logical way around to show 0 0100 0010.

And $40, an @ sign to show the highest bits are indeed at the right of the picture. The transmitter sent 0100 0000 and the final 0. 0100 0000 = $40 = @.

When people were trying to interface to the PET in the 1980s, they went for the simplest solution, and used diode / resistor type level shifters to drop the RS232 input voltages down to safe* levels for the PET userport. The PETs output of 0V and 5V is just about enough for RS232.

A typical interface of the day would be something like this.

The diode protects against the negative side of the incoming signal, and two resistors form a potential divider to drop the signal level. The other resistor protects the output of the PET against the 50:50 chance you have wired up pins 2 and 3 backwards. (It is like inserting USB plugs, you get it the right way around third time)

* This seems to be expecting a maximum of about 9V as anything more than that would give over 5V at the out. I think I would have preferred if the 620Ω was more like 1KΩ to be safe

You will notice there is no inversion going on here, so the software of the day was expecting the input signals to be the RS232 way around, and carried out the inversion in software.

Roll on modern days, and "real" RS232 is rarely used. But it is common to use USB to serial converters, often called FTDI cables (since they made the driver chips). These operate at 5V (or sometimes 3.3V), and work with non-inverted signals.

That means you can connect up one of these FTDI cables to a PET without having to do any inversion in hardware or software. But that does mean the old software cannot be used.

There is however modern software which expects the non-inverted direct connect signals and so it all works together quite nicely.

The adapter I built here is the simple non-inverting, non-level shifting variety, with two resistors for a bit of extra protection.

This pin arrangement is slightly different, but is the same as that commonly used on the VIC20 and Commodore 64. (as it common with many of these things, CA1 is used to generate an interrupt, but it's value cannot be read directly, so the same receive data signal is connected to a pin that can be read. CB2 is the output of the shift register, although this may not be being used as such due to a bug in early revisions of the 6522 VIA it is connected to.

Although you can potentially use adapters designed for the VIC20 and the C64, it is important to remember that no matter what people on the internet tell you, this person on the internet is telling you there is no power on the PET userport connector.

I used the prototyping board in case I needed to add an inverter, something like this, but it wasn't required in the end.

That plugs into the userport and the FTDI cable connects, with ground (usually the black wire) to the left. RTS and CTS are not connected, there is no hardware handshaking.

The software I used was PETTERM, available here:

There are lots of versions. The release includes four, but if you build from source, there are thirteen more.

The main ones have 40 or 80 depending on how many columns your PET screen has, and G for normal/graphics keyboards (i.e. the Mini PET), and B for business keyboards.

I will come to the versions with a memory size later.

For the moment, I am just using petterm40G.prg which suits the MiniPET.

When it starts up, it defaults to 1200 baud, which is fine. 2400 is available, and seemed stable in this release build, but was a bit flaky in the later version built from source.

On the PC end, I setup Tera Term to match. The only setting I had to change was the end of line character. Carriage return just sent the cursor on the PET to the left, CR+LF was required to move it down a line as well.

It was time to try typing stuff.

Success!

Both ways!

I tried various things and it seemed to be working quite well, converting ASCII to PETSCII and handling various control codes for arrow keys, backspace etc.

Even big chunks of text.

It also supports 80 column mode on the Mini PET 40/80, so you can read even more.

This is working fine as a terminal, but is it possible to transfer files?

Yes, that's what the other versions were. Select the memory size of your machine, and load the appropriate version.

You will see it loads but does nothing. You need to type SYS 20480 to enable it. (there are different SYS commands for the different versions).

This brings up a slightly different menu, with two new options. These allow you to load a program into memory over serial. You can also send a file to the PC end. You would load it before you type the SYS command.

These transfers use the XMODEM protocol, so you need a suitable client at the PC end.

This gets the PET ready to receive, you then start up the PC end.

And away it goes.

The transmit pins using CB2 on the PET, which is the same used to drive the speaker, so you get a click when you press a key, or when each block is acknowledged, which is a handy indication things are progressing if you don't have a scope wired up.

Hey this is a posh modern scope, let's decode that serial and see what it says.

Ah no. The hardware and firmware on the scope are perfectly cable of doing it, and probably of higher bandwidth and greater sample depth, but it's all knobbled by licenses. Must remember to google how to hack it one day....

It's not immediately obvious what happens next. The program has been loaded into RAM, but the terminal is still running. You need to press CLR/HOME to go back to the menu, then X to exit. Then enter to get a READY prompt. And then your loaded program is ready for you to type RUN (or save to disk, or whatever you want to do).

And that all seemed to work nicely.

I had planned at one point to add an FTDI connector to the Mini PET, and to add "load over XMODEM" to the file browser, in the same way as on the Minstrel 4D.

Maybe one day I will revisit that.

I did make a PCB version of that.

Which makes things a bit neater.

If anyone is interested in one of those, let me know. Things seem to be running a bit slow on Tindie for some reason. The last few things I added, I had the PCBs made by JLCPCB, shipped here, built and tested, all before the listing was approved.


Adverts

My Tindie store contains all sort of kits, test gear and upgrades for the ZX80, ZX81, Jupiter ACE, and Commodore PET.


Patreon

You can support me via Patreon, and get access to advance previews of blog posts, and progress updates on new projects like the big news on the Mini PET that was announced this week, along with the 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, 1 March 2026

Acorn A5000 RISC PC Repair(s)

Back in 2014, I repaired this Acorn A5000 RISC PC.

Now it is back.

When I did the original repair, I took some photos, but I think there was lots of other things going on and I didn't end up writing it up.

I have taken more photos this time, so buckle in for a two for one special.

The Year is 2014....

The problem was it wasn't booting up, just showing a black screen, although the keyboard was responding and the floppy light flashed at boot.

Dust, anyone? no. Dust?

That hasn't been opened in a while.

Come on, where is it?

I know what the problem is going to be, the curse of any machine starting with an A and having at least a couple of zeroes, the Acorn Archimedes 3000 and the Commodore Amiga 500+ being the worst affected.

This is quite a nice design, there is a vertical backplane, which can be removed along with the floppy drive and hard drive (Conner CP 3044, 40MB IDE).

Once that was removed, I gave it a bit of a clean before I went any further.

Ah, there it is.

Yes, the dreaded leaky Nickel Cadmium rechargeable cell.

That was straight out, and the board cleaned and neutralised.

It didn't look too bad, but on further inspection, there was some damage to one of the traces, so I repaired that with a bit of wire. (not the neatest, I might have done it a bit differently these days)

The original cell was 1.2V, 280mAh NiCd. The cell is trickle charged when the machine is powered on, and the chip it powers, the PCF8583 is a real time clock and 240 byte CMOS settings store.

It is designed to work offline at at voltages down to 1V to maintain the time and settings, it needs between 2.5V to 6V in normal mode to communicate via I2C.

The best option people seemed to be using at the time were these Varta 3.6V 150mAh Nickel Metal Hydride batteries.

The NiMh battery fits quite nicely, the board had footprints for both shapes.

Time to put it back together and fire it up.

I think this was the first of the RISC PCs that had standard VGA, or at least a standard VGA connector.

It is meant to autodetect the display, but sometimes needs a bit of help with modern LCD monitors, as it also supports composite video, SCART and various other monitor types with the same connector and an appropriate adapter cable (which I don't have).

The first power on is with R held down to reset CMOS to default values.

The screen remains black, so power off and back on again with 3 (or 4) on the numeric keypad held down to set VGA (or SVGA) mode.

And we're in.

8:45 PM, Friday 19th September 2014. I guess my social life in 2014 was just as exciting as it is these days, what better way to spend a Friday evening than fixing a leaking battery.

That all seemed to be working nicely, I left it powered on a while to let the battery charge and tried it again a few days later and all seemed well, so back it went to the customer.


The Year is now 2025....

Roll on to 2025 and I received a call asking if I still repaired computers.

It was the same A5000, with the same problem.

My initial thought was that the battery might just have been flat from not being used for a long time (i.e. 11 years or so).

However, I thought I should check inside first.

Still nice and clean inside.

Ah, oh dear.

Yes, it's done it again.

I thought NiMh batteries were meant to be better. I guess not.

I guess it's a cautionary tale, keep a check on your backup batteries, ancient or modern.

Did you fit any of those in the last 15 years? When did you last check them? Might be worth a look.

Oh well, same story, remove, neutralise and clean up.

Replacement Options

I did order another of the Varta replacements, and was thinking about fitting it as before.

But I don't want to see this again in 5, 10 or 15 years time (not sure if either I or this A5000 will still be around in 15 years, but let's not worry about that for now).

Other Options

I have tried various other options on these machines in the past, and never found one that was ideal.

In a couple of machines, I tried CR2032 (non-rechargeable) cells. These need an additional diode fitting to stop them trying to charge.

I also tried a solder in style CR2032, where the diode doubled as a sort of support.

I have tried a set of Eneloop rechargeables, and also a set of plain AA batteries (with a diode).

I think the general problem is none of these machines is being used enough to keep them active.

Off-board Battery

I decided the best option here was to do as planned and fit another NiMH battery, but this time, I will move the battery away from the mainboard.

That should mean it can do no further damage if it does leak again.

The inline connector will also mean it would be easier to replace in future.

The battery is trickle charged when the machine is powered up, I thought I would give this one a head start and put it on the bench supply. I set it to charge at 0.1C (10% of the rated Amp-Hour capacity) on constant current mode.

An hour or so later it had hit the voltage limit and dropped the current.

Fading Memories

With that fitted, I was finally able to get it to power on, but it did not seem to want to go past the minimal boot setup.

These machines have the OS in ROM, including some basic apps.

I had trouble getting it to set the screen mode this time.

This was sort of expected anyway as the auto detect was never designed to cope with a modern LCD, and I think it jumps to a mode which isn't supported.

I managed to get it to display something by powering on pressing T, which inverts the sync. That caused the monitor to display "mode not supported", but that somehow put it in a state where I could then do the power on with 4 held down and I finally got a display.

It generally seemed to be working, and I presumed it was down to my monitor not being compatible, so I wrote up and posted these two repairs to Patreon.

I planned to get a CRT VGA monitor out of storage to be able to test it properly, and then update the post.


The Year is still 2025, just

It took a little longer as it was Christmas, but I eventually managed to find a suitable monitor that should be supported. When I powered it on, it had forgotten the settings again.

I went through the reset process again, and it was running, but it didn't seem to be remembering the settings after the power was removed, and not accepting some of the settings at all.

I checked the PCF8538T chip, which stores those values and also the date and time with a 32.768KHz watch crystal (the bodge wire was from 2014)

It was getting power both when the machine was on, and from the battery, but just didn't seem to be retaining the settings.

I buzzed out all the pins to check for connections around the board, and all seemed well.

The chip communicates via I2C, so I tapped into the signals and tried to see what was going on, but it seemed to be garbage.

Replacement Chip

The chip is out of production, and is also an unusual package, larger than a SOT8, but smaller than a DIP8.

I was considering designing a microcontroller based replacement, one that would interface to the same I2C and would store the settings in it's internal EEPROM, removing the need for the battery. It wouldn't keep the time, but it would keep the settings, which seems more important.

That initially seemed an easy option, but was getting increasingly complicated with various clock, timer and alarm modes, and I didn't know which would be required.

Before I got too far into coding that, I had a look around and found some replacement chips on ebay. I still had the microcontroller replacement plan as a fall back if these turned out to be faulty or remarked fakes or whatever, so I ordered some.

A cut tape arrived with what looked like genuine New-Old-Stock parts.

The right unusual package, and the old style screen printing, so I thought it was worth a go. Not sure of the date code, but it looks 1990s?

I removed the old chip and the old bodge wire, cleaned up the board and rechecked all the connections.

I fitted the new chip and a new bodge wire (now including the top of C153 which was making connection, but looked a little dodgy after a cleaned it up).

Time to put it all back together.

This time, I was able to store settings and get a full size picture on my monitor.

All seemed good, I was able to enable the hard drive and save the screen settings.

All was fine until I tried to access the hard drive, it couldn't open it. 

The name was just showing up as "4".

There is a built-in verification program, so I tried to verify it.

Oh dear.

It seemed OK up to a point and then kept finding faults.

There could be several reasons:

  1. The hard drive had failed, it is 30+ years old.
  2. The corrosion has damaged some traces to the IDE connector (it is right next to the battery).
  3. The hard drive is not configured correctly. (don't see where I can change CHS settings?)
  4. Something else in the system is at fault and stopped the IDE working.

Remotely Testing the Hard Drive

Given the age of the drive, I thought it might be good to rule out that having failed. Date code looks like January 1992.

The trouble is, it is not just old, it is really old, early days for IDE.

Before LBA (Large Block Addressing), and auto-detect. This is the type of drive where you had to set the drive type in the BIOS and check the CHS settings (Cylinders, Heads, Sectors) with the drive datasheet (and let's not get into real CHS vs virtual CHS settings).

I have tried USB-IDE adapters in the past on drives like that, and they don't recognise them, and there is potential to corrupt the drive if the wrong settings are used.

Likewise a modern BIOS would be no good. It would need to be old enough to still have the option to set a drive type number, but not too old so that it doesn't have an IDE connector.

I have probably still got a dozens old PCs that would fit into that range, but nothing I can easily lay my hands on.

Trying a Different Hard Drive

There is a similar issue with trying a different hard drive. I know I have a selection of older drives like that (somewhere), but nothing I can easily grab, and nothing that would be formatted appropriately. I have an Acorn RISC PC 600, but I think the drive in that is SCSI.

One thing that I did have was a 64MB Compact Flash card. With a CF-IDE adapter, that should work.

I put what should have been a valid image on it. I was not 100% sure it would work, but the A5000 was 100% sure it didn't.

It was detected, again with the name "4", but the only available option was to low level verify it.

As before, it started well, but then threw up a whole load of errors, just like the old drive.

OK. That is still a useful test. It is not conclusive, but it does seem to point more to the fault being on the mainboard rather than the drive.

IDE Connector

The IDE connector is the larger of the three connectors, right next to the battery (the other two are for floppy drives). There has been damage due to acid leaking from the battery (twice), so maybe some of the tracks have been damaged?

I located the relevant section on the schematic and started checking all 40 pins from the connector to whatever chip they were connected to.

They all seemed to check out fine. The only problem was one I had already found, which was the drive activity LED. That goes along the edge of the PCB, near the battery, and had been eaten away.

That was fixed by a bodge wire directly from the back of the IDE socket to the resistor by the LED socket.

Everything else tested fine.

I am running out of options.

Something Else?

Other than a few control lines from the big gate arrays, the only other parts involved in the IDE bus are the two 74HCT245 buffers, IC49 and IC37.

Those are the bi-directional buffers with enable pins. The sort of parts that are tricky to test. The inputs and outputs always look different as they are only designed to pass data for the brief moments when they are enabled. Ideally you would wire up a logic analyser to a few of the 8 inputs at a time, as well as the corresponding outputs, and the enable and direction lines, and try to spot any differences when the device was enabled.

Yeah, well, the other option is just to replace them. There is a luxurious amount of space around the two chips, making that a fairly easy task.

That was a lot quicker, and is just as easily reversible (if you are particularly bothered about putting the original chips back if they turn out to be OK).

Good start, it is now showing up with the label of "IDEDisc4", and not just "4".

Well, so there you are. It was one (or both) of the 74HCT245s. That was the least likely on my list, but there you go.

Floppy Testing

The other thing I needed to check was the floppy drive. The two floppy connectors are also in the danger zone near where the battery was.

That was a little easier, as I could just insert a floppy disk (or floppy disc as Acorn seem to prefer) and test it out.

Unlike the A3000, the A5000 has a high-density drive, so can handle various formats including PC 720K and 1.44MB, as well as Acorn's 800K and 1.6MB formats.

I also tried reading some of my A3000 disks.

That looks promising.

And away we go.

I don't know how many times I have played through these levels, on a variety of different machines since I got my Amiga 500 in the late 1980s.

Back Together

With all the testing complete, I put it all back together. This time, I moved the battery even further out of the way.

I let it stand unplugged for a few more days (which turned into a week), and after that, it powered up fine with all the settings still in place.

That is now back with it's owners, next service due in 2037.


Adverts

My Tindie store contains all sort of kits, test gear and upgrades for the ZX80, ZX81, Jupiter ACE, and Commodore PET.


Patreon

You can support me via Patreon, and get access to advance previews of blog posts, and progress updates 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.