FrustratedEngineer
Newbie level 6
Guys,
This seems ubiquitous topic. I have read few of the topics on similar lines but didn't get satisfactory answer.
The question goes like this...
The PIC mcu is interfaced with SIM800 module.
The data Tx and Rx is done over ISR.
For Tx ISR, the size/length of buffer can be used to make sure when to finish transmission.
But for Rx ISR how to make sure frame is received and there is no byte remaining?
I can see following solutions...
1. Start a timer of 10-50msec after first RX ISR. After every subsequent RX ISR, clear the Timer. When the timer expires, mark it as complete reception of the frame and stop the timer.
2. Look for "\r\n" pattern in the SIM800 response. It should be the termination string.
3. Whatever AT-command is transmitted from PIC, wait for the "Expected Response" (as per SIM800 datasheet). Once the expected response is received, mark as complete frame received.
However, all the above solutions have some sort of problem and is not perfect in it's entirety.
Just want to know, your opinion on this. Which of the above solution is good? Is there any other solution available?
This seems ubiquitous topic. I have read few of the topics on similar lines but didn't get satisfactory answer.
The question goes like this...
The PIC mcu is interfaced with SIM800 module.
The data Tx and Rx is done over ISR.
For Tx ISR, the size/length of buffer can be used to make sure when to finish transmission.
But for Rx ISR how to make sure frame is received and there is no byte remaining?
I can see following solutions...
1. Start a timer of 10-50msec after first RX ISR. After every subsequent RX ISR, clear the Timer. When the timer expires, mark it as complete reception of the frame and stop the timer.
2. Look for "\r\n" pattern in the SIM800 response. It should be the termination string.
3. Whatever AT-command is transmitted from PIC, wait for the "Expected Response" (as per SIM800 datasheet). Once the expected response is received, mark as complete frame received.
However, all the above solutions have some sort of problem and is not perfect in it's entirety.
Just want to know, your opinion on this. Which of the above solution is good? Is there any other solution available?