ATA5771 ATMEL Corporation, ATA5771 Datasheet - Page 174

no-image

ATA5771

Manufacturer Part Number
ATA5771
Description
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATA5771
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATA5771-PXQW
Manufacturer:
ATMEL
Quantity:
218
122
ATtiny24/44/84
Figure 14-4
is only the physical layer that is shown since the system operation is highly dependent of the
communication scheme used. The main differences between the master and slave operation at
this level is the serial clock generation which is always done by the master. Only the slave uses
the clock control unit.
Clock generation must be implemented in software, but the shift operation is done automatically
in both devices. Note that clocking only on negative edges for shifting data is of practical use in
this mode. The slave can insert wait states at start or end of transfer by forcing the SCL clock
low. This means that the master must always check if the SCL line was actually released after it
has generated a positive edge.
Since the clock also increments the counter, a counter overflow can be used to indicate that the
transfer is completed. The clock is generated by the master by toggling the USCK pin via the
PORTA register.
The data direction is not given by the physical layer. A protocol, like the one used by the TWI-
bus, must be implemented to control the data flow.
Figure 14-5. Two-wire Mode, Typical Timing Diagram
Referring to the timing diagram
SDA
SCL
1. The start condition is generated by the master by forcing the SDA low line while keep-
2. In addition, the start detector will hold the SCL line low after the master has forced a
3. The master set the first bit to be transferred and releases the SCL line (C). The slave
4. After eight bits containing slave address and data direction (read or write) have been
5. When the slave is addressed, it holds the SDA line low during the acknowledgment
ing the SCL line high (A). SDA can be forced low either by writing a zero to bit 7 of the
USI Data Register, or by setting the corresponding bit in the PORTA register to zero.
Note that the Data Direction Register bit must be set to one for the output to be
enabled. The start detector logic of the slave device (see
detects the start condition and sets the USISIF Flag. The flag can generate an interrupt
if necessary.
negative edge on this line (B). This allows the slave to wake up from sleep or complete
other tasks before setting up the USI Data Register to receive the address. This is done
by clearing the start condition flag and resetting the counter.
samples the data and shifts it into the USI Data Register at the positive edge of the SCL
clock.
transferred, the slave counter overflows and the SCL line is forced low (D). If the slave
is not the one the master has addressed, it releases the SCL line and waits for a new
start condition.
cycle before holding the SCL line low again (i.e., the USI Counter Register must be set
to 14 before releasing SCL at (D)). Depending on the R/W bit the master or slave
shows two USI units operating in two-wire mode, one as master and one as slave. It
S
A B
C
ADDRESS
1 - 7
R/W
(Figure
8
D
14-5), a bus transfer involves the following steps:
ACK
9
E
DATA
1 - 8
ACK
9
Figure 14-6 on page
DATA
1 - 8
ACK
9
8006G–AVR–01/08
123)
F
P

Related parts for ATA5771