USCI Operation: I2C Mode
21-12
Universal Serial Communication Interface, I2C Mode
I
2
C Slave Receiver Mode
Slave receiver mode is entered when the slave address transmitted by the
master is identical to its own address and a cleared R/W bit is received. In slave
receiver mode, serial data bits received on SDA are shifted in with the clock
pulses that are generated by the master device. The slave device does not
generate the clock, but it can hold SCL low if intervention of the CPU is required
after a byte has been received.
If the slave should receive data from the master the USCI module is
automatically configured as a receiver and UCTR is cleared. After the first data
byte is received the receive interrupt flag UCBxRXIFG is set. The USCI
module automatically acknowledges the received data and can receive the
next data byte.
If the previous data was not read from the receive buffer UCBxRXBUF at the
end of a reception, the bus is stalled by holding SCL low. As soon as
UCBxRXBUF is read the new data is transferred into UCBxRXBUF, an
acknowledge is sent to the master, and the next data can be received.
Setting the UCTXNACK bit causes a NACK to be transmitted to the master
during the next acknowledgment cycle. A NACK is sent even if UCBxRXBUF
is not ready to receive the latest data. If the UCTXNACK bit is set while SCL
is held low the bus will be released, a NACK is transmitted immediately, and
UCBxRXBUF is loaded with the last received data. Since the previous data
was not read that data will be lost. To avoid loss of data the UCBxRXBUF
needs to be read before UCTXNACK is set.
When the master generates a STOP condition the UCSTPIFG flag is set.
If the master generates a repeated START condition the USCI I
2
C state
machine returns to its address reception state.
Figure 21−10 illustrates the the I
2
C slave receiver operation.
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...