Forum Replies Created
Viewing 1 post (of 1 total)
-
AuthorPosts
-
December 15, 2012 at 7:30 pm in reply to: By using GSM SIM 300M and Atmega8 , How to write coding for sending SMS to 3 Persons when any one the port pin gets high …? #8839ahmed qureshiParticipant
Please help me, i want to send msg via gsm sim900D. I am unable to send txt using this code
#define F_CPU 11059200UL#include <avr/io.h>#include <avr/interrupt.h>#include <stdio.h>#include <stdlib.h>#include “lcd.h”#include <util/delay.h>#include <inttypes.h>#include <string.h>void send_msg();void init_USART();void usart_send_string(char *str );void usart_send(char data);void gsm_cmd(char *cmd);void init_USART(){unsigned int baud=71; //(UBRR= (Fos/ (16*baudrate) )-1 )UBRRH =(unsigned char)(baud>>;UBRRL=(unsigned char)baud;UCSRC|=(1<<URSEL)|(3<<UCSZ0);//Enable The receiver and transmitterUCSRB |= (1<<RXCIE) | (1 << RXEN) | (1 << TXEN); // Turn on the transmission reception .sei();}ISR (USART_RXC_vect){unsigned char value;value = UDR; // Fetch the received byte value into the variable “value”len_recieved++;recieved_msg[len_recieved]=value;if(data_flag==-1)data_flag=0;}}void usart_send_string(char *str ){while((*str)!=’