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 .

Share this post

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

Share this post

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.

Share 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

Share this post

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;

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now