The problem was that P2SEL bit 7 also affects pin 19. It is set upon reset
and has to be cleared, to use pin 19 as timer output.
Thanks again to all that ave responded. (This forum is set so, that when you
hit "reply", it goes only to the poster)

Marko Cebokli

-----Original Message-----
From: David W. Schultz [] 
Sent: 30 November, 2016 10:37 PM
Subject: Re: [Mspgcc-users] Using XIN pin as port or timer output

On 11/28/2016 02:54 AM, Marko Cebokli wrote:
> Any idea what I am doing wrong here?

I suspect that you haven't configured the pin correctly. This simple program
causes P2.6 to toggle along with the LED:

#include <msp430.h>

int main()
  WDTCTL = WDTPW + WDTHOLD;        // stop watchdog timer

  P1DIR = P2DIR = 0xff;

  P2DIR &= ~BIT7;
  P2SEL &= ~BIT6;
  P2SEL2 &= ~BIT6;

      P1OUT ^= BIT0;
      P2OUT ^= BIT6;

XIN and XOUT connect to the pin headers via 0 Ohm resistors R28 and R29.
If those resistors are not present, then no signal will reach those pins.

David W. Schultz
"Life without stock is barely worth living..." - Anthony Bourdain

Mspgcc-users mailing list

Mspgcc-users mailing list

Reply via email to