# Maximum reliable speed of GPIO pin given only capacitance and no resistance

I looked up information about my microcontroller AT89S52 and I can't seem to figure out the maximum speed I can operate a GPIO pin at.

I'm running it with a 22.1184Mhz clock, and I notice sometimes when I modify a port value, it won't update right away without adding several NOP statements but I don't want to guess. I want to know values so I can adjust code.

This is information from the datasheet I got:

It lists the pin capacitance, but I see nothing about the pin resistance. How do I calculate the resistance here? or is there another way to calculate the maximum reliable pin processing speed?

• Probably doesn't have anything to do with the capacitance. Look at the instruction set to determine if the asm command which loads that register with the output values takes > 1 cycle. Inspect the architecture. Oct 23, 2017 at 5:44
• electronics.stackexchange.com/questions/25551/… check this link , i think you will find your answer. Oct 23, 2017 at 5:44
• How do you determine if there is a delay between "modify port value", and actual "update" of port value? How do you know when do you actually modify the port value? Oct 23, 2017 at 5:46
• Internal impedance of GPIO driver can be estimated from datasheet VoL = 0.45V when IoL = 1. 6 mA. 450 mV / 1.6 mA = 280 Ohms. Port0 has about 140 Ohms. Driving HIGH has much higher impedance (looks like about 3 kOhms), again it can be estimated by voltage drop at specified current. But all this has nothing to do with pin capacitance nor with NOPs. Oct 23, 2017 at 5:53
• There is no such thing as "at the same time" when you have events at two different (and likely independent) places. You have a classic problem of synchronizing a communication between two clock domains. Check literature for keywords "clock domain crossing". Oct 23, 2017 at 14:03

• anything connected to a pin will have its own capacitance which will increase the rise time. ... That makes sense. So If I hooked a GPIO pin of one 89S52 to a GPIO pin of another 89S52, and one 89S52 changed the state of that pin, then I have to make my program on both 89S52's wait 0.86uS (2 machine cycles) in order for it to recognize the changes on the pin?