Infrared with msp430

Everything related to protocols and IR codes
TuranOlmez
Posts: 10
Joined: Sat Mar 16, 2019 1:10 pm

Infrared with msp430

Post by TuranOlmez »

Hi,
i want blink led when the button is pressed on another msp430 with infrared signals.
How can i do this?
User avatar
AnalysIR
Site Admin
Posts: 793
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Infrared with msp430

Post by AnalysIR »

I guess the obvious answer is...the same way you would do it on any platform.

However:
- First get the button press and blink features working.
- Then create some code to send an ir signal
- then create some code to decode that signal.

Once all of these are working individually, proceed to integrate them.

I am not sure if IRremote is ported to or has a fork that supports this platform. If not you would have to write everything from scratch.

If possible use something like an NEC IR protocol.
TuranOlmez
Posts: 10
Joined: Sat Mar 16, 2019 1:10 pm

Re: Infrared with msp430

Post by TuranOlmez »

Thank you,
i will use infrared first time and i don't know which infrared transmitter-reciever pair should i use? also which protocol should i use? can you suggest me a protocol and recever-transmitter pair please?
User avatar
AnalysIR
Site Admin
Posts: 793
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Infrared with msp430

Post by AnalysIR »

which protocol should i use?
As mentioned above the NEC Protocol.
can you suggest me a protocol and recever-transmitter pair please?
We have lots of options available on our WebShop.
Check out the A.IR Shield Nano or the DIYIR kit or the IR starter Kits.

Otherwise: TSOP3448 as IR receiver & TSAL6100 or TSAL6200 as IR Emitter. Vishay is our preferred manufacturer of quality IR components.

There are lots of examples about IR on our blog. (links above)

Also, check out the following site which is a good introduction to IR remote comtrol protocols.
https://www.sbprojects.net/knowledge/ir/nec.php
TuranOlmez
Posts: 10
Joined: Sat Mar 16, 2019 1:10 pm

Re: Infrared with msp430

Post by TuranOlmez »

User avatar
AnalysIR
Site Admin
Posts: 793
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Infrared with msp430

Post by AnalysIR »

NO - that will not work properly.


Please refer to my previous post again.
TuranOlmez
Posts: 10
Joined: Sat Mar 16, 2019 1:10 pm

Re: Infrared with msp430

Post by TuranOlmez »

Thank you
TuranOlmez
Posts: 10
Joined: Sat Mar 16, 2019 1:10 pm

Re: Infrared with msp430

Post by TuranOlmez »

AnalysIR wrote: Mon Mar 18, 2019 9:39 am NO - that will not work properly.


Please refer to my previous post again.
Hi again,
I produce PWM signal from transmitter side. A few seconds later reciever led turns off. What can be the reason?
Here is my codes:
//Transmitter
#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop the Watch dog timer
while(1) {
P1DIR |= 0x0C; // P1.2 and P1.3 output
P1SEL |= 0x0C; // P1.2 and P1.3 TA1/2 options
CCR0 = 12; // PWM Period/2
CCTL1 = OUTMOD_6; // CCR1 toggle/set
CCR1 = 6; // CCR1 PWM duty cycle
TACTL = TASSEL_2 + MC_3; // SMCLK, up-down mode
return 0;
}



//Reciever
#include "io430.h"
int main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD; //Stop WDT
BCSCTL1 = CALBC1_8MHZ; //Set DCO to 8Mhz
DCOCTL = CALDCO_8MHZ;
P1DIR =0xFF;
P1OUT =0x00;
P2DIR &= ~BIT0;
while(1)
{

if(P2IN == 0x00) // IF IR IS HIGH

{
P1OUT =0xFF;

__delay_cycles(1000000);//GIVE SOME DELAY
}
else
{
P1OUT =0x00;
__delay_cycles(1000000); // GIVE SOME DELAY
}
}
}
return 0;
}
User avatar
AnalysIR
Site Admin
Posts: 793
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Infrared with msp430

Post by AnalysIR »

please post the circuit for youe receiver & transmoitter along with a phot of the wiring.

What is the model# of you receiver & transmitter.

rgds
TuranOlmez
Posts: 10
Joined: Sat Mar 16, 2019 1:10 pm

Re: Infrared with msp430

Post by TuranOlmez »

i'm using TSOP 1838 and TSAL 6200

my transmitter's anode is connected to 1.2 pin and catode is connected to 30 ohm resistor and ground.

my reciever is connected to vcc,ground and port 2.0

i think i can send a start signal. but i don't know how to send a message signal like '1010'.
Post Reply