BigDumbDinosaur wrote:
Well, I've got POC V2.0 running on a different (new) CPLD that I programmed with the tidied-up code. I'll let it go for a few more days and if nothing untoward happens, I'll reprogram the CPLD with the older code and see if that breaks it.
There was a bug in the older CPLD code but that wasn't the cause of the trouble. The trouble was coming from an unsuspected place.
When I did the layouts for both versions of POC V2, I allocated enough room around the ROM so I could piggyback a ZIF socket into the ROM's socket to make it easier to swap out ROMs during firmware development.
¹Attachment:
File comment: POC V2.0 w/ZIF Socket Installed
pocv2_test_eprom.gif [ 2.91 MiB | Viewed 3136 times ]
The ZIF socket I've been using was one I had used in the past for testing ROMs in the empty ROM socket in the Commodore 128. It had gotten quite a bit of use and had laid about for a while before being pressed into service with POC V2. The socket turned out to have an intermittent connection in it.
How did I figure this out, you ask? I couldn't get POC V2.0 to run properly after making nothing more than a cosmetic change to the test firmware code I was using, a change that simply moved some text from one place on the screen to another. In trying to figure out what the heck was wrong, I put the previous (working) ROM back into the ZIF socket and it too seemed to have the same problem. You can imagine the language I used when that happened!
So there I sat, baffled by what was going on, thinking I had a flaky ROM, when it suddenly occurred to me I was overlooking something else, which was the ZIF socket. It made sense: both versions of POC V2 were displaying similar problems,
even with firmware code that had worked before. Also, as I was testing, I was constantly moving the socket from one unit to the other. In other words,
I was moving the source of the problem from one unit to the other when I moved the socket.
With all that stewing in my little dinosaur brain, I yanked out the ZIF socket and plugged the ROM directly into the socket soldered into the board. I powered up, the unit came to life, the POST screen was displayed and the logic probes indicated normal activity on /IRQ and RDY.
I let the unit run like that for several days and then powered off. I unplugged the ROM, put the ZIF socket back in place and put the same ROM in the ZIF socket. Sure enough, the unit didn't boot. Just for grins, I powered down, pressed down on the ROM with my thumb, and then powered up. The unit booted and the probes indicated normal activity.
I also tried the above series of tests on POC V2.1, using a ROM I had burned back in November and knew was functional. Same results: with the ZIF socket installed, sometimes the unit would behave and sometimes it wouldn't.
I have ordered a new ZIF socket, which I hope to receive in the next day or two. Presumably it will function as it should and I can get on with developing firmware.
——————————
¹In future endeavors of this kind, I will solder the ZIF socket into the prototype's PCB instead of piggybacking it on the ROM socket. The only reason I didn't do that with POC V2 was the frugal Irishman in me didn't want the 15 dollar ZIF socket becoming a permanent part of the assembled unit.