I am using p89c51Rd2 chip serial port is connected to modem port after dialling connection is established but ,didn't receive "CONNECTED 9600" string to progarmm is problem with speed of serial port? I have treid using getchar and GetByte routine
The standard method of getting back to command mode is: 1 second pause then three "+" characters rapidly then another 1 second pause. Toggling DTR is a much quicker way to get there, but you have to send a specific command to the modem to enable this behaviour, see the manual.
"Toggling DTR is a much quicker way" and a lot easier - none of that critical timing! "but you have to send a specific command to the modem to enable this behaviour" The "Guard Time" (1 second before & after, in your example) and the "Escape Character" ('+' in your example) will also all be programmable via S-Registers; possibly also the time between "Escape Characters" "see the manual" what else?!