Friday, May 1, 2026

Retirement Project: SWTPc 6800 (with 6809) Resurrection

In 2022, I documented my ancient SWTPc 6800 Computer System, which I had upgraded with several home-brew cards. It had been 25 years since I had last used the computer, but this ancient machine fascinated me. I wanted to record what I had done, as I'd forgotten a lot.

During this process, I plugged in one of the I/O cards incorrectly -- off by one pin. Normally, there's an index pin that prevents this, but some of my cards don't have the plug that blocks the pin. 

Sadly, when I powered it on, smoke was immediately released from one of the chips. After correcting that board, I found the system completely inoperable. This computer was 45 years old at the time, and I had many other projects that needed more attention. I decided that fixing it would be something I could do in my retirement. 

And, it remained broken until this year. You see, I've retired, so it was time debug this monstrosity.

When I originally built the CPU boards for this machine, I borrowed a 32-channel HP Logic analyzer. That allowed me to fix the bugs in the hardware and the software alike. But I long-ago lost access to such equipment. I had little more than the original kit manuals, schematics and notes, plus a digital voltmeter and an oscilloscope.

Symptoms

After the smoke let out, the machine crashed on reset. I could see from the front-panel LEDs that the CPU had gotten completely lost -- with every 4KB block LED illuminating dimly. This is characteristic of a crash. 

Debugging

Initial step established what was working on the machine. I removed all the cards from the motherboard. I checked the power supply voltages on the motherboard:
  • +8v: +8.3v
  • +12v: +14.15v
  • -12v: -14.06
These unregulated voltages were nominally good. I verified that several of the bus signals were pulled high on the motherboard, such as RESET*. Everything seemed good.

I added the Bit Rate Generator board. It supplies all the serial bit rates on the SS-30 bus. I couldn't find any clock rates using the oscilloscope. Looking at the original schematic and the MC14411 data sheet, I found one thing missing. The data sheet recommends a 15 M Ω feedback resistor across the crystal. My circuit had none. Other designs used a 1 M Ω resistor. So I added one. Now I found all of the bit rate clocks present. Funny that it worked before. 

Next was the 6809 V2 CPU board. The LEDs would light up on reset, then go into the characteristic crash. Examining the important signals on the bus:

  • RESET* - goes low for 0.1-0.3s, then high
  • HALT*, BREQ*, MRDY, NMI*, IRQ*, FIRQ* -- all staying high. 
  • BA, BS - both low -- this means that the CPU is actively controlling the bus
  • E* and Q* - these clocks running at 2 MHz, as expected, this mean the CPU was alive at least
  • VMA* - cycling, meaning the CPU was attempting to access the bus
  • R/W* - cycling as expected
  • D0*-D7* - each data bus pin showed signs of normal activity
  • A0-A15 - the Address bus had problems on two pins
    • A3 - activity limited to 0v to 1v
    • A14 - activity stuck around 0v
This was good news. The CPU was working and attempting to process instructions, as evidence by the clocks, the BA/BS status pins, and the data bus activity. 

The address bus seemed to be the source of difficulty. When the I/O board was plugged in incorrectly, one of the chips received -12v, and that same chip was also connected to A3. As there are no buffers on A2 or A3 between the SS-30 and SS-50 bus, it is possible the 74LS244 address bus buffers could have been damaged. That didn't explain A14, but it made sense.

I swapped out both 74LS244 chips, and the CPU board now acted correctly -- polling the E block of memory, where the I/O resides. The E LED was brightly lit.

An MP-S board was added next. Since it was not connected to the A3 line, it was unlikely to be damaged. I needed something to function as a terminal to connect to the MP-S. I fashioned a DB-25 to DB-9 cable and hooked it to a USB serial port on my MacBook Pro. Pressing RESET brought up the "BBUG v1.91" prompt. YES! After nearly four years of being non-functional, my old computer was able to run the ROM monitor. 

Using the capabilities of the BBUG monitor, I set about diagnosing the other parts of the system. Since the last time it was operation, I expanded the CPU board memory from 64 KB (really 56-60 KB) to 256 KB (really 248-252 KB). I set about testing to make sure all of this additional RAM was functional. Because the MC6809 processor can't access more than 64 KB of memory at once, I had to do this in steps. I manually re-programmed the DAT to use different blocks, leaving the D, E and F blocks alone. The additional memory worked great.

With the CPU card functional, I set about to determine what else was working. 

Working on the I/O slots, something was amiss with the MC6840 on the bit rate generator board. A 74LS04 inverter connected to the A3 bus line had apparently been damaged. Swapping it out restored operation to the MC6840.

The 5 1/4" Floppy Disk Controller (FDC) board was the one that had been plugged in wrong. A 74LS139 that let the smoke out had been replaced, and everything seemed to be working. Similarly for the 8" FDC board. Both boards would respond properly to basic commands, even with no disk drives connected.

The Tanner/Digital Research 64KB RAM board was next. It took some experimentation to discover how to address its extended memory address. I found that the BBUG "Q" command, which does a memory test, can be fooled by bus capacitance. That's a bug that needs to be fixed. While the memory appears to be present, at least some of the time, there appear to be some address or data convergence problems. I haven't quite sorted that out yet. 

Next Steps

There are still issues that need resolution. I've attempted to boot FLEX/09, but it fails rather quickly. It appears to be properly loading the boot loader off the first sector of the disk, but for some reason does not appear to be able to load FLEX.SYS. I think my problem is that I don't have 5 1/4" boot disks set up for these 80-track drives. Most of my use of FLEX was limited to 8" disks, and those drives aren't yet connected.

An attempt to boot into OS-9 Level I also failed, even though I have several 5 1/4" boot disks. That's going to take more time to diagnose. It could be there's other damage to the 5 1/4" FDC board that I haven't isolated yet.

Thursday, April 30, 2026

Claude Helps with the Automatic Antenna Selector

Automatic Antenna Selector
I thought I was nearly finished with the Auto Antenna Selector. During my first week of retirement, I finally managed to locate something I had been looking for months -- A male-to-male DE15 cable. 

This cable connects the Auto Antenna Selector to the AUX port of a K3. I bought two of these a couple of years ago, and I easily found one. But the second one eluded me. Without it, I couldn't test the Selector in Design C (Dual Radio) mode. I had done all my testing in Design B (Single Radio) mode. 

Having the proper cables, I did my testing and found several bugs. Some of them were going to be difficult to fix. Part of the problem was my approach. I had organized my antenna selection table by the selections, then by band. This made it difficult to determine the choices available per band. So, I organized the table by band, then listed the choices. From this, I could determine which choices were available for a given band, skipping over those that would conflict with an existing port. 

This greatly simplified the code for making the mode selections, which are very different in Design B (Single Radio) and Design C (Dual Radios). In Design B, the first selection is assigned to the first port, so there can only be three additional choices. In Design C, only one port is selected per radio, so we can potentially use all four selections (so long as there's no conflict with the other radio).

Design C bugs were all addressed, and Design B worked better than ever.

Before I retired, I'd been messing around with Anthropic's Claude Code. I was curious what Claude might think of the firmware, so I requested an in-depth code review.

Claude Code came up with a number of good suggestions. It found some dead code, made several type suggestions, a minor code re-organization, and way better comments.

What impressed me, though, was that Claude Code had a deeper understanding of the particular PIC processor that I did. It suggested I turn on the Watch-Dog Timer (WDT). That I change how Timer 0 (TMR0) was used. And, that I use the PMD register to power-down the modules that I wasn't using in the device. 

I thought I was using TMR0 correctly. And I knew about the WDT, I just didn't think it was necessary. But the PMD register I knew nothing about. All of these suggestions seemed like a good idea to me, so I made them.

All in all, Claude Code did eight rounds of review of this code. It made a couple of suggestions that I knew were wrong, and it took corrections well. 

The next day, I burned a chip and plugged it in the unit for testing.

It bricked, Nothing. Not even a single flash of the LEDs on startup.

Somewhere in the midst of Claude's suggestions, we had changed the software in a way that it no longer worked at all. 

I made a new branch of the code and backed out some suggestions. I determined it had nothing to do with the WDT or PMD register. That left something amiss with TMR0. This could be a problem with Microchip Code Configurator (MCC).

I had switched TMR0 to use the HFINTOSC. It was programmed to generate an interrupt every 5 ms. Except it didn't work. I switched it back to us the LFINTOSC, also programmed for every 5 ms, and it worked as expected. I'm not sure why it didn't work with the HFINTOSC, but having several oscillators gives one options. I'm happy it works.

Once it was working again, I walked through all of the Design B and Design C test scenarios. Everything worked with flying colors. 

AI is certainly useful, even for amateur radio projects. Just don't blindly trust it. Remain in the loop for all changes.


Sunday, March 22, 2026

Polishing Up the Rx Antenna Controller

Many software projects are never fully complete, as there's always something to add with a small change to the software. The Rx Antenna Controller isn't any different. 

The initial version of this project was basically done. But pressing the antenna selection buttons resulted in a response on the serial port. This could cause problems with computer control if the response was not anticipated.

I added a new command: &AI; and &AIn;. This gets and sets the Auto-Info mode, respectively. With &AI1;, pressing an antenna button results in an &ARn; response on the serial port. &AI0; turns off Auto-Info mode -- button presses do not result in a serial port response. The default is &AI0;.

I"m very happy with the way this project has turned out. While I have ideas for a Version 2, it mostly involves hardware changes to the remote switching box to allow selection of the AUX antenna for diversity reception.



Saturday, February 21, 2026

Rx Antenna Controller

Rx Antenna Controller is QRV.
I started building this unit a couple of months ago. I called it the Beverage Controller, because my motivation was to select amoung the three Beverage antennas I had erected. Yes, I've managed to erect three 500 foot Beverages, one to the NE, SE and NW.

Performance of these antennas is convincing -- 1-2 S-units lower noise than the inverted-L or dipole antennas I use on 160 and 80m, respectively, plus a directional signal boost if the beverage is pointed in the right direction.

I discussed my design issues with this unit in the previous article. Debugging the serial port took another month.

Serial Port Debugging

The reason I had chosen the PIC16F18426 for this design was because of the built-in EUSART. Receiving worked just fine. I could send commands to the controller and it would act on the commands. But it sent no response. 

I had configured the PIC to use RC5 (pin 5) for the EUSART receive input, and RA5 (pin 2) for the EUSART transmit output. After a bit of troubleshooting, I found no action on RA5. It remained at 4.5 V the entire time. Was this a wiring problem, or a programming problem?

I ended up writing another PIC project and setting up a chip on a solder less breadboard to solve this. This project simply sent "Hello World!" at 300 baud every 5 seconds. It also drive two LEDS on the C port pins. The LEDs which alternate during a 1-second startup. When transmitting, the second LED would light up. 

My serial test project worked perfectly. LED 2 flashed for about 1/2 second every five seconds, just as expected. So, why didn't the beverage controller project work?

I modified the beverage controller project to also send "Hello World!" every 5 seconds. Except it didn't work. I traced the wiring in the controller head. RA5 was connected to the MAX232E pin 11. It was the MAX232E that was driving the pin to 4.5 V. With the MAX232E out of the circuit, RA5 stayed at 0 V all the time. It was like the software had configured RA5 as an input, not an output.

I got to the point that I could test both projects on the solder less breadboard. I even programmed the same chip with the serial test project -- and it worked. Programmed the same chip with the beverage controller project -- and it didn't. This was definitely a programming problem.

I tried several modifications of the configuration, eventually applying the serial test project configurations to the beverage controller project. At some point, it started working. I still don't understand what I changed to make it work.

Putting It Together
Remote relay box

After such a struggle, I was happy to finish. I re-programmed the chips to send and receive at 9600 baud. This is plenty fast enough for this purpose.

The controller supports one Kenwood/Elecraft-style command, which takes two forms - a Get and a Set operation:
  • Get - &AR; -- responds with &ARn; where n is 1 through 5
  • Set - &ARn; where n is 1 through 5 -- selects the antenna specified by n, responds with &ARn;
With the serial port transmit working, I could remotely interrogate the controller to determine which receiving antenna was currently selected. And selecting an antenna would respond to ensure that the controller had received my command.

The controller mounts nicely on the equipment shelf. I used some temporary stick-on labels until I find my computerized label-maker. 

What's Next

The current firmware sends an &ARn; response when a button is tapped. I probably need to make that configurable with a serial command.

I've also thought about adding a scanning feature. The controller could automatically switch antennas after a few seconds. Holding a button could add/remove that antenna from the scan.

However, after a couple of months of using the controller, I've found a glaring deficiency in my design. The Rx Antenna Controller only selects one antenna for the RX ANT port. I use a broadband splitter to also connect to the AUX port for diversity reception. But this only permits diversity reception of one receiving antenna against the transmit antenna. I can't do diversity reception between two receiving antennas. 

What would be nice is to have the remote relay box select the antenna for the RX ANT and AUX port. This would require twice as many relays and a way to control them individually. Doing this requires a re-design of both the remote relay box and the controller box. 

Wednesday, February 4, 2026

Beverage Controller

Remote and controller boxes laid 
out for wiring.
With these Beverage antennas, I needed a way to switch between them quickly and easily. 

Taking a cue from the K9AY Controller, I didn't want to just hook up a rotary switch. I wanted a push-button controller. Plus, a lot of the time I'm remotely operating my station on FT8 from the house, I wanted that capability as well. 

Design

I planned for at least three Beverages, maybe more. Plus I had the K9AY loops. That's at least four antennas, having a fifth would give me a spare.

The buttons and indicators needed to be convenient to operate, up front in the station without being intrusive. 

The receiving antenna feed lines also needed to terminate at the Single Point Ground (SPG). Best option was a remote relay box to do the switching, and a small controller box containing the buttons and indicators.

Test positioning the Controller
Adding a serial port to the controller allowed the antenna selection to be interrogated and selected. I already the PIC16F18426 chips on hand. This 14-pin device has a built-in EUSART. A MAX232 would handle the RS-232 level conversion.

Construction

I found a small Bud box in my junk box for the remote. I ordered a die-cast aluminum box for the controller. It was small, but it fit very nicely up under the shelf supporting the P3. Convenient and unobtrusive.

Remote mounted on SPG
The remote has six RF connectors - four F-connectors for the Beverages, one BNC for the K9AY, and another BNC to connect to the K3. SPDT relays are used. When selected, the relay connects the antenna port to the K3 port. When unselected, an appropriate resistor connects across the antenna port. ( I used 82-ohm resistors for the F-connectors, 51-ohm for the BNC -- closest I had to 75 and 50 ohms, respectively )

I used 12 V relays. Unlike the KK1L 2x6 Antenna Switch, I didn't want to activate each relay with a separate line for +12 V. Instead, I sent +12 V to the remote box on a common conductor and then returned a signal for each relay to be grounded by the open drain pins on the PIC. 

This lead to a design problem. The PIC doesn't support true open drain outputs. Each pin is clamped to Vdd, which in this case is +5 V. That left about 6 or so volts across each relay, pulling them all in. 

To solve this, I added 2N3904 NPN transistors to the relay box as open collector drivers for each relay. A 3 K resistor connects the base of each transistor back to the PIC. Instead of a logic 0 activating the relay, a logic 1 does the same job.

The controller box is really tight. I borrowed five switches from the K1EL Keyer. The LEDs and switches barely fit. The controller itself is simple. Five RA port pins connect to the pushbuttons. Five RC port pins drive the LED indicators and NPN relay driver. One RA pin and one RC pin communicate with the serial port. 

Changing the sense of the relay switching required re-wiring of the LEDs. Before, they were tied to +12 with the cathode of each LED brought to ground by the PIC. Except that didn't work due to the design problem. Instead the cathodes went through a common 330 ohm resistor to ground, and the anodes were connected across the activation lines for each relay.

Debugging

I debugged this design in parts, starting with the controller box, then the relay box separately. Once I connected them together, I found the design problem that required much re-wiring. 

The button selection worked great. The serial port has been more of a problem. While the PIC receives commands correctly, it doesn't appear to transmit anything at all. It is a puzzlement. 

Tuesday, December 30, 2025

Beverage(s)

View 175 feet down NW Beverage.
My initial experience with the 2024 ARRL 160m contest demonstrated a serious noise issue on Ward Mountain. The Inverted-L showed an S4 noise level. I needed low-noise receiving antennas.

I'd had some success with the half-size K9AY loops at the Gwinnett station. But I could use something better.

At contest stations such as NQ4I or WW4LL, I've had the opportunity to use Beverage antennas. But  never at my home station.  I planned to change that. 

The Plan

Having a bit of acreage, there's room for several beverages.The key directions were to the NorthEast (NE), SouthEast (SE) and NorthWest (NW). 

For 160m Beverages, many recommend at least 550 feet of wire, minimum. This is just a bit over one wavelength long. ( Technically, using a velocity factor of 95%, one wavelength of wire should be 520 feet at 1.8 MHz ) Since they don't make spools of 550 or 520 feet of wire, a 500 foot spool should be sufficient. 

Wire is expensive. A 500 foot spool of stranded 14 gauge THHN wire is $78 at Home Depot. 

Beverage antennas are pretty simple. The long piece of wire is fed against ground at both ends. The near end uses a matching transformer to adapt the nominal 500 ohm impedance of the Beverage to a feedline. The far end contains a terminating resistor. 

Beverage terminators (above) and
transformers with F-connectors (below)
Terminator Boxes

I built five Beverage terminator boxes using a 470 ohm 2W resistor (OY474KE Ceramic composition resistor) and a 75v gas discharge tube.

These parts fit snugly in a small plastic box. Thumbscrews make for easy connection to the antenna and ground rod.

Transformer Boxes

500:75 ohm transformer
Beverage transformers are wound on BN-73-202 cores. Primary is 3 turns using red wire-wrap wire. Secondary is 8 turns yellow wire-wrap wire. The primary and secondary are separated using cut off bits of plastic stirring straws. The 3:8 turns ratio is a good match for 75 ohm coaxial cable used to feed the antenna. 

Transformer assembly progression
Transformers are housed in the same small plastic boxes. An F connector jack supplies the transformer primary. Transformer secondary connects to thumbscrew posts with another 75 V gas discharge tube across them. There is no common ground connection between the primary and secondary -- this avoids noise pickup from the feedline. 

Thumbscrews connect to the antenna and ground rod at the feed point.

I built four transformers initially. The small plastic boxes work necessitated a bit of ingenuity to get everything in place. 

Erecting

Single wrap traps wire
Installed insulator
Being surrounded by forest, the Beverages are suspended from trees aligned with the reception path. Screw-in electric fence insulators are used to support the antenna about 8 feet off the ground. 

A rope around a tree supplies modest tension for the wire at each end. This leaves the ends relaxed to connect to the transformer or terminator boxes and ground rods. 

The technique for installing the beverages is straightforward, I start by locating the feed point transformer near a supporting tree and mounting an insulator there. Once the ground rod and tension rope are installed, it's a matter of going from tree to tree installing insulators and hooking the wire. This continues until you reach the end of the wire, where the ground rod, terminator box and tension rope are located. 

Terminator installed
Tension connection
At the transformer and terminator, the wire to the ground rod zig-zags a bit to take up the slack from the insulator. This keeps the plastic box from flapping around in the wind.

Every attempt is made to keep the Beverage straight toward the target heading. A bit of direction change to make supporting trees is tolerable. I used the iPhone Compass app to keep me on heading. 

At my location, the terrain slopes a bit. For the NW beverage, after the first 175 feet, the drop-off is quite gradual. 

The NE beverage is another story. Terrain drops about 10 feet in the first 200 feet, but the last 300 feet drops about 80 feet. The beverage terminator ended up in the bottom of a deep ravine. Navigating the slope was quite difficult. Rocks, branches and other debris on the forest floor made for tricky footing. Be careful out there.

Feed Line

I caught a deal on some RG-6. I found 700 feet on a spool for less than $20 at the Dalton, GA hamfest. RG-6 is cheaper than stranded wire. A 500 foot spool is $50 at Home Depot. This 75-ohm coax makes for a good receive antenna feedline. It's cheap, low-loss and easy to match.

Performance

Only have a little experience with these antennas. NE Beverage has been up a month, and the NW Beverage a week. 

Performance is amazing. 

On the 160m Inverted-L, there's typically S4-5 noise. Noise level on the Beverage antennas varies depending on the time of night, but is typically 1-2 S-units lower. 

More importantly, signal levels are stronger. If I watch the Elecraft P3 panadapter, switching from the Inverted-L to one of the Beverages, the noise level drops somewhat, but the signals rise above even more. Sometimes, when there are no visible signals on the Inverted-L, many are Q5 copy on a Beverage.

Further, switching from one Beverage to the other can have a dramatic effect on signals. Sometimes, signals that are strong on one are inaudible on another. Other times, signals are about the same.

In short, the Beverage receive much better than the Inverted-L. During the recent Stew Perry TBDC, I listened on the Beverages almost exclusively. 

They work.

Saturday, December 27, 2025

New Modes for the Auto Antenna Selector

Automatic Antenna Selector in use
I wrote previously about debugging selection modes for the Auto Antenna Selector. With that working, I wondered if I could do more. 

Originally, I thought that modes should swap the selections on the A and B ports. With Standard Mode, I was missing that. But how to allow more modes?

Flip-Flop Mode

I don't need Test Mode that often. Holding down the mode button could be divided into a short and long hold. A long hold -- 1 second or more -- would invoke Test Mode. A short hold -- 1/4 of a second, could invoke something else. 

Flip-Flop mode was born. With a short hold, the selections for Port A and B are swapped. This works both in single-radio and two-radio configurations.

The selector signals Flip-Flop mode by blinking the mode LED on and off over 1/2 second. As coded, it actually pulses for 1/2 second, then is off for 1/2 second. Not what I intended, but distinctive. I decided I didn't need to "fix" it.

Testing

Unlike the last code changes, these worked the first time. I found Flip-Flop mode helpful with the single radio when trying to use a different antenna with the AL-80A amplifier. Since it is only connected to the antenna on Port A, this mode makes this possible.

At the moment, tapping the mode button in Flip-Flop Mode doesn't do anything, still thinking about that.