View previous topic :: View next topic |
Author |
Message |
elavarasu
Joined: 31 Mar 2011 Posts: 2
|
need help on gsm message reading in lcd |
Posted: Thu Mar 31, 2011 9:33 pm |
|
|
Friends I need the help to on and off the leds according to the message I have sent to the gsm through pic16f877a.
I can send the sms from controller but I need the reception logics.
gsm module is 7.07 version, it is a TTL logic so needn't for the rs-232
I am connecting the gsm directly to the micro controller.
plz help me I am doing university project need to submit it as soon as possible. _________________ --ELAVARASU-- |
|
|
hussain_kiet
Joined: 22 Sep 2008 Posts: 6
|
|
Posted: Fri Apr 01, 2011 12:57 am |
|
|
if you can send the data from controller via rs232 then it is fairly easy to receive as well...
just go through some tutorial on how to receive data via rs232... _________________ !!!!...HUSSAIN AFTAB...!!!! |
|
|
elavarasu
Joined: 31 Mar 2011 Posts: 2
|
|
Posted: Sun Apr 03, 2011 12:41 am |
|
|
i am using to connect the GSM directly because it support the TTL logic the model is GSM SIM300 VERSION 7.O7.... _________________ --ELAVARASU-- |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19550
|
|
Posted: Sun Apr 03, 2011 3:09 am |
|
|
Understand, that the PIC, _does not use RS232_!. It uses async TTL serial. To actually use 'RS232', you have to add a transceiver chip like the MAX232. The #use RS232 routines in the PIC, use TTL serial, so will work fine with your GSM module. It is to my mind a 'confusing' naming from CCS, used, because the _commonest_ connection made to the TTL serial, then has the transceiver chip, and goes to a RS232 connection. However if you look at the RS485 examples, these too use '#use RS232', though they are using RS485.
So just use the CCS 'RS232' routines. These will talk to your GSM module.
Best Wishes |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Sun Apr 03, 2011 1:01 pm |
|
|
Hi All,
I think it's pretty clear that the OP understands the distinction between "TTL" and RS232" serial communications - in fact he mentioned that twice !
Do you have the datasheet for the GSM module? You will need to "poll" the module periodically to see if an incoming message has been received as the module will not alert you automatically. Look at the List Messages command (+CMGL). Once the command has been sent to the GSM module, you'll need to receive it with the PIC. I would recommend that you study the format of the reply, and design a reception routine that places the reply into an array of characters. You can then parse the array to get the data you need contained in the SMS message.
When I was working on a GSM project I found it helpful to connect the module to the serial port of my PC using a MAX232 interface IC before connecting it to the PIC. This strategy allowed me to play with the commands that I would be using, and get an idea what the module response would be.
That should get you started!
John |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19550
|
|
Posted: Sun Apr 03, 2011 2:33 pm |
|
|
Yes, but it is not clear that he understands that the 'RS232' code on the PIC, then applies. There have been several GSM decoder projects on this site, and code already exists to pull standard stuff like lat and long, from the GSM stream, which will work just as well for his module as for one that attaches with 'RS232'.
Best Wishes |
|
|
|