Monday, 19 January 2026

Scoping out a UK101

The first thing to measure when repairing a retrocomputer is the main oscillator. In a UK101, this is called CLK and found on U58 pin 3.

CLK (8MHz)

 This is divided by U29 and sent to the processor from pin 11 as Phi0 and reaches the counting chains as C0.

Phi0 (1Mhz)

The processor uses Phi0 to produce the processor clock Phi2. This is sent from U8 pin 39 to the hardware devices which populate the address and data buses.

Phi2 (1Mhz)

The counting chain is made up of U59, U60, U61 and U30. These divide C0 into C1-C15. About halfway along the chain are C8-C10, which are fed into the character generator's address lines A0-A2.

C8 (7.8kHz)

Ultimately this produces a Composite Video signal on J2 pin 12.

Video (15.5kHz)

So it's fairly certain that when this is connected to a monitor, there will be some sort of picture!

(This work also turned up an error in the serial clock generation. C3 (125kHz) is used to produce the transmit  clock TxCLK. However while the former is OK, the latter is missing: further investigation is required.)


Tuesday, 6 January 2026

Solving a simpler problem

Project Euler is a popular site among enthusiasts of mathematics and programming problems. A very common template for its problems goes something like:

Let F(n) be some function expressed in words. You are given that F(100) is some relatively small number. Find F(10^7).

 Often the best approach to such problems is to write a brute-force solution which gets the correct answer for the given data to verify that you understand the problem. Then examine the order of growth of this brute-force solution, say O(n^2), to determine what the best approach is, maybe O(n*log(n)), given that Project Euler says that all of its problems are solvable in under a minute.

This approach works well for software because it's easy to code up a brute-force solution and play around with it. It's not so useful for hardware for a similar reason: it isn't so easy to build hardware prototypes.

Nevertheless the MicroUK101 described last time was an attempt at a test-bed for those chips in the UK101 which weren't testable with Arduinos: the 6502 CPU and 6850 ACIA. A working MicroUK101 would verify that those chips were working too.

Unfortunately when assembled, it didn't work! Now what? Last time I tried to strip it back to the bare essentials required to test a 6502: a power supply, reset circuit and CPU clock. When this didn't work as expected, I had assumed that the 6502 had gone bad. This assumption was incorrect.

Time passed and recently I bought an OWON vds1022i USB oscilloscope and decided that an easy first task would be to fix the MicroUK101. Very quickly I discovered that the clock circuit wasn't oscillating at 4MHz as it ought to: according to the scope it was oscillating at 40MHz!

The simpler problem required another simpler problem: build the clock circuit on a bread-board and try to make it work there before making any changes to the PCB version. The problem turned out to be the 680R resistors in the clock oscillator: these did not provide the stability required, at least with the choice of crystal and 74LS04 I had on hand. Upping the resistors to 4k7 fixed the issue and with it the MicroUK101.

MicroUK101 by Grant Searle and Steve Gray

Incidentally if I were making changes to Steve Gray's PCB, I would drop the power switch and RS-232 interface, using only an FTDI adaptor to power the board and talk to it.