Manasu24
Newbie level 3
- Joined
- Jan 7, 2015
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Location
- Banglore-27
- Activity points
- 28
Hi,
I have implemented a code in msp430f5438 evm which is working but not as expected.
Well, here is the code for configuring the IrDA mode in USCI of msp430f5438.
the output of this code is
correct me where i am wrong.
msp430f54387 datasheet link
www.ti.com/lit/ds/symlink/msp430f5438.pdf
this is the IR receiver i am using and it is directly connected to the USCI Uart Rx pin which is configured in Irda mode.
tsop38438 datasheet link
www.vishay.com/docs/82491/tsop382.pdf
I have implemented a code in msp430f5438 evm which is working but not as expected.
Well, here is the code for configuring the IrDA mode in USCI of msp430f5438.
Code:
void irda_init(void)
{
UCA1CTL1 |= UCSWRST;
UCA1CTL0 |= 0x00;
UCA1CTL1 |= UCSSEL__SMCLK;
UCA1MCTL |= UCBRF_0 + UCBRS_7 + UCOS16;
UCA1STAT &= ~UCLISTEN;
UCA1IRTCTL |= UCIRTXPL5 + UCIRTXCLK + UCIREN ;
UCA1IRRCTL |= UCIRRXFL5 + UCIRRXPL;// + UCIRRXFE;
UCA1CTL1 &= ~UCSWRST;
UCA1IE |= UCRXIE;
}
void hwi_irda(void)
{
_DINT();
System_printf("IRDATA = %d\t %x\t %c\n",UCA1RXBUF,UCA1RXBUF,UCA1RXBUF);
System_flush();
_EINT();
}
the output of this code is
Code:
in irda init
out irda
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
data=> 255
correct me where i am wrong.
msp430f54387 datasheet link
www.ti.com/lit/ds/symlink/msp430f5438.pdf
this is the IR receiver i am using and it is directly connected to the USCI Uart Rx pin which is configured in Irda mode.
tsop38438 datasheet link
www.vishay.com/docs/82491/tsop382.pdf