ericparggah
Newbie level 5
- Joined
- Oct 18, 2008
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,352
Hello All,
I am working on a GSM based device control system based on the PIC16F876 and a SIM900 module from Rhydozlabs. The compiler i am using is the FED WIZ-C version 17.02.
I need to be able to control 4 devices but in the meant time just trying to make sure one works before i tackle the rest. The problem is that I want to turn on port RB4 using the command: TV ON with the code as shown below:
When I comment out the line:
then the Device_A turns on. Without commenting out that line then it doesn't turn on. I need to use that line to test the various command strings for the four different devices.
Any help will be most appreciated.
Thanks in advance.
I am working on a GSM based device control system based on the PIC16F876 and a SIM900 module from Rhydozlabs. The compiler i am using is the FED WIZ-C version 17.02.
I need to be able to control 4 devices but in the meant time just trying to make sure one works before i tackle the rest. The problem is that I want to turn on port RB4 using the command: TV ON with the code as shown below:
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 void UserLoop() { if(RxFlag) { ReadGsmLine(&GsmResponse); if(memcmp("+CMTI: \"SM\",", &GsmResponse, 12) == 0) { ReadSmsCommand[8] = GsmResponse[12]; DeleteSmsCommand[8] = GsmResponse[12]; SendGsmCommand(&ReadSmsCommand); Wait(1000); ReadGsmLine(&GsmResponse); //Read modem response ReadGsmLine(&ControlInstruction); // Read Instruction ReadGsmLine(&GsmResponse); //Read modem response ReadGsmLine(&GsmResponse); //Read modem response OK if(memcmp("TV ON", &ControlInstruction, 5) == 0) // ------(Remove) { Device_A = ON; } SendGsmCommand(&DeleteSmsCommand); Wait(1000); ReadGsmLine(&GsmResponse);//Read OK } } }
When I comment out the line:
then the Device_A turns on. Without commenting out that line then it doesn't turn on. I need to use that line to test the various command strings for the four different devices.
Any help will be most appreciated.
Thanks in advance.
Last edited by a moderator: