Continue the educational program =)
Most likely, you will use the hardware USART. So, legs DI and RO must be connected to TX and RX respectively. In the picture you are confused - fix. Legs DE/RE in charge of choosing the direction of flow, 1=transmitting, 0=receiving. Since ATmega have no USART hardware flow control, then the leg will have to pull in software. Safely hang DE/RE on any free output, more convenient. In the beginning of the transfer we will need to raise the output to 1, and after the transfer (USART Tx Complete interrupt) is reset to 0