I made a circuit in which the data bus P0 of an AT89S52 is connected to the P1 of an AT89C4051 and both clocks are each driven by their own 22.1184Mhz crystal.
I have used a 10K standard pull-up on each of the port pins, but due to the high speed of the crystals, I'm starting to think the resistor value is too high.
I looked at both datasheets and the AT89S52 states maximum current per port pin shouldn't exceed 10mA. This suggests I can get away with a 500 ohm resistor but that would kill my batteries in no time.
Both data sheets state each pin has a 10pF capacitance if Ta = 25 degrees and test frequency is 1Mhz, but my test frequency is more like 2Mhz because many instructions on these microcontrollers execute at 1/12th of a clock cycle. and if I keep executing commands to read data from a port, I want to read quickly.
Sure I can get away with this:
Mov A,P0 nop nop nop nop nop ... Mov A,P0 nop
But as you can see, those nops waste clock cycles.
Given that I have a capacitance and resistor value, I did some math (10K * 20p) and I got 795774.71545948 Hz which is the max speed? or I did something wrong? I used this tool: http://sim.okawa-denshi.jp/en/CRlowkeisan.htm
I picked 20p for the capacitance because I assume when the pins are connected, the capacitor values are added (capacitors in parallel).
So how do I calculate the max speed on the wire between the GPIO lines and if I'm on the right track, just how low can I go with the resistor without causing significant battery drain? should I use 1K? 4.7K?