janarthana
Newbie level 5
In my project i want to control the device by using sms, i am using sim300_v7.03 gsm and msp430. I need the coding for that , some one help me its urgent
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 // MSP430 - UART GSM #include "io430.h" #define DELAY 1000 void init(void) { // Stop watchdog timer to prevent time out reset WDTCTL = WDTPW + WDTHOLD; P1OUT = 0; P1DIR = 0x7F; } void initUART(void) { // initialize USCI = UART // TXD is on P1.2, select secondary peripheral function P1SEL_bit.P2 = 1; P1SEL2_bit.P2 = 1; UCA0CTL1 |= UCSSEL_2; UCA0BR0 = 104; // set for 9600 baud UCA0BR1 = 0; UCA0CTL1_bit.UCSWRST = 0; // release RESET } void UART_Write(unsigned char c) { while (UCA0STAT_bit.UCBUSY); UCA0TXBUF = c; } void Delay_ms(unsigned long d) { unsigned long i; for (i = 0; i < d; i++); } void UART_Write_Text(unsigned char *uartData){ while(*uartData)putc(*uartData++); } void main( void ) { unsigned char mobileno[12] = "0000000000"; init(); initUART(); while (1) { UART_Write_Text("AT+CMGF=1"); UART_Write(13); UART_Write(10) ; Delay_ms(2000); UART_Write_Text("AT+CMGS="); UART_Write(0x22); UART_Write_Text(mobileno); Delay_ms(100); UART_Write(0x22); UART_Write(13); UART_Write(10); Delay_ms(1000); UART_Write_Text("Hi from EDABoard"); UART_Write(0x0D); UART_Write(26); UART_Write(0x0D); Delay_ms(5000); }