6.1 Synchronous Mode

Figure 6-1. USART Communication Mode (CMODE) Bit Field in Control C Register

The CMODE bit field in the CTRLC register controls the communication modes.

The disadvantage of the Asynchronous mode is that the receiver chip and the transmitter chip need to use the same baud rate, and exact timing is required. The asynchronous protocols use a separate line for the clock signal, so the chip that generates the clock dictates the communication speed, which is much more flexible in terms of exact timings and creates two roles in the communication: The server that generates the clock and the client that receives the clock.

In the Synchronous USART mode, an additional clock pin, XCK, is used. Same as the RX and TX pins, XCK has a default pin, and changing the PORTMUX register will also change XCK. Configuring the XCK direction decides if the device is a server (generates clock) or a client (receives clock).

To activate the Synchronous mode:

  • Configure the XCK pin (PC2) direction as output;
    PORTC.DIR &= ~PIN2_bm;
  • Write 0x01 to the CMODE bit field in the USARTn.CTRLC register.
    Figure 6-2. USART Communication Mode
    USART1.CTRLC = USART_CMODE_SYNCHRONOUS_gc;

An MPLAB MCC generated code example for AVR128DA48 with the same functionality as the one described in this section can be found here: