the pull-up resistors on every read instead. That's a better technique
and also makes other things more consistent -- e.g. reading back 0xFF
if a chip identification is attempted when a chip isn't installed.
The problem was that the data bus would "remember" the last data I wrote
to it if a chip was not driving the data bus on a read, so it would
think that the chip had returned the correct data. I fixed it by writing
the opposite data to the data bus before a verification read.
is completely removed from the SIMM -- in that case, the verification
still passes for some reason. I'm still debugging this one. Maybe the
data I had just written is still essentially on the bus because of the
floating pins and it reads it too fast? Maybe turning on pull-ups would
help with that?
I also changed the port module so it doesn't needlessly update the data direction register over SPI if it's being told to set the same value it had before.
It does add some complexity to the code. I may be going through a chain of calls just to turn the CS pin on, for instance. Hopefully I'm not going too crazy with this.
Anyway, this means that I can control the ports from a SIMM electrical test routine using the same types of functions that the actual programming controlling code would use, without having to duplicate a bunch of port definitions and bit manipulation. I made sure to add all the functions I can think of needing to the ports module. We'll see if I got them all!