Well, how exciting. The first versions of the PCBs for the Zolatron 64 6502-based homebrew computer have arrived, and they are very pretty. Which is just as well…
I say that because at least some of these boards will serve no purpose other than as decoration. I’d made some mistakes – one annoying, one stupid but survivable, and one idiotic and disastrous. And as this blog is all about sharing my experiences, I knew I should confess my sins here, in the hope that others may learn from them.
As soon as I started making up the main board – which houses the 6502 CPU, RAM, EEPROM and glue logic, I got that sinking feeling. Something wasn’t right.
For a start, the 28-pin zero insertion force (ZIF) socket wouldn’t fit in the holes, no matter how hard I pushed. I’d specified regular size holes that you’d use with most through-hole devices. But a closer inspection of the pins of the ZIF socket revealed that they are somewhat fatter, in one direction at least.
Well, no matter. These things are no obstacle to a man with a Dremel. A cutting disk soon had the pins slimmed down just enough to fit in the holes. Not that it would matter.
I can’t remember what tipped me off to the next problem. I think it was the direction that one of the traces was taking. “Surely that should be going to the RAM, not the EEPROM [or the other way around],” I thought. I went back to the PCB layout in KiCad and – sure enough – the write-enable line coming from the 74HC00 chip was going to where I thought I’d be plugging in the EEPROM. That couldn’t be right.
Somehow, I’d swapped the RAM and EEPROM chips.
The most likely explanation was a moment’s inattention in KiCad. For those not familiar with the software, here’s a quick overview of the process.
You draw up your schematic, using symbols for the various components. Then you use a form-like page to assign a ‘footprint’ to each component. Whereas a schematic symbol is just a diagrammatic representation of a component, the footprint describes its physical connection to the PCB – the holes and pads to which it will connect. A single component, although it will have one symbol, may work with several different footprints depending on the version of the component you decide to use and other choices.
The Zolatron 64 uses the AS6C62256 RAM chip and the AT28C256 EEPROM. Both are available in 28-pin 15.24mm-wide DIP chips. But while I decided the RAM chip could go in a normal socket, I wanted the EEPROM in a ZIF socket, because I’m going to be swapping this out very frequently.
When assigning footprints to components I simply got these two mixed up, so the RAM ended up in the ZIF socket. And during all the time that I was laying out the board in KiCad’s PCBnew I didn’t twig the error. The swap shouldn’t have any effect on how the board worked. It’s just there was no room to put a ZIF socket in the place were the EEPROM is now located.
Ah well. I just soldered ordinary sockets into both locations. Didn’t need that filed-down ZIF after all.
I fixed the error in the footprint assignments and went back into the PCB designer to change the layout appropriately. It didn’t take much – just a few traces needed re-routing. The two chips have identical pinouts. While I was there, I changed the pads in the footprint for the ZIF socket so I won’t have to do any filing in the future.
And the revision allowed me to make one change that pleased me. On the original layout, two of the ICs (the 6502 and the 74HC00) face in one direction and the RAM and EEPROM in the other. On the revised board I was able to turn the 74HC00, so now most of the chips face the same way.
The big one
Once everything was soldered into place and I’d checked my solder joints for shorts (none!), I powered up the board without any chips inserted as an initial smoke test.
Okay. Then I plugged in the chips and tried again. Still no smoke, but the board did seem to be drawing a lot of power.
I fired up the oscilloscope and searched for signs of life. The clock signal was all over the place. I buzzed out connections. And then I noticed something ominous.
Some time earller, I’d put a sticky label on the 6502 CPU chip and marked most of the important pins. The centre of this label was turning a disturbing shade of brown. A quick poke with a finger confirmed it was hot. Very hot.
I pulled the power and looked for the source of the problem. With the multimeter still in continuity mode I quickly discovered that the VCC pin on the chip was connected to GND on the backplane connector – and vice versa.
Had I screwed up the backplane connections? Maybe got them upside down?
I checked the connections from the other chips and various strategic places on the board to the VCC and GND lines on the connector. They were all connected as expected. It was just the 6502 that was wacky.
I went back to the schematic and then back to the datasheet for the 6502 – and that’s where I found my error.
I’d drawn up my own symbol for the 6502 in KiCad. And I’m in the habit of using the names VCC for the power and GND for, well, the ground. But the datasheet uses VDD for power and VSS for ground. And I’d mixed up these two connections. Gah!
I’d reversed the polarity of the power connections to the 6502. Chips don’t like that sort of thing. They get angry. And hot. And most likely dead.
I fixed my symbol. Then I reworked the PCB layout again. This time it was a slightly tougher revision.
I’ve ordered new boards from JLCPCB, which will probably take about two weeks to arrive.
Ah well. Another learning experience. The question now is what to do with the other four copies I have of this board. I’m thinking of combining them with my other version 1 PCBs in some sort of mosaic.