Hello,
I am using MSP430F5438a controller.
I am configuring the pin as output using PxDIR register. If i want to read the status of the output pin can i use PxIN register.
Example:
P1DIR = 0x01;
if(PxIN & 0x01)
{
do some action;
}
or
if(PxOUT & 0x01)
{
do some action;
}
which is correct and what will be difference of reading the pin status using two register
Thanks in advance