2.4.1.4 Configure the USART
After converting the received analog data using the ADC, the data can be sent further to be analyzed by the user. To transmit the data to the developing computer host, the USART peripheral module will be used. On the AVR128DA48 Curiosity Nano board, the USART1 RX (receiving) and TX (transmitting) pins are connected directly to the debugger pins, so the user will be able to send data to the computer without additional wires. Therefore, the USART peripheral module used in this application will be USART1.
After introducing the module to the project, some initial configurations must be done.
- Hardware Settings
- Mode: Async Mode
- Baud Rate: 9600
- Enable USART Transmitter: checked
- Parity Mode: No Parity
- Stop Bit Mode: 1 stop bit
- Character Size: 8 bit
The settings are presented in Figure 2-18.