![Maxim Integrated MAX32660 Скачать руководство пользователя страница 133](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484133.webp)
MAX32660 User Guide
Maxim Integrated
Page 133 of 195
12.3
I
2
C Overview
12.3.1
I
2
C Bus Speeds
The I
2
C peripherals support standard mode, fast mode, fast-plus mode and high-speed mode for I
2
C communications. All
modes are downward compatible and operate at a lower bus speed as necessary.
12.3.2
I
2
C Transfer Protocol Operation
The I
2
C protocol operates over a two-wire bus: a clock circuit (SCL) and a data circuit (SDA). I
2
C is a half-duplex protocol:
only one device is permitted to transmit on the bus at a time. The data rate is not fixed and can dynamically operate up to
100kHz in Standard Mode and up to 400kHz in Fast Mode.
Each transfer is initiated when the bus master sends a START or repeated START condition followed by the address of the
slave peripheral. Information is sent most significant bit (MSB) first. Following the slave address, the master exchanges data
with th a r ss slav . h mast r can transmit ata t th slav a ‘writ ’ p rati
n) or receive data from the slave (a
‘r a ’ p rati n . n ackn wl g bit is s nt by th r c iving vic aft r ach byt is transf rr . Wh n all n c ssary ata
bytes have been transferred, a STOP or RESTART condition is sent by the bus master to indicate the end of the transaction.
After the STOP condition has been sent, the bus is idle and ready for the next transaction. After a RESTART condition is sent,
the same master begins a new transmission. The number of bytes that can be transmitted per transfer is unrestricted.
12.3.3
START and STOP Conditions
A START condition occurs when a bus master pulls SDA from high to low while SCL is high, and a STOP condition occurs
when a bus master allows SDA to be pulled from low to high while SCL is high. Because these are unique conditions that
cannot occur during normal data transfer, they are used to denote the beginning and end of the data transfer.
12.3.4
Master and Slave Overview
I
2
C transmit and receive data transfer operations are initiated by first loading the data to be sent in the I
2
C FIFO by writing
data to the
register. Once the transaction has completed, the data received can be read from the FIFO by reading
data from the
register. If a slave sends a NACK in response to a write operation, the I
2
C master generates an
interrupt to the core. The I
2
C controller can be configured to issue a STOP condition to free the bus.
The receive FIFO contains the received data. If the receive FIFO is full or the transmit FIFO is empty, the I
2
C master stretches
the clock to allow time to read bytes from the receive FIFO or load bytes into the transmit FIFO.
12.3.5
Slave Addressing
The first byte transmitted after a START condition is the slave address byte. If seven-bit addressing is used, the address byte
consists of seven address bits and one R/W bit.
The I
2
C peripheral in the MAX32660 supports both 7-bit and 10-bit addressing. However, some slave addresses are reserved
for special purposes by the I
2
C specification, including, but not limited to the following:
•
Address 0b0000 0000 is a General Call Address and all slave devices recognize this address.
•
Address 0b0000 0001 is used as a START condition for older devices.
•
Address 0b1111 1x
1
x
2
1 is a r qu st f r a slav vic ’s vic .
•
Address 0b1111 0x
3
x
2
x
1
indicates that the I
2
C master is initiating 10-bit addressing mode. The 3 most significant
bits of the 10-bit address are x
3
x
2
x
1
.
Содержание MAX32660
Страница 4: ...MAX32660 User Guide Maxim Integrated Page 4 of 195 8 UART 84 9 Real Time Clock RTC 96 10 Timers 105...
Страница 7: ...MAX32660 User Guide Maxim Integrated Page 7 of 195 15 Trademarks 195 16 Revision History 195...
Страница 14: ...MAX32660 User Guide Maxim Integrated Page 14 of 195 Figure 2 1 MAX32660 High Level Block Diagram...