Jump to content

Msp430f5529 interrupt with adc

Recommended Posts

Hello all


I read all the posts on this forum as said in suggestions

So with this i came across an idea.

Can some one tell that if i make my data aquisition system interrupt enabled

This means taking value from adc will be normal calculation for flowrate will be also normal

But when ever i need to show totaliser count that will be interrupt enabled can some one help.

Really need help .

Link to post
Share on other sites

Ok let me tell you

I am trying to design a menu system which is user interface for my device

I have already designed it

But the data aquisition should be independent of any key press

Thus either i need to make my keys interrupt enabled or adc but as i read yesterday i cannot make adc interrupt enabled as it

I also tried to make keys interrupt enabled and it worked yesterday partially

Now i will try to make it work full and will post the results

Link to post
Share on other sites



Some suggestions for you so that you can better be helped by the users on the forum:


Provide the Launchpad you are using, as well as any Boosterpacks.

Provide your code - it is difficult to understand what is happening without this.

Explain what is working and what isn't working. And if something isn't working, what exactly is happening and what you have already tried in an attempt to get it working.

If you are using any of your own circuits besides the basic Launchpad, please detail that with a schematic.

If possible provide a photo of your setup.  Sometimes issues have been spotted with this additional information.


The upside for you is that you will get more useful information in a shorter time frame.


EDIT:  Apparently @@chicken posted while I was composing this post.

Link to post
Share on other sites


Launch pad i am using is msp430f5529

I am designing menu system menu system is working perfectly fine without interrupt

I am operating this with mobile thats why cannot post my code right now but will surely do it in next few hrs


I am trying to design a flow integartor totaliser

Adc value should be detected irrespective of any key press

There are 3 for loops in side my data processing routine they are affecting key detection out side data processing routine


So i am trying to desing intrupt based key detection

So that key will be detected with interupt

My key is attached to P2_0


As this is the key which allows me to enter my programming menu to set some parameters

Link to post
Share on other sites

Did you already try using attachInterrupt() http://energia.nu/AttachInterrupt.html.

volatile int state = HIGH;
volatile int flag = HIGH;
int count = 0;

void setup()

  digitalWrite(GREEN_LED, state);

  /* Enable internal pullup. 
   * Without the pin will float and the example will not work */
  attachInterrupt(PUSH2, blink, FALLING); // Interrupt is fired whenever button is pressed

void loop()
  digitalWrite(GREEN_LED, state); //LED starts ON
  if(flag) {
    flag = LOW;

void blink()
  state = !state;
  flag = HIGH;
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.

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...