Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interface SIM300 GSM Modem with PIC16F877A thro' MAX232 IC

Status
Not open for further replies.

speedEC

Full Member level 6
Full Member level 6
Joined
Apr 1, 2011
Messages
337
Helped
23
Reputation
46
Reaction score
21
Trophy points
1,298
Activity points
4,324
As requested by some of our forum friends, I have uploaded the basic connection of GSM Modem (DB9 connector) - MAX232 - PIC16F877A - LCD module (JHD) for them to refer.
 

Attachments

  • Circuits_16F877A.JPG
    Circuits_16F877A.JPG
    64.5 KB · Views: 350
Last edited:

thanks. I am using the same connection but the problem remains. I am able to communicate with Wavcom modem but not SIM300 one... Whereas PC is communicating with both of them !
 
I have no problem of communicating GSM Modem using this circuit. have you checked the MAX232 signal whether it go high when receiving/sending message to/from GSM Modem? Have you set correct Baud Rate?

---------- Post added at 15:23 ---------- Previous post was at 15:22 ----------

what is the input voltage to PIC? >=+5v or less?
 

it is less than 5 volt . With same setup I am able to communicate with wavecome modem but not with SIM300 !! And the SIM300 modem works with PC with flow control as XON/XOFF
 

Voltage to MAX232 should be minimum +5v in order to (give >=+12v) function correctly. If it is less than +5v, you have to select MAX3232, etc to communicate serially with GSM Modem. I don't know about wavecome.

---------- Post added at 17:03 ---------- Previous post was at 17:01 ----------

first try Flow-control - "none". Once you got working everything then you can set anything freely in the future.
 

max 3222 datasheet attached. 3.0 to 5.0 input.
 

Attachments

  • MAX3222-MAX3241.pdf
    902.6 KB · Views: 241
have you received anything (like garbage data) or nothing? Are you using LCD to display the GSM modem's messages?
 

I tried with 5 volt also - not working... I sent the data to hyperterminal from uC - Data is perfectly recd. on hyperterminal but does not work with SIM 300 modem :-(
SIM 300 modem works well with PC only on XON/XOFF mode.. Does not work with flow control set to hardware..
 

pl post your code snippet and Circuit Diagram?

Does not work with flow control set to hardware..

try - flow control : none [NOT HARDWARE]

---------- Post added at 13:09 ---------- Previous post was at 13:04 ----------

SIM 300 modem works well with PC only on XON/XOFF mode

It should work with "Flow Control -None" (using Hyper Terminal). If not, the problem not lies on PIC MCU circuit and Code and you have to re-configure (to default settings) your GSM Modem.
 

Hi ,

I think in your hardware the charge pump capacitors are missing ....For MAX232 transreceiver to work ....Charge Pump Capacitors are needed....Please put 1uf capacitors between C1+ and C1- and if you want to use chanel -2 of same chip then also put 1uf between ....C2+ and C2- .....Also you need to have a same 1uf capacitor between V+ and V-....Read the datasheet of MAX232 properly ....Once you are did with the modification and Program the PIC for Serial port communcation in transmit mode....After that you need to send the some thing and see that it get received on any of the application like hyper terminal of your PC.....

Then you can code AT commands for the communcation with GSM card......It is very nice project I had tried some part of it.....

with regards,

Milind
 

I have not mentioned the detailed components of MAX232 in my circuit. Just I gave him a outline (schematic). He has to refer the datasheet of MAX232 for details. Already he communicated his wavecom modem but not SIM300 modem. Hope, he already have MAX232 datasheet on his hand.
 

Yes.... Wavecom works properly... But sim300 does not... I use picbasic.. Will post the code
 
THIS IS THE CODE I AM USING. IT IS WORKING WELL WITH WAVECOM....

SEROUT portb.0, N9600, ["AT+CMGS=","xxxxxxxxxx",10]
PAUSE 500
SEROUT portb.0, N9600, [#CD1,CD2,CD3,26,10]
SEROUT portb.0, N9600, [10]
LOOP: GOTO LOOP
 

See alokdaga, First don't try with complex commands. If you do so, you can't get positive result soon. Just use like ATE0 command initially and you can use all other commands once you received the message at Hyp Term.

Also, there is no complication involved in interfacing GSM Modem using Hi-Tech C. I don't know about PICBasic. You can get the message from the modem within few minutes, if you go step by step. Else, it will take even weeks.

You already accessed wavecom modem. So, there will not be a circuit problem, I think. But, you have to concentrate on GSM modem default settings. You already said that sim300 only works on flow control - XON/XOFF. So, change the GSM Modem (SIM300) settings to factory default and try again sending ATE0 or ATE1. check the reply. It should and must work on flow-control - "none".
 

Hello. Thanks for your reply. It does work with Flow Control none also. I just tested.... But no luck with PIC hardware...

See alokdaga, First don't try with complex commands. If you do so, you can't get positive result soon. Just use like ATE0 command initially and you can use all other commands once you received the message at Hyp Term.

Also, there is no complication involved in interfacing GSM Modem using Hi-Tech C. I don't know about PICBasic. You can get the message from the modem within few minutes, if you go step by step. Else, it will take even weeks.

You already accessed wavecom modem. So, there will not be a circuit problem, I think. But, you have to concentrate on GSM modem default settings. You already said that sim300 only works on flow control - XON/XOFF. So, change the GSM Modem (SIM300) settings to factory default and try again sending ATE0 or ATE1. check the reply. It should and must work on flow-control - "none".
 

Hello, I'm wondering, how do you determine the capacitor for the clock? And PIC16F877A is operating at 20MHz, why do you use 4MHz? I'm sorry I lost most of the basics.
 

PIC16F877A is operating at 20MHz, why do you use 4MHz?
You can select any frequency crystal oscillator based on your requirements.

NOTE: If you use any development board, then you should use the installed crystal oscillator.

how do you determine the capacitor for the clock?

see the page number : 145 of PIC16F877A DATASHEET for selection of capacitors.
 

You can select any frequency crystal oscillator based on your requirements.

NOTE: If you use any development board, then you should use the installed crystal oscillator.



see the page number : 145 of PIC16F877A DATASHEET for selection of capacitors.
If I want to interface a GSM modem with PIC, do I need to worry about the frequency of the PIC or I could just use 4MHz? And how about if I use 20MHz, what effect will it caused? Btw, I only use a breadboard.
 

If I want to interface a GSM modem with PIC, do I need to worry about the frequency of the PIC or I could just use 4MHz?

Nothing to worry about frequency? You can use any frequecy either 4MHZ or 20MHZ.

I only use a breadboard.

it is the best way to communicate with GSM Modem before PCB designing.

details required:
PIC MCU? Modem? IDE? Compiler? Voltage supply to PIC and GSM? Do you have circuits? MAX232 or MAX3222?
 

Nothing to worry about frequency? You can use any frequecy either 4MHZ or 20MHZ.


it is the best way to communicate with GSM Modem before PCB designing.

details required:
PIC MCU? Modem? IDE? Compiler? Voltage supply to PIC and GSM? Do you have circuits? MAX232 or MAX3222?
PIC & circuits are exacly as yours (planned to extend it though). But currenly only have 20MHz oscillator, so I need to find the suitable caps for it and I don't have MAX232 yet. The modem I'm using is Wavecom Fastrack WM20392, which its datasheet is hard to find. I borrowed the modem from the lab, but they shockingly don't have the datasheet. IDE is MPLAB.
The GSM modem is supplied with 12V, while PIC 5V. I need to manage to do basic SMS sending and receiving first and extend it later. My project is still in early stage.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top