I need to to use the UART with even parity enabled on an Atmega328p
anyone know what C code I need to add please ?
Found the following on the web but don't know how to implement for flowcode
seems that register UCSR0C is responsible for parity but don't know how to .
void serial_init ( unsigned short ubrr ) {
UBRR0 = ubrr ; // Set baud rate
UCSR0B |= (1 << TXEN0 ); // Turn on transmitter
UCSR0B |= (1 << RXEN0 ); // Turn on receiver
UCSR0C = (3 << UCSZ00 ); // Set for async . operation , no parity ,
// one stop bit , 8 data bits
}