I am working with msp430f235. I want to enable to GSM module using serial port and also want to call at a particular number. The code for that I have written is as follows:
#include "msp430f235.h"
const char string1[] = { "ATD07417338415;" };
volatile unsigned int i,j=0;
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;
P3SEL = 0x30; // P3.4,5 = USCI_A0 TXD/RXD
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 104; // 1MHz 9600; (104)decimal = 0x068h
UCA0BR1 = 0; // 1MHz 9600
UCA0MCTL = UCBRS1 + UCBRS0; // Modulation UCBRSx = 3
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
for(i=0;i<16;i++)
{ while (!(IFG2&UCA0TXIFG)); // USCI_A0 TX buffer ready?
UCA0TXBUF = string1[i];
j++;
} // TX next character
}
But this code contains no error but still not able to call at a particular number after downloading in msp430. why it is happening ? please guide me.