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 [mailto:david.schu...@earthlink.net] 
Sent: 30 November, 2016 10:37 PM
To: mspgcc-users@lists.sourceforge.net
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;

  while(1)
    {
      P1OUT ^= BIT0;
      P2OUT ^= BIT6;
      __delay_cycles(1000000L);
    }
}

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
http://home.earthlink.net/~david.schultz
"Life without stock is barely worth living..." - Anthony Bourdain

----------------------------------------------------------------------------
--
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


------------------------------------------------------------------------------
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to