plasmo wrote:
So all you need are two 75ohm series termination resistors close to pin 8 and pin 12 of 74HC04.
Thank you for this Bill, again. Very detailed response with good explanations. It makes much more sense now.
So I eliminated the resistors on H1, H2, and H4. I also added one to PHI2.
But now I have a question: Would this reflecting signal change the characteristics of the '161? So, going back to the schematic, I have CLK input, and then H1, H2, and H4 output. Everything else is tied high or an NC output. So the ONLY thing that could change this '161s behavior would be CLK. On the PCB, CLK goes from the oscillator to the '161 very quickly. CLK also travels to the '590s pretty quickly, but takes forever to get to the '04. If CLK were to ring enough to make the '161 tick twice, I'd have MUCH bigger issues then a little flicker. Let's do some analysis:
CLK leaves the oscillator, hits the '161, which then changes H1, H2, and H4. Meanwhile CLK finally hits the '04 making /CLK. H1, H2, H4 start travelling to the '10 NAND logic, and outputs /LATCH. /CLK now travels to the '377, but is affected being high-to-low. /LATCH travels to the '377 and the '166s and stabilizes. Later the oscillator inverts CLK, traveling to the '04, making a new /CLK, and then to the '377, where it finally latches.
So let's say that the '161 was much faster than what it typically is, as that is the current thought. That means that H1,H2,H4 arrive even earlier, we get /LATCH even earlier, but still the '377 waits for /CLK rising edge. I don't see how it would have changed anything by being faster than expected. Though H4 inverted is PHI2, so perhaps PHI2 comes out faster than expected. But that part was not affected, the 6502 was running everything just fine.
It was only a flicker on the screen, which really comes down to the VGA color output. Backtracing: Color Resistors <- Shift Registers (controlled by /CLK and /LATCH) <- Video RAM (PHI2 on /OE) <- '590s (again PHI2 on /OE) <- CLK. So if it were the shift registers, perhaps they were getting hit with an extra /CLK (causing an extra black pixel) at times, but that's not affected by the '161. If /LATCH got to the shift registers too early, it would still have to wait for /CLK. Ultimately a faster '161 makes /LATCH faster, but it always waits on /CLK. A faster '161 could also make PHI2 faster, but that seems unaffected on the processor side, and that wouldn't cause flicker. Video RAM and '590 /OE lines are on PHI2, so if those happen faster than expected, I could get weird results on the color-data bus. But again those shift registers are waiting for /CLK. The other thing that could possibly change is a tiny bit of glue logic for /WRITE for the Video RAM, but I would have to be actively writing to the Video RAM to affect that, and the flicker was happening regardless of that (I write and then infinite loop essentially).
I am not seeing how a faster '161 would affect anything. A slower '161 could mess up all kinds of things, but physical experiments point to that it was not too slow, but too fast.
GARTHWILSON wrote:
so I'm not sure an effort at terminating with a "matching" resistor will do much good
Thank you Garth, I appreciate the help, and the math! So, what I'll do is put a <= symbol next to the 75 ohm resistor silkscreen, because technically is running with 0 ohm resistors right now.
I think one of the bigger things I could do is make a better IC layout, make these particular signals as short as possible. And that is what I'm doing now. I actually did a proto-test with the VCC/GND lines, and then ran auto-router, and it finished in almost 30 minutes, which is amazingly fast (for the program I'm using). This means the new board layout is pretty good.
I'll keep this bad '161, and will test it on the next revision, but if it does or doesn't work with the added series termination resistors and better board layout, I am going to keep going forward and no longer worry about it, regardless.
Thank you Bill and thank you Garth. I appreciate all of the help here.
Chad