I am using the following code fragment :
#include <stdio.h>
#include "msp430f1610.h"
#include "msp430.h"
int do_mult(int a, int b){return a*b;}
void main(void) {
WDTCTL = WDTPW + WDTHOLD;
DCOCTL = 0x00;
BCSCTL1 = 0x00;
BCSCTL2 = 0xc8;
volatile int i;
for(i = 0; i<32000; i++){};
//do {
//IFG1 &= ~OFIFG;
//for (i = 0xff; i>0; i--);
//} while((IFG1&OFIFG));
P1DIR = 0xff;
int c = do_mult(1,5);
for (;;){
P1OUT = P1OUT ^ c;
for(i = 0; i<32000; i++){};
}
}
This code uses an external clock on the XT2IN pin of the msp430f1610. However, the code doesn't seem to work out. Any help would be deeply appreciated.