Hi,
There is a command list (Instruction Set) in each datasheet that tells you how many clock cycles each command takes.
Most commands take just one clock cycle, thus 50ns @ 20MHz.
UART: this is not a microcontroller problem. Echa microcontroller has to do this at the given speed.
You say 9600, N, 8, 1. But ask for one bit. (N, 8, 1 ... does not matter) one bit will be 1/9600 s = 104us
...
The microcontroller just needs one command to put a whole byte (=8 bits) to the UART TX register.
I guess 2 clock cycles (100ns) .. but read the command list.
For transferring 1 byte with N,8,1 you need to transfer 10 bits (START + 8 data + STOP) --> 1.04ms
...
So transferring many bytes to the UART this means:
* 100ns for transferring the byte to the UDR
* wait 1.04ms
.. then transfer the next byte.
Many newbies do this with a "busy wait" between bytes. Consuming 100% of processing power.
More advanced is to use a software_UART_buffer and feed the UDR interrupt controlled.
The interrupt handling maybe just takes 1% of processing power, so you still have 99% of processing power available for doing the main job.
Klaus