29.4.1 Initialization

  1. Select either external or internal clock by writing the Operating Mode value in the Control A register (CTRLA.MODE).
  2. Select either asynchronous or synchronous communication mode by writing the Communication Mode bit in the Control A register (CTRLA.CMODE).
  3. Select the pin for receive data by writing the appropriate Receive Data Pinout value to the Control A register (CTRLA.RXPO).
  4. Select the pads for the transmitter and external clock by writing the appropriate Transmit Data Pinout bit to the Control A register (CTRLA.TXPO).
  5. When using an internal clock, write the Baud register (BAUD) to generate the desired baud rate.
  6. Enable the transmitter and receiver by writing ‘1’ to the Receiver Enable and Transmitter Enable bits in the Control B register (CTRLB.RXEN and CTRLB.TXEN).
  7. Enable the module by writing ’1’ to the Enable bit in the Control A register (CTRLA.ENABLE).