Jump to content
Rushabh

How to use TSOP with MSP430G2231 using ENERGIA ?

Recommended Posts

Hello every one,

I have a Infrared TSOP sensor and i want to use it with MSP430G2231 to decode IR Remote codes but, when I try to compile the example codes errors appears during compilation.

 

i need suggestions to correct the library files....

Share this post


Link to post
Share on other sites

What sensor are you using (manufacturer, part number)? What kind of example code are you trying to use? What errors do you get?

 

PS: just figured out TSOP is a class of sensors :) first thought you were referring to TSSOP :rolleyes: More specifics about the sensor would still be helpful as some are 5V only and might require some voltage level translation to work with MSP430.

Share this post


Link to post
Share on other sites

What sensor are you using (manufacturer, part number)? What kind of example code are you trying to use? What errors do you get?

 

PS: just figured out TSOP is a class of sensors :) first thought you were referring to TSSOP :rolleyes: More specifics about the sensor would still be helpful as some are 5V only and might require some voltage level translation to work with MSP430.

It is SA0038 TSOP and I checked the voltage on the out put pin it varies when i give input from the remote,then i have connected it's output pin on P1.3 on the Launch pad . VCC and GROUND ,for the sensor,are used from onboard VCC & GND pins.

 

But more importantly the error is occuring during compilation of any of the IRremote sample programes...not during execution Please refer snap ..post-36578-0-35867800-1395341067_thumb.png

Share this post


Link to post
Share on other sites

What error does Energia report? You might need to enable verbose error reporting under Files > Preferences to get the full error details.

I have already attached the snap shot showing the errors in details in my last post.... and i m copying them here from the Energia....

 

C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp: In member function 'virtual void IRsend::mark(int)':
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:186:3: error: 'TA1CTL' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp: In member function 'virtual void IRsend::space(int)':
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:194:3: error: 'TA1CTL' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:214:3: error: 'TA1CTL' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:214:3: error: 'TA1CCTL0' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:227:3: error: 'TA1CCTL0' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:227:3: error: 'TA1CCR0' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:244:3: error: 'TA1CTL' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:244:3: error: 'TA1CCTL0' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:244:3: error: 'TA1CCR0' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:244:3: error: 'TA1R' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:247:3: error: 'TA1CCTL0' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp: At global scope:
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:276:26: error: 'TIMER1_A0_VECTOR' was not declared in this scope
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp: In static member function 'static void IRrecv::RecvIsr()':
C:\Users\Rb\Desktop\energia-0101E0011\hardware\msp430\libraries\IRremote\IRremote.cpp:277:6: error: interrupt vector offset must be an even non-negative integer constant

Share this post


Link to post
Share on other sites

 

I have already attached the snap shot showing the errors in details in my last post.

 

Sorry, didn't see the attachment.

 

As the thread Rickta59 referred to concludes, the MSP430G2231 does not have the 2nd timer required by the IR library.

Share this post


Link to post
Share on other sites

Sure you could write the code yourself using a different style of coding. With Energia, the code really needs some extra flash and memory because of its goal to provide generic support for most things. You can always do better yourself if you hand code your routines and interact directly with the msp430g2211 peripherals.

Share this post


Link to post
Share on other sites

Sure you could write the code yourself using a different style of coding. With Energia, the code really needs some extra flash and memory because of its goal to provide generic support for most things. You can always do better yourself if you hand code your routines and interact directly with the msp430g2211 peripherals.

Any Idea about what changes I need to make on IRremote libraries in order to make it work in my case... ?

Share this post


Link to post
Share on other sites

The question is why do you need to use the msp430g2231. It really isn't a good chip to use with Energia.  If you want to use Energia, just get an msp430g2553 chip.  That is a much better match for Energia.

 

If you really want to use the msp430g2231, then you need to start reading the datasheet for the msp430g2231 and Family user guide (slau144). You should download the TI simple examples that show how to use the peripherals of the msp430g2231. All the links are available on the ti products page for the msp430g2231.

 

You should also search around on this forum for titles with the keywords IR transmitter, IR decoder.  There are some good examples that work.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...