Is it possible to configure two differant pin of same port of MSP430G2211IN14 or MSP430G2231IN14 as one as input and another as output?
If yes please give an example with code..
thank you..
Sunil Shahu
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.
Is it possible to configure two differant pin of same port of MSP430G2211IN14 or MSP430G2231IN14 as one as input and another as output?
If yes please give an example with code..
thank you..
Sunil Shahu
ALL port pins on all MSPs can be configured bit by bit. The PxDIR registers define the direction of every single port bit by setting (output) or clearing (input) the single bits in this register. Also, the PxSEL registers control the assignment of each port pin to either GPIO or hardware module usage.
Example:
P1DIR |=BIT0; // BIT0 == 0x01
sets bit0 in the P1DIR register, which configures P1.0 pin to output. All other port pins of P1 keep their previous configuration.
**Attention** This is a public forum