USCI Operation: I2C Mode
21-6
Universal Serial Communication Interface, I2C Mode
21.3.1 USCI Initialization and Reset
The USCI is reset by a PUC or by setting the UCSWRST bit. After a PUC, the
UCSWRST bit is automatically set, keeping the USCI in a reset condition. To
select I
2
C operation the UCMODEx bits must be set to 11. After module
initialization, it is ready for transmit or receive operation. Clearing UCSWRST
releases the USCI for operation.
Configuring and reconfiguring the USCI module should be done when
UCSWRST is set to avoid unpredictable behavior. Setting UCSWRST in I
2
C
mode has the following effects:
-
I
2
C communication stops
-
SDA and SCL are high impedance
-
UCBxI2CSTAT, bits 6-0 are cleared
-
UCBxTXIE and UCBxRXIE are cleared
-
UCBxTXIFG and UCBxRXIFG are cleared
-
All other bits and registers remain unchanged.
Note: Initializing or Reconfiguring the USCI Module
The recommended USCI initialization/re-configuration process is:
1) Set UCSWRST (
BIS.B #UCSWRST,&UCxCTL1
)
2) Initialize all USCI registers with UCSWRST=1 (including UCxCTL1)
3) Configure ports.
4) Clear UCSWRST via software (
BIC.B #UCSWRST,&UCxCTL1
)
5) Enable interrupts (optional) via UCxRXIE and/or UCxTXIE
Содержание 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 ...