This morning my scope arrive at the FedEx store down the street. So I picked it up and came to my lab (Liberty Bar which is a cafe by morning).
The first thing I did was power it up. Then calibrated my probes.
I ran the code that should work but didn’t. But this time it did after I jiggled the board and hit reset. Then I put in the code that didn’t work.
The part that’s new is that it uses RAM with push and pop. I put in a loop like this:
I inspected the CS line on the SRAM chip. Solid 5V. So it’s not reading RAM. So I looked at the A14 and A15 lines from the CPU. Little bumps on A15-A14 where A13-A4 went all the up to 5V. That meant bus contention. Since it’s on A14 and A15, it’s obviously related to the bank switching.
So some inspection there led me to the reason. The Flash programmer had temporary lines to the bank switcher as well as the flash chip. So it was plugged into A14 and A15 on both sides of the bank switcher. Which meant the input and output of the bank switcher were connected. There’s a contention.
I took those wires off and voila! It worked. At least, it worked once I got the assembly in shape. It successfully ran a RAM test.
Now that it works again, it’s back to the driver code. And jekyll and pygments on the side.
Having a scope will definitely speed things up in development. If only I had a logic analyzer… ;-)