Protecting microcontroller output
If you are only worried about connecting two outputs together, where both of those signals are guaranteed to be operating at 3.3V with a common ground, then you just need to choose a resistor that will limit the pin output current to something below its maximum value...you don't need to worry about damaging the input protection diodes. A 100\$\Omega\$ resistor would limit the current to 33mA in the absolute worst case. I would think that something like 200\$\Omega\$ would be a safe choice for general use.