Hi
I am working on a gsm project. I can send all the AT commands to the gsm modem(u-blox leon g-100). Sending an sms has not been a problem.
The problem i do have is receiving from the gsm modem.
If i send the command AT, it returns OK. i want to read this in and check that OK was sent before sending the next command. If i do not check for the returned text i will not know if there was an error and the commands will keep sending and nothing will happen due to the error.
Once i can get this working, I would like read in a text measage sent to the gsm and switch on a output on the pic depending on the measage received.
In another post i got help on how to compare the text, but i have NO idea how to read the info in from the usart and the process it.
I am using a pic18f4520 and assemble.
Please help i have been struggling now for 5 days and it is getting me down.

I am working on a gsm project. I can send all the AT commands to the gsm modem(u-blox leon g-100). Sending an sms has not been a problem.
The problem i do have is receiving from the gsm modem.
If i send the command AT, it returns OK. i want to read this in and check that OK was sent before sending the next command. If i do not check for the returned text i will not know if there was an error and the commands will keep sending and nothing will happen due to the error.
Once i can get this working, I would like read in a text measage sent to the gsm and switch on a output on the pic depending on the measage received.
In another post i got help on how to compare the text, but i have NO idea how to read the info in from the usart and the process it.
I am using a pic18f4520 and assemble.
Please help i have been struggling now for 5 days and it is getting me down.
Last edited: