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.

CCS/MSP-TS430DA38: MSP430F2252

Part Number: MSP-TS430DA38
Other Parts Discussed in Thread: MSP430F2252

Tool/software: Code Composer Studio

HI SIR,

i am used i2c sample code(MSP430f2252) from TI Resource explorer using interrupt... Its possible for without interrupt in I2C? using msp430f2252. if possible can you give sample code...

thanking you

Siranjeevi.M

  • Hey Siranjeevi,

    As you mentioned, there are many I2C examples in resource explorer here: dev.ti.com/.../

    Unfortunantly, they all use ISRs so I don't have a polling based I2C example. The best way to do this would be to take the working example you have and poll the IFG flags instead of using the interrupts.

    Why do you not want to use interrupts?

    Thanks,
    JD
  • Hey JD,
    thank you for answer the question,

    As my TL asking without Interrupt make code I2C for polling method. The problem is I2c and Uart both code can integrated can not work. but separately build work good. i also found error in my code #pragma vector = USCIAB0TX_VECTOR line to error:"Type gmake: Target 'all' not remade because of errors" i just delete this line no error , what is use of #pragma?can you explain details of that.

    my I2C code has run and check its good. but integrate time only getting problem of error..
    Can you solve my problem ..

    Thanking you
    Siranjeev
  • Hey Siranjeev,

    This #praga is loading the interrupt vector for the USCIAB0TX interupt. Basically, it's telling the MCU what code to run when there is an interrupt. There can only be one ISR per interrupt vector.

    On the MSP430F2252, both USCI A and USCI B share the interrupt, so your UART and I2C both need to be in the same ISR. You need to combine the code from both code examples into 1 single ISR. Inside the ISR, there should be a switch statement to determine what event triggered the interupt and handle it accordingly.

    Unfortunantly, I don't have an example using both UART and I2C at the same time.

    Does that help?

    Thanks,
    JD

**Attention** This is a public forum