Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] i am trying to operate air conditioner with pic 18f4550 and sim900 help!

Status
Not open for further replies.

Kfir Maymon

Member level 1
Joined
Sep 20, 2013
Messages
40
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Location
Israel
Activity points
315
hi,
i am trying to operate air conditioner with pic 18f4550 and sim900,
every thing work great when i sending command throw pc terminal and sometime it`s work even with the pic.

i think my problem is with the timing.


hear is the code:
View attachment 18f4550 sim900 uart.rar
 

What is the actual problem ? What Compiler are you using ?

In your code I don't see any code piece which operates the relay controlling the AC. Do you just want to turn ON/OFF AC using SIM900 and a microcontroller ?
 

sorry,
i am using mikroc a IR led to control the air conditioner and its working,
my problem is when the pic communicate with sim900.
i try to explain with this line:

pic send:AT+CMGF=1
sim900 send:OK
pic send:AT+CMGDA="DEL ALL"
sim900 send:OK
"when sim get sms"
sim900 send:\r\n +CMTI: "SM",1 \r\n
pic send:AT+CMGL="ALL"
sim900 send: \r\n +CMGL: 1,"REC UNREAD","+972542230352","","14/09/23,21:11:21+12" \r\n
ACON(sms content)\r\n

OK

after sim900 send "\r\n +CMTI: "SM",1 \r\n"

nothing happen, if i`m using a pc terminal to send commands to pic (instead the sim900)
everything work fine
 

You have to issue "AT+CMGR=1\r\n" to read the message at index 1. You have to parse the SMS and make decisions based upon data in SMS.
 

For your method AT+CMGL=ALL is ok because you are deleting all messages initially and so the index will be pointing to 1 but it is good to use AT+CMGR=x and read only the required SMS.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top