Microcontroller › 8051 › about gsm interfacing
- This topic has 10 replies, 7 voices, and was last updated 13 years ago by
Syed Aameer.
-
AuthorPosts
-
May 9, 2011 at 6:57 pm #917
goutam
Participanthello
i have a doubt about one of the sample projects you have put up on your website. am talking about the one titled “interfacing a gsm module with 8051 without using pc”.
the code which u have given as sample, wat does it do exactly??? does it display an ‘AT’ that is sent to the gsm module?? does it also show the reply that the gsm module gives??? like “OK”!
May 10, 2011 at 6:08 am #6130dagakshay
Participanthello gautam… send the link where you following this project
May 11, 2011 at 2:20 pm #6154romel emperado
Participantpost here the specific blocks of code you want to ask.. maybe we can help..
May 14, 2011 at 5:19 pm #6203goutam
Participantthis is the link….
i built the circuit as given in the circuit diagram and used the same given code….but am not getting any output on the led… its blank
May 17, 2011 at 5:11 am #6253dagakshay
Participanthey goutam,
led or LCD any ways, are you getting some boxes on LCD or its completly blank.
if you getting boxes then check you connection again. and if its completely blank check the supply for LCD
May 17, 2011 at 12:55 pm #6257goutam
Participanthello
i passed that hurdle….am getting the response now…i modified the code to suit my needs now…. instead of sending AT i modified it to send, ATD phoneno the code is as follows….
//
#include<regx51.h>
#define port P1
#define dataport P2 // Data port for LCD
sbit rs = port^2;
sbit rw = port^3;
sbit en = port^4;
int count,i;
unsigned char check,str[15];
bit check_space;void init_serial() // Initialize serial port
{
TMOD=0x20; // Mode2
TH1=0xfd; // 9600 baud
SCON=0x50; // Serial mode=1 ,8-Bit data,1 Stop bit ,1 Start bit, Receiving on
TR1=1; // Start timer
}
void delay(unsigned int msec) // Function for delay
{
int i,j;
for(i=0;i<msec;i++)
for(j=0; j<1275; j++);
}void lcd_cmd(unsigned char item) // Function to send command on LCD
{
dataport = item;
rs= 0;
rw=0;
en=1;
delay(1);
en=0;
return;
}void lcd_data(unsigned char item) // Function to display character on LCD
{
dataport = item;
rs= 1;
rw=0;
en=1;
delay(1);
en=0;
return;
}
void lcd_data_string(unsigned char *str) // Function to display string on LCD
{
int i=0;
while(str!=’