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.

IR receiver and Msp430

Other Parts Discussed in Thread: MSP430F5438

i want some sample code and explanation on how to interface the IR receiver with MSP430F5438 EVM.

and want to know is there any external hardware required for interfacing the TSOP34838 IR receiver with MSP430.

or can it be directly connected to USCI Rxd pin to receive the IR data. 

  • A link to the datasheet would have been nice.
    Well, this 'receiver' basically is a photo diode with some signal shaping (integrated amplifier).
    Supply voltage is 2.5 to 5.5V, so if you source both from same supply (e.g. 3.3V), you should have no problem connecting the sensor output to one of the MSP input pins directly. Since the sensor generates a pulse output (open collector with pull-up) rather than an analog one, you can directly use any digital input pin. Probably one with port interrupt or timer capture interrupt capability.

    If the signal you transmit is UART protocol compliant, then yes, connecting it directly to the RX pin should work.

    BTW: "I want" is a bad way to start a forum request. This is not a 'solve my problem for free' forum. And that you bought a piece of hardware does not entitle you to demand any demand beyond plain product support. (buying a camera doesn't entitle you to get support from a writer and a director for your movie)

  • here the link to the data sheet of IR receiver i am using.

    and 

    http://www.ti.com/lit/ds/symlink/msp430f5438.pdf

    this is  the link to the msp430f5438 datasheet.

    here in msp430f5438 datasheet it is mentioned that the IrDA encoding and decoding mode is available in USCI UART.

    so i am confused whether directly may i directly connect the tsop receiver which just produces demodulated signal to the msp430 USCI port which is configured for the Irda encoding and decoding mode. 

  • Thank you for giving some usefull information when i am alone in this huge ocean of electronics Mr.Micheal.
  • Mr.Jean Micheal Gross,
    i have used the Uart in Irda mode with my msp430f5438 by directly connecting the tsop receiver to the USCI in Irda mode RXD pin.
    and it is working.
    but as i want to include this concept with respect RTOS and currently in the TI drivers library it doesnot have any Inbuilt API to confugure the USCI UART into Irda mode.
  • this is the code i am using and its working


    void irda_init(void)
    {
    UCA1CTL1 |= UCSWRST;
    UCA1CTL0 |= UCMSB;
    UCA1CTL1 |= UCSSEL__SMCLK + UCSWRST;
    UCA1MCTL |= UCBRF_0 + UCBRS_7 + UCOS16;
    UCA1IRTCTL |= UCIRTXPL5 + UCIRTXCLK + UCIREN ;
    UCA1IRRCTL |= UCIRRXFL5 ;// + UCIRRXFE;
    UCA1CTL1 &= ~UCSWRST;
    UCA1IE |= UCRXIE;
    }
    void hwi_irda(void)
    {
    System_printf("=> %d\n",UCA1RXBUF);
    System_flush();
    __delay_cycles(10000);
    }
  • can you please suggest on the TI drivers API which doesnot contain any inbuilt API to configure USCI UART into IrDA mode.

    THANK YOU IN ADVANCE.
  • Hi Sunil,

    It sounds like you have working IrDA code now, but you are unsure how to incorporate this into TI-RTOS? (you referred to an RTOS but I was not sure if you were using TI-RTOS or some other RTOS?).

    If you are using TI-RTOS and having difficulties, it might be best to post in the TI-RTOS forum here: http://e2e.ti.com/support/embedded/tirtos/ They should be able to better help you with integrating new code into TI-RTOS if you cannot find an existing driver for it, or how to modify their existing UART driver.

    Regards,

    Katie

  • Thank you very much Katie Pier for your usefull information which directed me a lot
  • HI Guys,

    As i was saying that i have got some output by using above code.
    but here it is giving the output as 255 repeatedly and always.
    so where am i wrong and correct me if possible suggest me some reference code of Ir signal decoding using UART irda mode.
    THANK YOU IN ADVANCE.
  • I took a look at the receiver datasheet. It seems the receiver does some demodulation by itself.
    It seems the TSOP382x/384x is designed to be used in pair with a TSALxxxx transmitter, where the transmitter begins to emit pulses on a low input and stops when the input goes high.
    The MSP won't see the pulses generated by the transmitter, only a smooth low or high level. So unless you feed an IrDA signal (which is pulsed by itself) into a transmitter that generates HF pulses on top of the IrDA signal, then you won't see an IrDA signal on the MSP input that could be interpreted as data.
    IrDA gives a high pulse with 3/16 bit length for each 0-bit. Your IR transmitter generates a low signal during an incoming burst of at least 10 pulses. With 38kHz carrier, this means a maximum of 3800 bursts per second. However, since a burst has to be 3/16 of a 0-bit, you're limited to 712Bd. (using 600Bd would mean ~12 cycles per burst)
    Set UCIRRXPL=1, so the UART will detect low pulses, as generated by your sensor for incoming signal bursts.
  • Thank you very much for clarifying my doubts in this.Mr.Micheal Gross

**Attention** This is a public forum