This is my circuit in relevance to my question:
I apologize for the messy wiring, but I did it that way to make my PCB production substantially easier.
My problem is I only have 10 wires available to write to and read from RAM with. Of those 10, 8 are connected directly to the P1 pins of an AT89C2051 for direct data communication with the micro controller. I have used up all my remaining GPIO pins for other tasks and I only have two remaining. One for clock, and one for data.
I can easily select a ram address with this circuit, but what I want to do is be able to choose whether to read from or write to ram without using any more GPIO lines from the micro controller.
One source online states I can't connect WR and OE with an inverter for bus contention reasons.
I thought to use the 74HC138 decoder chip but then I think there's a more efficient way where the data loaded in serially won't trigger a WR or OE pin unnecessarily, but I'm not sure. Perhaps the 74HC138 is the wrong way to go?
How do I solve this?
P.S. I have quite a few parallel ram chips and I don't want to be suggested to replace my circuit with serial ram because I want to use my RAM I have.