This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR4133: for I2C, difference between UCB0CTL1 and UCB0CTLW0

Part Number: MSP430FR4133

Hello,

I am using the I2C peripheral on the msp430fr4133 micro. I see that in some of the related code examples they use the register UCB0CTL1.

But, in the reference manual I can't find this register in the I2C section - it seems for this module the register UCB0CTLW0 is used. Do you know why this is the case, and what the difference is, if any?  Which register should I use?

thanks,

Stu

  • Hi Stu,

    The UCB0CTLW0 register is a word (16 bit) accessible register that is made up of 2 8-bit registers (UCB0CTL0 & UCB0CTL1). Please see below:

    UCB0CTL0 corresponds to the upper 8 bits of UCB0CTLW0, and UCB0CTL1 corresponds to the lower 8 bits of UCB0CTLW0.

    You can use the single 16 bit register (UCB0CTLW0), the 2 8-bit registers (UCB0CTL0 & UCB0CTL1), or combinations of both throughout your code. All ways are valid.

    Thanks,

    Mitch

**Attention** This is a public forum