How long should I wait for the pin to settle after setting the internal pullup on a digital pin, before reading it and being sure to get the correct value? I want to check if a normally vacant pin has been held to ground. The pin has been floating for a few microseconds since reset. So, I'm wondering roughly how many clock cycles to wait before reading. My MCU is running at 8 or 16 MHz.
I was on the fence about whether to post in programming questions or hardware questions sections. I suppose it is half about practice of programming and half about electrical hardware characteristics, so I picked here in the programming section.