polarized
Member level 4
Hi all,
I am trying to communicate towards an GSM modem and at the begining of my code after reset(the modem is already in the POWER ON state and ready for communication) I transmit the following sequence
AT\r\n
The echo of the modem is enabled and he should respond with this:
AT\r\nOK\r\n
Then I compare the data in the serial receive buffer with the string I should receive, but I do not have a same respond. Due to the lack of debuging tools I do not know what is actually hapening. The serial port of the 8051 is properly working and transmiting data on 19200, I checked this. The modem is also working properly I checked it from the hyperterminal on the same 19200 speed. The compare routine which compares the serial receive buffer with the response string should also be good. Does anyone of you have a clue, what could be the error? Maybe something with \r\n sequences, but I think I got it correctly, I mean the carriage return and line feed sequence. And I forgot to mention I also use at the same time the other serial port but on a different speed of 4800 and both of the UARTS are properly working, I checked this. Is there a possibility of some problems when 2 UARTS are working at the same time(and also the timer0 interrupt), I mean the priority of the interrupts etc...This 89C420 is very fast and can handle in my opinion the "pressure" on it very easy.
Regards.
I am trying to communicate towards an GSM modem and at the begining of my code after reset(the modem is already in the POWER ON state and ready for communication) I transmit the following sequence
AT\r\n
The echo of the modem is enabled and he should respond with this:
AT\r\nOK\r\n
Then I compare the data in the serial receive buffer with the string I should receive, but I do not have a same respond. Due to the lack of debuging tools I do not know what is actually hapening. The serial port of the 8051 is properly working and transmiting data on 19200, I checked this. The modem is also working properly I checked it from the hyperterminal on the same 19200 speed. The compare routine which compares the serial receive buffer with the response string should also be good. Does anyone of you have a clue, what could be the error? Maybe something with \r\n sequences, but I think I got it correctly, I mean the carriage return and line feed sequence. And I forgot to mention I also use at the same time the other serial port but on a different speed of 4800 and both of the UARTS are properly working, I checked this. Is there a possibility of some problems when 2 UARTS are working at the same time(and also the timer0 interrupt), I mean the priority of the interrupts etc...This 89C420 is very fast and can handle in my opinion the "pressure" on it very easy.
Regards.