coldy said:Hmmm ok i will try,
But frankly speaking i believe there should be another reason,
even maybe tooooo simplehehe
thanks anyway,
Added after 4 hours 33 minutes:
Thanks to your kind suggestions all,
In fact, Ajay Bhargav from 8051projects.net forum, I really appreciate his latest comment .
The solution is; making some additional connections at GSM serial port, as below;
**broken link removed**
Before I only connected, RX,TX and GRND pins of the GSM serial port.
And below you can see the general connection latest I made:
**broken link removed**
And a program to send sms and or call a phone number is as follows:
Code:'Definitions DEFINE OSC 4 'for 4 Mhz 'DEFINE OSC 8 'for 8 Mhz DEFINE HSER_TXSTA 20h 'I wonder shall I define as DEFINE HSER_TXSTA 24h??? DEFINE HSER_RCSTA 90h 'same for all DEFINE HSER_BAUD 2400 'for 2400 Baud rate 'DEFINE HSER_BAUD 4800 'for 4800 Baud rate 'DEFINE HSER_BAUD 9600 'for 9600 Baud rate DEFINE HSER_SPBRG 25 'for 4Mhz/2400 & 8Mhz/4800 with an error %0.16 'DEFINE HSER_SPBRG 12 'for 4Mhz/4800 & 8Mhz/9600 with an error %0.16 DEFINE HSER_CLROERR 1 'same for all ' Initialization & Declaration i var byte TRISB=%00000000 PORTB=%00000000 TRISD=%00001111 PORTD=%00000000 ' CHECK FIRSTCHECK: HIGH PORTB.7 PAUSE 500 HIGH PORTB.6 PAUSE 500 HIGH PORTB.5 PAUSE 500 HIGH PORTB.4 PAUSE 500 PORTB=%00000000 GSM_CHECK: HSEROUT ["AT",13] 'Send AT to modem followed by a CR HSERIN 5000, GSM_CHECK, [WAIT("OK")] 'Check OK reply, wait 5sec max. HIGH PORTB.7 PAUSE 1000 HSEROUT ["AT+GMM",13] 'Ask model name HSERIN 5000, GSM_CHECK, [WAIT("T610 series")] 'Check model name HIGH PORTB.6 PAUSE 1000 HSEROUT ["AT+IPR=2400",13] 'Set transfer speed HSERIN 5000, GSM_CHECK, [WAIT("OK")]'Check OK reply, wait 5sec max. HIGH PORTB.5 PAUSE 1000 HSEROUT ["AT+CMGF=1",13] 'send AT to modem followed by a CR and line feed HSERIN 5000, GSM_CHECK, [WAIT("OK")]'Check OK reply, wait 5sec max. HIGH PORTB.4 PAUSE 1000 PORTB=%00000000 BEGIN: IF PORTB.5=1 THEN ERROR_CALL IF PORTB.6=1 THEN ERROR_SMS HIGH PORTB.7 pause 1000 LOW PORTB.7 if PORTD.2 = 0 then SEND_SMS IF PORTD.3 = 0 THEN CALL_PHONE PAUSE 1000 GOTO BEGIN SEND_SMS: HIGH PORTB.6 HSEROUT ["at+cmgs=",34,"XXXXX",34,13] PAUSE 1000 HSEROUT ["this is a test message",26] HSERIN 10000, BEGIN, [WAIT("OK")]'Check OK reply, wait 5sec max. LOW PORTB.6 GOTO BEGIN CALL_PHONE: HIGH PORTB.5 HSEROUT ["atd[XXXXX];",13] HSERIN 5000, BEGIN, [WAIT("OK")]'Check OK reply, wait 5sec max. PAUSE 2000 LOW PORTB.5 GOTO BEGIN ERROR_CALL: FOR i = 1 to 5 HIGH PORTB.4 PAUSE 500 LOW PORTB.4 PAUSE 500 next i PORTB=%00000000 GOTO BEGIN ERROR_SMS: FOR i = 1 to 5 HIGH PORTB.4 PAUSE 500 LOW PORTB.4 PAUSE 500 next i PORTB=%00000000 GOTO BEGIN ' END End
Thanks again for your attention and time, I will continue with :
- Improving the program to a real case scenario,
- Think more about the real case scenario, because at first stage I would like to use this as an alarm system for my garden house. I will need some sensors for unexpected visitors or animals.
Do you have any idea, what kind of sensors I can use to detect unexpected visitors?
Regards,
tharaka said:Hi all,
I also doing same project send sms via PIC and Mobile phone(sony ericsson K700).I did some proteus simulations as in my attachement. In there you can see although there are AT commands are sending between PIC and MAX232 something uncommon between MAX232 and phone.
Can you clarify this
Thanks[/img]
Is that the project like this.can anyone help me in this matter the purposed of this project is to control 4 relays
Is that the project like this.
How you connect microcontroller with that mobile phone? UART/RS232 using AT Command also?sir no weare not using gsm module we are using a sony erikson t230 mobile phone
How you connect microcontroller with that mobile phone? UART/RS232 using AT Command also?
I don't understand flow of your code.sir we use Sony Ericsson t230 and with the help of AT commands so that the pic and the mobile phone can communicate each other....
below is the sample code
Hmmm ok i will try,
But frankly speaking i believe there should be another reason,
even maybe tooooo simplehehe
thanks anyway,
Added after 4 hours 33 minutes:
Thanks to your kind suggestions all,
In fact, Ajay Bhargav from 8051projects.net forum, I really appreciate his latest comment .
The solution is; making some additional connections at GSM serial port, as below;
**broken link removed**
Before I only connected, RX,TX and GRND pins of the GSM serial port.
And below you can see the general connection latest I made:
**broken link removed**
And a program to send sms and or call a phone number is as follows:
Code:'Definitions DEFINE OSC 4 'for 4 Mhz 'DEFINE OSC 8 'for 8 Mhz DEFINE HSER_TXSTA 20h 'I wonder shall I define as DEFINE HSER_TXSTA 24h??? DEFINE HSER_RCSTA 90h 'same for all DEFINE HSER_BAUD 2400 'for 2400 Baud rate 'DEFINE HSER_BAUD 4800 'for 4800 Baud rate 'DEFINE HSER_BAUD 9600 'for 9600 Baud rate DEFINE HSER_SPBRG 25 'for 4Mhz/2400 & 8Mhz/4800 with an error %0.16 'DEFINE HSER_SPBRG 12 'for 4Mhz/4800 & 8Mhz/9600 with an error %0.16 DEFINE HSER_CLROERR 1 'same for all ' Initialization & Declaration i var byte TRISB=%00000000 PORTB=%00000000 TRISD=%00001111 PORTD=%00000000 ' CHECK FIRSTCHECK: HIGH PORTB.7 PAUSE 500 HIGH PORTB.6 PAUSE 500 HIGH PORTB.5 PAUSE 500 HIGH PORTB.4 PAUSE 500 PORTB=%00000000 GSM_CHECK: HSEROUT ["AT",13] 'Send AT to modem followed by a CR HSERIN 5000, GSM_CHECK, [WAIT("OK")] 'Check OK reply, wait 5sec max. HIGH PORTB.7 PAUSE 1000 HSEROUT ["AT+GMM",13] 'Ask model name HSERIN 5000, GSM_CHECK, [WAIT("T610 series")] 'Check model name HIGH PORTB.6 PAUSE 1000 HSEROUT ["AT+IPR=2400",13] 'Set transfer speed HSERIN 5000, GSM_CHECK, [WAIT("OK")]'Check OK reply, wait 5sec max. HIGH PORTB.5 PAUSE 1000 HSEROUT ["AT+CMGF=1",13] 'send AT to modem followed by a CR and line feed HSERIN 5000, GSM_CHECK, [WAIT("OK")]'Check OK reply, wait 5sec max. HIGH PORTB.4 PAUSE 1000 PORTB=%00000000 BEGIN: IF PORTB.5=1 THEN ERROR_CALL IF PORTB.6=1 THEN ERROR_SMS HIGH PORTB.7 pause 1000 LOW PORTB.7 if PORTD.2 = 0 then SEND_SMS IF PORTD.3 = 0 THEN CALL_PHONE PAUSE 1000 GOTO BEGIN SEND_SMS: HIGH PORTB.6 HSEROUT ["at+cmgs=",34,"XXXXX",34,13] PAUSE 1000 HSEROUT ["this is a test message",26] HSERIN 10000, BEGIN, [WAIT("OK")]'Check OK reply, wait 5sec max. LOW PORTB.6 GOTO BEGIN CALL_PHONE: HIGH PORTB.5 HSEROUT ["atd[XXXXX];",13] HSERIN 5000, BEGIN, [WAIT("OK")]'Check OK reply, wait 5sec max. PAUSE 2000 LOW PORTB.5 GOTO BEGIN ERROR_CALL: FOR i = 1 to 5 HIGH PORTB.4 PAUSE 500 LOW PORTB.4 PAUSE 500 next i PORTB=%00000000 GOTO BEGIN ERROR_SMS: FOR i = 1 to 5 HIGH PORTB.4 PAUSE 500 LOW PORTB.4 PAUSE 500 next i PORTB=%00000000 GOTO BEGIN ' END End
Thanks again for your attention and time, I will continue with :
- Improving the program to a real case scenario,
- Think more about the real case scenario, because at first stage I would like to use this as an alarm system for my garden house. I will need some sensors for unexpected visitors or animals.
Do you have any idea, what kind of sensors I can use to detect unexpected visitors?
Regards,
PIC 16F877A
Hi,
I have a problem where i don't how to write a program for my rotation counter.
My system is a rotation counter, It count decrementally. does anyone here can help me on the programming part?
Thank you.
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?