Forum Replies Created
-
AuthorPosts
-
December 3, 2012 at 7:45 am 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 …? #88065HUJ4Participant
Ok fine i ll update u after testing its out put …..
November 30, 2012 at 6:01 am 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 …? #87995HUJ4ParticipantHi Alfred …..im back again
i have got the sucessful out put for sending Text Message to different persons through GSM SIM300.Next i want to Send Voice Message from this SIM300 to the Mobile Phone .
For this i have considered “APR9600 Voice recording/playback IC”,Firstly i will record some predefine voice into it,then i will connect it’s output to the MIC input of the SIM300.
Further when i will give voice call to the user ,when it pickups the phone ,i ll play dis audio mesage …..
For this entire setup i have made one interfacing circuit ,i want ur lil help to know its correct or not …….wysiwyg_imageupload:6839:height=317,width=504
5HUJ4ParticipantIs der any one who can reply to my question …………………….. ?
November 10, 2012 at 4:38 am 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 …? #87305HUJ4ParticipantFinally i got the output using 89C51 MC …….Ajish Alfre thanks for ur kind support , See u again ….Buy
November 6, 2012 at 9:56 am 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 …? #87115HUJ4Participant//Thanks ‘Ajish Alfred’ for ur suggestion .Here is the exact code which i have modified to, but still i am not gettting SMS . Plz can u find out the problrm and suggest me the correct coding ………. i am really ineed of it : (
//Eagerly Waiting for ur reply …………..!!
#include<avr/io.h>
#include<util/delay.h>
#define F_CPU 12000000UL
#define USART_BAUDRATE 9600 // Baud Rate value
#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) – 1)
#define PIN PB0
void usart_putstr(char * s);
void usart_init();
static void usart_putch(unsigned char send);
unsigned int usart_getch();int main ()
{
DDRD|=0xFC;//Setting the Tx and Rx Pins Low
while (1)
{
while (PIN==0); //program will loop in this line itself only until the pin become logic high
usart_init(); // initialization of USART
char b[] = “AT+CMGS=”;
char no[]=”+918000000000″;
char body[] =”Got the Output”;
{
usart_putstr(b);
_delay_ms(100);
usart_putch(‘”‘);
usart_putstr(no);
_delay_ms(100);
usart_putch(‘”‘);
_delay_ms(100);
usart_putch(‘r’);
usart_putch(‘n’);
_delay_ms(100);
usart_putstr(body);
_delay_ms(100);
usart_putch(0x1A);
}
return 0;
}
}void usart_init()
{
UBRRL = 0x47;
_delay_ms(1);
UCSRB |= (1 << RXEN) | (1 << TXEN); // Turn on the transmission and reception circuitry
UCSRC |= (1 << URSEL) | (1<<USBS) | (1 << UCSZ0) | (1 << UCSZ1); // Use 8-bit character sizes
}
unsigned int usart_getch()
{
while (!(UCSRA & (1 << RXC)) ); // Do nothing until data has been received and is ready to be read from UDR
_delay_ms(1);
return(UDR); // return the byte
}
static void usart_putch(unsigned char send)
{
while ((UCSRA & (1 << UDRE)) == 0); // Do nothing until UDR is ready..
// for more data to be written to it
UDR = send; // Send the byte
}
void usart_putstr(char * s)
{
while(*s)
{
usart_putch(*s++);
}
}November 6, 2012 at 6:27 am 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 …? #87225HUJ4ParticipantI have removed the GSM modem and connected controller to the hyperterminal ….. But agian no output now only problem left is with the coding ……..Waiting for ur reply ..!!
November 5, 2012 at 1:22 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 …? #87195HUJ4ParticipantFinally i have changed my controller .This time i am using 89s52 with [email protected] .I have compiled the below code sucessfully and checked the output on Keil UART terminal window . But when i have dumped the same code into the controller its not sending any SMS …….. Plz suggest me any solution …..waiting fot ur reply ….!!!
#include<at89x52.h>
#define key P2^0
void delay(int time);
void init();
void SMSString(unsigned char* text);
void tx0(unsigned char x);
void main()
{
P2=0x00;
init();
while(1)
{
if(key==1)
{
SMSString(“ATr”);
delay(1000);
delay(1000);
SMSString(“AT+CMGF=1r”);
delay(1000);
delay(1000);SMSString(“AT+CMGS=”8080808080″r”);
delay(1000);
SMSString(“This is a test messag “);
delay(1000);
tx0(0x1A);
delay(1000);
delay(1000);
delay(1000);
}
}
}void delay(int time) //This function produces a delay in msec.
{
int i,j;
for(i=0;i<time;i++)
for(j=0;j<1000;j++);
}void init()
{
TMOD=0x20;
SCON=0x50;
TL1=0XFD; //9600 @ 11.0592
TH1=0xFD;
TR1=1;
}void SMSString(unsigned char* text) //function to send SMS using GSM modem
{
unsigned char count = 0;
while (text[count])
{
tx0(text[count++]);
}
}void tx0(unsigned char x) //send data to serial port 0
{
EA=0;
SBUF=x;
while(TI==0);
TI=0;
EA=1;
}Important Note :From the GSM module i have removed Max 232 and using its 11 pin as TX and 12 pin as Rx pin , conncting directly to the microcontroller in Cross fasion ( i mean Tx 2 Rx and Rx to Tx and Gnd 2 Gnd )
November 5, 2012 at 9:31 am 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 …? #87185HUJ4Participantyes i have checked the modem with hyperterminal, manually by typing following code …
AT+CMGF=1 response “OK” was returned.
AT+CMGS=”9030888888″. response “>” was returned.
Then I typed my message, after that I Pressed Cltr+Z to send the message and it was sucessfull
But when i have dumped the code into Microcontroller then its not sending SMS ….!!!
Can u plz suggest any further modification ……waiting for ur reply ….
November 3, 2012 at 6:38 am 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 …? #87145HUJ4ParticipantHave a look at dis modified code , But still i have’nt received any SMS yet …
Circuit Description :
1)AVR Atmega8
2)12Mhz Crystal Oscillator , Considering Bard rate =9600 , and UBRRL = 0x0077;
3)Input to the PB0 pin , for an instance is directly given from the Vcc=5V as pulse for certain duration
4)SIM 300M Module is used .
5)”Requirement is just to send the SMS to 1 persons , when PB0 pin gets high …..
Plz suggest me any further modification ,eager waiting for ur reply ……..
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#define F_CPU 12000000UL
#define USART_BAUDRATE 9600 // Baud Rate value
#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) – 1)
#define PIN PB0
void usart_putstr(char * s);
void usart_init();
static void usart_putch(unsigned char send);
unsigned int usart_getch();
void init_Ports(void);int main ()
{
DDRD|=0xFC;//Setting the Tx and Rx Pins Low
DDRB =0x00;//Setting the PortB as input port
while (1)
{
init_Ports();
while (PIN==0); //program will loop in this line itself only until the pin become logic high
usart_init(); // initialization of USART
char b[] = “AT+CMGS=”;
char no[]=”+918000000000″;
char body[] =”Got the Output”;
{
usart_putstr(b);
_delay_ms(100);
usart_putch(‘”‘);
usart_putstr(no);
_delay_ms(100);
usart_putch(‘”‘);
_delay_ms(100);
usart_putch(‘r’);
usart_putch(‘n’);
_delay_ms(100);
usart_putstr(body);
_delay_ms(100);
usart_putch(0x1A);
}
return 0;
}
}void usart_init()
{
UBRRL = 0x0077;
_delay_ms(1);
UCSRB |= (1 << RXEN) | (1 << TXEN); // Turn on the transmission and reception circuitry
UCSRC |= (1 << URSEL) | (1<<USBS) | (1 << UCSZ0) | (1 << UCSZ1); // Use 8-bit character sizes
}
unsigned int usart_getch()
{
while (!(UCSRA & (1 << RXC)) ); // Do nothing until data has been received and is ready to be read from UDR
_delay_ms(1);
return(UDR); // return the byte
}
static void usart_putch(unsigned char send)
{
while ((UCSRA & (1 << UDRE)) == 0); // Do nothing until UDR is ready..
// for more data to be written to it
UDR = send; // Send the byte
}
void usart_putstr(char * s)
{
while(*s)
{
usart_putch(*s++);
}
}void init_Ports(void)
{
cli(); //disable all interrupts
DDRB = 0x00; //port B as input
sei(); //reanable all interrupts
}5HUJ4ParticipantBy using GSM SIM300M Module & Atmega8 Uc ,How to send SMS to 3 Different persons when one of the port pin of Atmega8 gets high … Plzz some body help me in dis regard for “coding part” ….!!!!
-
AuthorPosts