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.

MSP430F5638: Simultaneous counter/timer and individual port bit usage

Part Number: MSP430F5638

Using ports 1, 3, or 4 for I/O and counter/timer.

Using port 3, can I set and use 6 individual I/O pins to read or write individual bits. Some will be connected to individual external hall effect switches which will have to generate an interrupt for that specific bit input. Can I also use 1-2 TAx Out pins for the counter/timer simultaneously on the same port? Switch input interrupts are more important than TAx out for this port.

Using port 4, same question, but need to use TB0 for very precise PWM output. TB0 output is more important than I/O port out only, no bit input interrupts.

  • All pins can be configured separately. This is why the PxDIR and PxSEL registers have one bit for each pin.
  • Thanks for responding. That was not the question, can you do that + support input bit interrupts + program the counter / timer on the same port, + the timer uses 1-2 out pins itself. The port has to do all of these things.
  • Hello Ted,

    As Clemens mentioned, you can set each individual pins to different functions that those pins support. as long as your GPIO interrupt and Timer Output (or other functions) do not overlap in terms of pins, the same port can do all these things. For example you could have a GPIO output in P1.0, GPIO Input Interrupt on P1.1, PWM output via Timer on P1.3, ADC Input on P1.4, Comparator input on P1.5 and etc, assuming these specific pins support these functions.
  • Jace & Clemens,

    Thanks to both of you for responding, it was helpful. My understanding was that the pins are independent and that is how I designed it. But I did want confirmation from someone else before I finalized this portion of the schematic and PCB.

    Ted

**Attention** This is a public forum