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.

MSP430FR2433: PxOUT = 0X00 Not giving the ov at o/p

Part Number: MSP430FR2433


Hi,

I have connected a single 7-segment to my MSP controller of port 1, 2 and 3 and my code lines are below


int main(){

WDTCTL = WDTPW + WDTHOLD;//Stop WDT

P1OUT = P1OUT & ~(1 << 4); //P1OUT.4 = 0
P1OUT = P1OUT & ~(1 << 5); //P1OUT.5 = 0
P1OUT = P1OUT & ~(1 << 6); //P1OUT.6 = 0
P1OUT = P1OUT & ~(1 << 7); //P1OUT.7 = 0

P1SEL0 = 0x00;
P1SEL1 = 0x00;

P1DIR = P1DIR | (1 << 4); //P1DIR.4 set as output
P1DIR = P1DIR | (1 << 5); //P1DIR.5 set as output
P1DIR = P1DIR | (1 << 6); //P1DIR.6 set as output
P1DIR = P1DIR | (1 << 7); //P1DIR.7 set as output

P2SEL0 = 0x00;
P2SEL1 = 0x00;

P2DIR = P2DIR | (1 << 0); //P2DIR.0 set as output
P2DIR = P2DIR | (1 << 1); //P2DIR.1 set as output
P2DIR = P2DIR | (1 << 2); //P2DIR.2 set as output
P2DIR = P2DIR | (1 << 4); //P2DIR.4 set as output

P2OUT = P2OUT & ~(1 << 0); //P2OUT.0 = 0
P2OUT = P2OUT & ~(1 << 1); //P2OUT.1 = 0
P2OUT = P2OUT & ~(1 << 2); //P2OUT.2 = 0
P2OUT = P2OUT & ~(1 << 4); //P2OUT.4 = 0

while(1);

}

But the only port1 4,5,6,7 pins makes glow the 7-segment (common anode).  remaining connected led's are not glowing. please let me know what i need to do extra and what i did wrong.

**Attention** This is a public forum