I was reading documentation on UART on AVR and it looks simple: when a flag (bit
RXC0 of register
UCSR0A) is set to 1, it means the micro controller has new data for you, and you read this from register
But something boggles my mind: How does the micro controller know that we have read the data? Or, in other words, after it received the first byte on UART, the flag is set to 1, but when is it set back to 0?