1.2 Universal Serial Interface – USI

The Universal Serial Interface (USI) provides the basic hardware resources needed for synchronous serial communication. Combined with a minimum of control software, the USI allows higher transfer rates and uses less code space than solutions based on software only. Interrupts are included to minimize the processor load. The main features of the USI are:

  • Two-wire Synchronous Data Transfer
  • Three-wire Synchronous Data Transfer
  • Data Received Interrupt
  • Wake-up from Idle Mode
  • In Two-wire Mode: Wake-up from All Sleep Modes, including Power-down Mode
  • Two-wire Start Condition Detector with Interrupt Capability

The USI Two-wire mode is compliant to the TWI bus protocol, but without slew rate limiting on outputs and input noise filtering.

Figure 1-3. Universal Serial Interface, Block Diagram

Figure 1-4. Two-wire Mode Operation, Simplified Diagram

The USI Data Register (USIDR) is an 8-bit Shift Register that contains the incoming and outgoing data. The register has no buffering so the data must be read as quickly as possible to ensure that no data is lost.

The USI Status Register (USISR) contains a 4-bit counter. Both the Serial Register and the counter are clocked simultaneously by the same clock source. This allows the counter to count the number of bits received or transmitted and generate an interrupt when the transfer is complete. The clock can be selected to use three different sources; The SCL pin, Timer/Counter0 Compare Match, or from software.

The two-wire clock control unit can generate an interrupt when a start condition is detected on the two-wire bus. It can also generate wait states by holding the clock pin low after a start condition is detected, or after the counter overflows.