Hi all,
I'm using a eZ430-F2103 microcontroller to control a GSM modem. My problem is I don't know what is supposed to happen when you send an ASCII character to GSM modem from the microcontroller. Will the GSM modem respond me back with the same character? Is it just simply sending ASCII characters or there is more to it?
Thank you
Rui
The modem (any modem, for that matter) neither knows nor cares what is connected to it - the interface works as defined in the modem Manual irrespective of whether you connect it to a PC, an ARM, an 8051, a dumb terminal, or anything else!
See http://www.keil.com/forum/docs/thread9113.asp
So the first thing to do is to read the modem's Manual
Armed with that knowledge, you can then experiment by sending commands and observing the responses using Hypoterminal, or a similar terminal program, on a PC or whatever
Hint: whether or not the modem returns characters as you type them is known as Echo, and is controlled by the ATE command.
http://www.keil.com/forum/docs/thread9178.asp
"... read the modem's Manual ... experiment by sending commands and observing the responses using Hypoterminal"
Once you've done that, start your microcontroller software in the Simulator, direct the simulator's serial IO to the PC's COM: port, and connect the modem to the COM: port.
This will make it very easy to test & debug.
http://www.keil.com/support/man/docs/uv3/uv3_cm_assign.htm http://www.keil.com/support/man/docs/uv3/uv3_cm_mode.htm
Are you using a true Modem, or is it just a module?
A true Modem will be designed to connect to an RS232 port - eg, a PC's COM port - so your microcontroller interface will need to include an RS232 transceiver (MAX232 or equivalent).
A module may well not use RS232 signal levels and could be damaged by them; so you should not connect it direct to any RS232 device (including a PC) without adding a suitable RS232 transceiver (see below).
A module may well not even use standard 5V or 3V logic levels - check the Manual and/or Datasheet carefully to see if any special level translation is required...
Note that all this is just about hardware signal levels - it doesn't affect the commands sent betwenn the modem and the PC, terminal, 8051, or whatever
You replied in a new thread, so your reply has is totally disconnected from the start of the discussion!
http://www.keil.com/forum/docs/thread9270.asp#msg43265
"Yes, my GSM modem is a module and thus it can be connected ... to a microcontroller without the RS232"
Wait! Don't just assume that - have you verified that in the Datasheet
As I said, some (many?) modules do not use standard 5V or 3V logic levels - so they do need some sort of level-translation in the connection to the microcontroller. If you ignore this, you may damage the module!
"Right now I am trying to get the right baud rate with the clock frequency, so that the module and the microcontroller will be speaking the same language."
Yes, obviously that is fundamental!
See The baud rate calculator: http://www.keil.com/c51/baudrate.asp
"Tell me more if you have more to tell me."
I don't think there's anything more that relevent at the moment; just to reiterate the starting steps:
1. Read the module's Manual - in particular, its AT Command Set. Follow the links I gave earlier to other sources of information. Search the manufacturer's support site. Google.
2. Experiment with Hypoterminal (or simialar) to send commands manually and observe the responses (you will need the RS232 transceiver).
3. Simulate
4. Run in target.
There is ATE command which is supported by number of GSM modems. First you check whether this command is supported by the GSM modem which you are using. This command is used to determine whether or not the modem echoes characters received by an external application(DTE). Usually command works like this Command: ATE0 Response: OK Now the characters are not echoed and in this case you cannot see the characters which you type, on the Hyperterminal.
Command: ATE1 Response: OK Now the characters are echoed and you can see the characters which you type, on Hyperterminal
"ATE command which is supported by number of GSM modems"
I'd be fairly confident to say that this is available on all modems that support AT commands - not just GSM modems!
"the characters are not echoed and in this case you cannot see the characters which you type, on the Hyperterminal"
To be precise, the characters are not echoed by the modem - so you won't see what you type unless you set your terminal to local echo.
If you set your terminal to local echo and enable echo on the modem (ATE1), you will see double!