Don’t be cheap, you’ll be sorry later…
For three days I have now been trying to get the board running correct. First i found that i had forgotten to set a stackpointer pointing to a place in RAM and thought thats why I could not get the return from subroutine to work. I fixed that and saw in analyzer log that it was writing return address to correct place but when it was reading it back it got wrong… So…
Then I saw that the RD signal was not behaving correct. The R/W was fine but after the GAL that generates the RD it never got correct. So I took the GAL and set the circuit up on a breadboard. And when I tested that I found that the delay from when I get an in signal to when the chip sets an output is 580ns! Ha! The cycle time for the E clock on the board is 500ns. That means that I will never be able to get a correct RD signal using that GAL. Now to be fair, I bought, what I thought was, cheep 10ns GAL16v8 of Aliexpress. Sooo… I guess I had it coming. New GALs are ordered from Elfa now. Real ones!