Is this an accurate model of a microcontroller pin?
The logical diagram will very depending on the MCU you consider.

The ATMega328 datasheet shows a logical diagram of a GPIO pin in section 18.2 you might use as a general introduction.