Microcontroller › 8051 › 8051 keeps executing › Hi Sandeep,It happens just
July 26, 2013 at 4:32 am #10204
It happens just because of the absence of while(1) loop in your code.
Once your code done all the steps it simply won’t stop anmd remain idle, rather it redo executing from the first step. To avoid such situation people use while(1) or infinite loop at the end of their code. It helps in such a way that once the entire code is finished executing the controller enters into the infinite loop and remains there idle.
at the end of your code and i hope it will solve the proble.
Also connect the Rx pin of the MCU to the Tx pin of the SIM300 only when it is necessary.