6502 homebrew: debugging the kit #2 [solved]

If in doubt, start again. That’s not a real saying, but it should be.

As we saw in the last post, the Apatco 6502 breadboard computer was finally wired up but refusing to work. I’d fixed my faulty ROM code, buzzed out all the address and data lines to check they were connected correctly and determined that the reset circuit and clock were functioning as they should.

But something in there was wrong. It had to be a faulty connection. Maybe more than one.

This problem was so baffling I was finally driven to break out the logic analyser that I bought so long ago. It’s one of the cheap 8-channel kind that masquerades as a Salae but is nothing of the sort. I have Sigrok installed on the LattePanda Alpha, my workbench computer.

I wired up the eight channels to the data lines first, and selected ‘Parallel’ as the decoding. Sure enough, it captured plenty of bytes. But none of the values made any sense to me. So I swapped the connections to the lower eight bits of the address bus. Same deal – lots of data, none of it meaningful.

So there was nothing for it. I turned the manual back to page one and started checking that I’d correctly followed each step of the build.

Sod’s Law dictated that the error was among the last bits of wiring I did. It was in the decoder section. Two wires running from the clock and R/W pins on the processor to the 74LS00 quad AND chip had got crossed. Once fixed, the LEDs burst into life in the approved manner – counting from 0 to 255 in binary, repeatedly.

Fun fact: with all LEDs lit, the computer is drawing around 100mA – it’s about 64mA with no LEDs on. Make of that what you will.

With the computer running correctly, I did another capture with the logic analyser. The data still doesn’t make any sense to me, but at least I know it’s right! 😉

That’s Stage 1 finally complete. The next step is to install the advanced kit, with the LCD display and keyboard interface.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.