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.

MSP430FR2433: MSP430FR2433+DS1621 (I2C)

Part Number: MSP430FR2433

Hi, I'm trying to read the DS1621 temperature sensor on I2C using MSP430FR2433.
Is there any example of code (read/write registers of the I2C device) for the IAR ASEMBLER?

Anything helps!

Thanks,
Vitaly

  • Hi Vitaly,

    You can download the Code Example for MSP430FR2433 here:  

    After extract the zip package, you could find the assembly example code in below folder. However, there is no example for I2C. You may need to take the SPI example code and the I2C example code in C program language, which could be found in the zip package, as your reference.

    \slac700c\MSP430FR243x_MSP430FR253x_MSP430FR263x_Code_Examples\Assembly_IAR

  • File Name Description
    ----------------------------------------------------------------------------------------
    msp430fr243x_1.s43 Toggle P1.0 using software
    msp430fr243x_adc10_01.s43 ADC, Sample A1, AVcc Ref, Set LED if A1 > 0.5*AVcc
    msp430fr243x_adc10_02.s43 ADC, Sample A1, internal 1.5V Ref, Set P1.0 if A1 > 0.5V
    msp430fr243x_adc10_10.s43 ADC, Sample A2/A1/A0, internal 1.5V Ref.
    msp430fr243x_adc10_11.s43 ADC, Sample A1, internal 1.5V Ref, TA0.1 Trig, Set P1.0 if A1>0.5V
    msp430fr243x_adc10_21.s43 ADC, Window Comparator, 1.5V ref, Timer trigger, DCO
    msp430fr243x_CRC.s43 CRC16, Compare CRC output with software-based algorithm
    msp430fr243x_CS_01.s43 Configure MCLK for 8MHz sourced from DCO.
    msp430fr243x_CS_02.s43 Configure MCLK for 8MHz and XT1 sourcing ACLK and FLLREF
    msp430fr243x_CS_03.s43 Configure MCLK for 16MHz operation, and REFO sourcing FLLREF and ACLK
    msp430fr243x_CS_05.s43 Configure MCLK for 16MHz operation, and XT1 sourcing FLLREF and ACLK
    msp430fr243x_euscia0_uart_01.s43 eUSCI_A0 UART echo at 9600 baud using BRCLK = 8MHz
    msp430fr243x_euscia0_uart_03.s43 USCI_A0 External Loopback test @ 115200 baud
    msp430fr243x_framwrite.s43 Long word writes to FRAM
    msp430fr243x_lpm3_01.s43 Enters LPM3 with ACLK = XT1CLK = 32768Hz.
    msp430fr243x_mpy_01.s43 16x16 Unsigned Multiply
    msp430fr243x_mpy_10.s43 32x32 Unsigned Multiply
    msp430fr243x_mpy_11.s43 32x32 Unsigned Multiply Accumulate
    msp430fr243x_P1_01.s43 Software Poll P1.3, Set P1.0 if P1.3 = 1
    msp430fr243x_P1_03.s43 Software Port Interrupt Service on P1.3 from LPM3
    msp430fr243x_ta0_01.s43 Timer0_A3, Toggle P1.0, CCR0 Count Mode ISR, DCO SMCLK
    msp430fr243x_ta0_02.s43 Timer0_A3, Toggle P1.0, CCR0 Up Mode ISR, DCO SMCLK
    msp430fr243x_ta0_04.s43 Timer0_A3, Toggle P1.0, Overflow ISR, 32kHz ACLK
    msp430fr243x_ta0_16.s43 Timer0_A3, PWM TA0.1-2, Up Mode, DCO SMCLK
    msp430fr243x_ta0_17.s43 Timer0_A3, PWM TA0.1-2, Up Mode, 32KHz ACLK
    msp430fr243x_ta0_20.s43 Timer0_A3, PWM TA0.1-2, Up/Down Mode, 32kHz ACLK
    msp430fr243x_ta0_22.s43 Timer_A, Ultra-Low Pwr Pulse Accumulator
    msp430fr243x_ta0_capture.s43 Timer0_A3 Capture of ACLK
    msp430fr243x_ta1_05.s43 Timer1_A3, Toggle P1.0, CCR0 Cont Mode ISR, 32KHz ACLK
    msp430fr243x_ta1_06.s43 Timer1_A3, Toggle P1.0, CCR0 UP Mode ISR, 32KHz ACLK
    msp430fr243x_ta1_16.s43 Timer1_A3, PWM TA1.1-2, Up Mode, DCO SMCLK
    msp430fr243x_ta1_17.s43 Timer1_A3, PWM TA1.1-2, Up Mode, 32KHz ACLK
    msp430fr243x_uscia0_spi_09.s43 eUSCI_A0, SPI 3-Wire Master Incremented Data
    msp430fr243x_uscia0_spi_10.s43 eUSCI_A0, SPI 3-Wire Slave Data Echo
    msp430fr243x_uscia0_spi_11.s43 eUSCI_A0, SPI 4-Wire Master Incremented Data
    msp430fr243x_uscia0_spi_12.s43 eUSCI_A0, SPI 4-Wire Slave Data Echo
    msp430fr243x_WDT_01.s43 WDT, Toggle P1.0, Interval Overflow ISR, DCO SMCLK
    msp430fr243x_WDT_02.s43 WDT, Toggle P1.0, Interval Overflow ISR, 32kHz ACLK
    msp430fr243x_WDT_04.s43 WDT, Failsafe Clock, WDT mode, DCO SMCLK
    msp430fr243x_WDT_05.s43 WDT, Reset on Invalid Address fetch, Toggle P1.0
    msp430fr243x_WDT_06.s43 WDT, Failsafe Clock, WDT mode, 32kHz ACLK


    I2C.s43?????????
  • Hi Vitaly,

    There is no IAR assembly example code for I2C. You could take below SPI  code example as reference and porting the I2C example code in C(\slac700c\MSP430FR243x_MSP430FR253x_MSP430FR263x_Code_Examples\C ) to assembly.

    msp430fr243x_uscia0_spi_09.s43 eUSCI_A0, SPI 3-Wire Master Incremented Data

    msp430fr243x_uscia0_spi_10.s43 eUSCI_A0, SPI 3-Wire Slave Data Echo

    msp430fr243x_uscia0_spi_11.s43 eUSCI_A0, SPI 4-Wire Master Incremented Data

    msp430fr243x_uscia0_spi_12.s43 eUSCI_A0, SPI 4-Wire Slave Data Echo

  • Hi Vitaly,

    I haven’t heard back from you, I’m assuming you were able to resolve your issue. If not, just post a reply below (or create a new thread if the thread has locked due to time-out)

**Attention** This is a public forum