Hi;
I am using pic16f877a to communicate with T68i Sony Ericsson and i do not know how to do that using at command in the CCS C Compiler. I am using Proteus simulation program to connect between virtual PIC (Code program) and the real phone (T68). First I need a program sends "AT" and receive "OK" to know that the connection is exists and if there is a guide to learn how to deal with AT command using CCS C.
note: I am using bluetooth to connect the t68i to PC and get a port number(COM) which used to enter it to the rs232(COMPIM) to connect it.
see: in image.google (proteus rs232 )
-------------------please help its for my graduation project--------------------
Hi; I am using pic16f877a to communicate with T68i Sony Ericsson and i do not know how to do that using at command in the CCS C Compiler. I am using Proteus simulation program to connect between virtual PIC (Code program) and the real phone (T68). First I need a program sends "AT" and receive "OK" to know that the connection is exists and if there is a guide to learn how to deal with AT command using CCS C. note: I am using bluetooth to connect the t68i to PC and get a port number(COM) which used to enter it to the rs232(COMPIM) to connect it. see: in image.google (proteus rs232 ) -------------------please help its for my graduation project--------------------[/QUOTE said:First of all you have to be sure that your RS232 circuits is functioning well. And two of your problems are to test if you can communicate with your cellphone using AT commands and remove echo thus you want to see a reply of OK from AT. Here's how you do it:
First connect your cell phone to your computer, then press the windows logo on your keyboard or click start, go to Accessories --->
Communications ----> and click Hyper terminal. Fill required data, then when a window pop-out click New Connection, then set:
BAUD Rate:9,600 to 115,200 bps
Data bits:8
Parity:NONE
Stop Bits:1
Flow Control:NONE
Type in the keyboard the following:
AT[ENTER], see the reply...
ATEO[ENTER], THis command removes echo, and then type again AT[ENTER], and you will see OK only.
YOu can translate this command into the CCS C programming, for example,
printf("at\r"); //a command to type AT.
You need to learn to program by yourself.
Headman
char string[20];char string1[]="NO CARRIER";
if(strcmp(string,string1))//string=NO CARRIER
fprintf(hyp,string);//always executed even if string1=NO for example !!??
char string[10];
while(1){
fprintf(phone,"AT\r");
fgets(string,phone);
fprintf(hyp,string);
delay_ms(2000);
}
I am using Proteus simulator to connect the pic and the cellphone. I am using three hyperterminal two to see the output from the pic and input to pic{from cellphone} and one act as PC(hyp). When I use this code to send "AT" for example, the fprintf(hyp--) will print just one AT. Another thing is that the fprintf(phone--) will send just three commands only and then stop sending.
Code:char string[10]; while(1){ fprintf(phone,"AT\r"); fgets(string,phone); fprintf(hyp,string); delay_ms(2000); }
I don't know why is the problem in the program...?
What are you trying to achieve? and what is the purpose of this project so that I can tell you if it is ok to use a string or not?
i want to send "AT*ECAM=1" or "AT+CPAS" to see the phone activity status if its active or not. this is my main purpose. so if its active i will write a condition to make something .
i will be very pleased if you helped me. thanks
As long as the phone has power it is active. If your project is interactive, meaning that your phone takes a command and execute it, and it can reply to the sender whoever texted the phone and it replies to the sender automatically through your programming. I don't see the need to check if its active or not and using string may not be possible because you can program it to delete, store, and send data continuously.
Does your project includes reading a message on its inbox?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?