Hello folks,
I've six capacitive sense touch keys to be interfaced with 6 pins of Port1, MSP430. On sensing key touch, the 430 should alert an interrupt. Detecting the interrupt flag as high, a pulse should be generated on the respective pin of Port2 (6 pins here again).
I wish to configure the MSP430, such that:
All the port pins of P1 should be alert towards the six keys at once. That is - rise in capacitance on any key should be detected - not by polling each key. This can't happen in software. So I would need to configure the 430 such that its internal hardware causes it to behave in parallel. How can this be done?
For interrupt generation, I first thought:
- Use external resistors for each pin of Port1 to form an RC circuit with each key. Let the circuit charge. Let Timer_A generate an interrupt when the charging time crosses a certain threshold; threshold because beyond this level, would mean "key pressed".
- But here again, there's only one Timer_A. So I could configure the 430 to respond to each pin at a time. That's not parallel.
And then, even though each pin of P1 can carry its own interrupt, the Interrupt Vector Table is common for all pins. So in case I want six different ISRs running for each key - because obviously each key would hold a different function - would that be possible with a simple switch case?
Thank you,
Krishna.