This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

24 interrupt on change pins?

Other Parts Discussed in Thread: MSP430F4132

I'm using a MSP430F4132IPM and I need 24 pins that can create an interrupt on a level change.

I'm using P1 and P2 for this of course, but I need 8 more... any ideas what other peripheral I could use to create them?

I need to be able to configure the inputs for either high to low or low to high interrupts.

Thanks in advance for any suggestions.

Paul.

  • There really isn't any way to get 24 interrupt port pins on that device.

    Some thoughts are using the TIMERA clock input and set the timer to count to 1, but that just gets you a rising-edge (and only every other one at that) on the TA0CLK input.

    If you don't need real-time, you could use a timer and on the timer interrupt scan the extra 8 pins and check for change-of-state. Set the timer interval for whatever rate you can tolerate for the scan interval.

  • Are there any devices with more than 16 interrupt on change pins?

    In my application the device may not see a change for days, so it's a waste of power to check even every minute.

    I could always add some hardware but that draws current too, and it's always more interesting to use existing functionality.

    Paul.

  • If those 24 lines have same idle state, let's say logical "1" and signals are not faster than ~10 CPU clocks, then you can make level change detector using _single_ IRQ pin and bunch of diodes. When you detect level change, then do parallel port i/o to read which exactly line changed state. If this is not the case, then I suggest to use CPLD as an "port extender".

  • Hi Paul,

    I would choose the solution provided by Ilmars also and add some external logic to merge your digital signals - something like a Key Matrix or Charlieplexing (as long as ghosting is no problem).

    But if you have to connect all signals directly to your microcontroller, you can also try another approach. The MSP430F4132 has a total of two Timer_A modules (Timer_A3 and Timer_A5). If you configure those timers for capture mode and select a proper clock source, you are able to generate additional 8 interrupts on falling, rising or both edges.

    Hope it helps,
    Christian

  • Hi Christian,

    That's exactly the kind of suggestion I was looking for.

    Thanks,

    Paul.

  • Christian's suggestion can provide up to 5 additional interrupts. You may need to look at analog comparators interrupts too!

  • @old_cow_yellow: You are right! I overlooked that Timer0_A3 capture inputs CCI0A, CCI0B and CCI1A , as well as Timer1_A5 capture inputs CCI0A and CCI0B are shared with port P1.

  • All timer CCRx input pins can trigger an itnerrupt in capture mode. In addition to the port pin, they can also trigger on both edges.So you can get additional itnerrupts on P5.0/P3.0/P3.1/P3.2 (TA1.1..4) P3.3 and P7.6 (TA0.0/TA0.2). And you can use the comparator inputs to detect a rising edge (and poerhaps a fallign too, but I'm not so familiar with them)

**Attention** This is a public forum