We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i need to get a c code for interfacing the microcontroller to a GSM Modem only to send sms, i have read all the AT COMMANDS of the sms and the data sheet shows me how to use the modem through the hyper terminal of the windows but it doesn't show how to interface with a micro ? can any one describe what are the steps of this ? and i need the hardware interfacing scheme to do this ? if any one have a usefull link please co-operate . thank you
You interface it in the same way when using a microcontroller as you do when interfacing with a PC. If the GSM modem is using RS232 levels, you need a MAX232 or similar to convert from TTL levels.
If you have a document describing how to connect the GSM modem to a PC, why (and how) do you expect us to be able to supply information about how to connect it to a microcontroller, when we don't know which modem (we don't have your documents) and which processor...
Select a microcontroller with a at least one serial port and google for examples of using that serial port together with a MAX232 chip. That should be enough to connect almost any external equipment. If you need more handshake signals - just take more pins from the uC and use in a similar way.
See: http://www.keil.com/forum/docs/thread9113.asp
And use the 'Search' facility to find the very many (and recent) threads that have already covered all this at great length!
Thank you for replying iam interfacing a uc arm lpc2119 philips with a gsm modem benq MOD9001 . all what i need is hardware description of the max232 and how can i write AT commands to the modem from the uc ?
thank you
"all what i need is hardware description of the max232"
Note that Per said, "MAX232 or similar" (my emphasis). The MAX232 is a 5V device - quite possibly your lpc2119 is 3V? Therefore you will require a similar device for 3V use.
The details will be in the device Datasheet - for MAX... devices, go to http://www.maxim-ic.com Many other manufacturers also make similar devices.
For examples of using RS232 transceivers with NXP (formerly Philips) chips, go to the NXP website. Also take a look at the schematics of evaluation boards; eg, http://www.keil.com/boards/
"how can i write AT commands to the modem from the uc?"
AT Commands are just ASCII-coded serial data - so sending AT commands is no different to sending "Hello, world" to a terminal. If you don't know how to send "Hello, world" to a terminal, then you really need to cover that basic ground before moving on to GSM Modems...
There are a number of follow-up chips based on the legendary MAX232 chip. Some of them has better voltage range. Some have better ESD protection. Some of them may work with smaller capacitors.
One of the similars might be the MAX3232, which supports 3-5.5V.
The important thing to remember is that electrically, the uC doesn't care what external equipment that is connected on a serial port. If you find a schematics for a physical serial port with an LPC2119 (or a number of other chips in the LPC series), you can extrapolate the information.
The things you must know is if the modem is using TTL levels (and in such case which voltage) or true RS232 levels, and which signals are RX, TX, GND, ... If the modem supports external power, it helps to check if you can use a common power source for ARM and modem.
Since you know how to connect the modem to a PC, my assumption is that the modem is using true RS232 signal levels. Hence my reference to the need of a MAX232 or similar to adapt between RS232 levsls and the voltage levels of the ARM chip.
"The things you must know is if the modem is using TTL levels (and in such case which voltage)"
Note that many GSM modules (as opposed to true modems) do not use standard logic voltage levels; ie, not 3.3V and not 5V - so be sure to read the Datasheet very carefully!
Again, this has been discussed recently in other threads here - use the 'Search'