A96G140/A96G148/A96A148 User’s manual
15. USI
161
15.4
USIn external clock (SCKn)
External clocking is used in synchronous mode of operation. External clock input from the SCKn pin is
sampled by a synchronization logic to remove meta-stability. The output from the synchronization logic
must be passed through an edge detector before it is used by the transmitter and receiver. This process
introduces two CPU clock period delay. The maximum frequency of the external SCKn pin is limited up-
to 1MHz.
15.5
USIn synchronous mode operation
When synchronous mode or SPI mode is used, SCKn pin will be used as either clock input (slave) or
clock output (master).Data sampling and transmitter are issued on the different edge of SCKn clock
respectively. For example, if data input on RXDn (MISOn in SPI mode) pin is sampled on the rising
edge of SCKn clock, data output on TXDn (MOSIn in SPI mode) pin is altered on the falling edge.
CPOLn bit in USInCR1 register selects which SCKn clock edge will be used both for data sampling and
data change. As shown in figure 84, when the CPOLn is zero, data will be changed at rising SCKn edge
and sampled at falling SCKn edge.
Figure 86. Synchronous Mode SCKn Timing (USIn)
15.6
USIn UART data format
A serial frame is defined to have one character of data bits with synchronization bits (start and stop bits),
and optionally a parity bit for error detection. USART supports 30 combinations of the followings as a
valid frame format: