Discussion in "Embedded GSM Development" started by    turker1    Aug 10, 2008.
Sun Aug 10 2008, 03:01 PM
#1
Hi again. I connected T290i with pc. I get "OK" from hyperterminal.And I connect phone to mcu.
#include <16F628.h>

#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_A2,rcv=PIN_A1,bits=8)

void main()
{
printf("AT\r\n");
delay_ms(1000);
printf("ATD8091\r\n");
}

This code calling 8091 . i tried it is ok.
But when i want to get result a command , i cant.
#include <16F628.h>

#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_A2,rcv=PIN_A1,bits=8)

void main()
{
printf("AT\r\n");
if (getc()=='O') output_high(PIN_A0);
}

For this code I sent "AT" .So the message "OK" came. The first letter "O". The mcu doesnt output PIN_A0 high.
I think the problem is speed. MCU or phone is faster than the other one. How can i solve this problem.
Thanks for advice.
Tags 16f628delay msms 40output pinxmit
Sun Aug 10 2008, 09:08 PM
#2
Hi.One more thing , if i use max232 i cant send commands. first codes doesnt work if i use max232.
maybe i must use resistors with mcu and phone?
Tags mcuresistors
Mon Aug 11 2008, 08:21 AM
#3
you dont get OK as it is.. modem sends string in this way..

\r\nOK\r\n

so you need to check for the above received chars for correct response.
Tags correct responsecharsmodemnok
Mon Aug 11 2008, 11:03 AM
#4
With this code sometimes nothing appears on LCD, sometimes 'e' appears, sometimes 'ATe' appears. What is the problem?I used "lcd_putc("e");" to see what happens.
include <16F628.h>

#use delay(clock=4000000)
#define use_portb_lcd TRUE
#include <LCD.C>

#use rs232(baud=9600,parity=N,xmit=PIN_A2,rcv=PIN_A1,bits=8)
char s[30];
void main()
{
lcd_init();
printf("ATE0\r\n");
delay_ms(1000);
printf("AT\r\n");
gets(s);
printf(lcd_putc,s);
lcd_putc("e");
}
Wed Aug 13 2008, 06:01 AM
#5
Hi,
Remove \n after AT \r. Please use only \r
Fri Nov 21 2008, 11:09 AM
#6
Hello

Why you using printf("ATD8091\r\n");

I dont understand the purpose of ATD8091

Get Social

Information

Powered by e107 Forum System

Conversation

Sat Dec 05 2020, 03:40 PM
Isiah
What's Taking place i am new to this, I stumbled upon this I have discovered It positively helpful and it has helped me out loads. I'm hoping to contribute & aid other users like its aided me. Good job. https://servicesdigitalwriters.com custom dissertation writers custom dissertation writers https://servicesdigitalwriters.com
Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
scena
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 82, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123