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.

Connecting MicroController to GSM modem via RS232

Status
Not open for further replies.
We are not angry with you mpch_elec.. we are just trying to help you.....

i just wanted to know if you aer trying and not getting output for our suggestion or waiting for others answers tooo which is not wrong..... If you update that you tested our suggestion without success then we can give more suggestion for it....

**broken link removed**
 
thanks friends... i must check my signal with oscilloscope
i will go to university tomorrow.
 

Hi ckshivaram,
I've also same problem i'm able to communicate with sim300 module to pc via hyper terminal but unable to comunicate with PIC16f877a to sim300 cause may be improper command send to module via uC I'm using CCS compiler Please help me to solve problem.........How can i send enter and cntrlZ via uC.
 

ctrl+Z is 0x1A or (26)
**broken link removed**

connect controller board to terminal and test if the program send correct AT commands and responds to your response from hyperterminal...
 

check the data sheet for the modem .... as i remember pin connection of the modem is 2,6,9,14. i couldnt remember the order rx,tx,ground. reset.
 

This is my program t send at command but i can't get ok from module. Please how to send At command to module (please send me a sample prgam tosend at command )using CCS compiler.

#include <16F877A.h>
#device adc=8
#use delay(clock=4000000)
#fuses NOWDT,XT, NOPUT, NOPROTECT, NODEBUG, BROWNOUT, LVP, NOCPD, NOWRT
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
void main()
{
setup_adc(ADC_CLOCK_DIV_2);
//setup_pp(PMP_DISABLED);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
delay_ms(5000);

while(1)
{
printf("AT");
printf(0x0d);
printf(0x1a);
delay_ms(5000);
}
}

---------- Post added at 08:52 ---------- Previous post was at 08:46 ----------

Hi ckshivaram sir,
I checked all as u say both responds to hyper terminal but not with each other i think i'm unable to send properly. Please tell me with a sample program means how can i send at command and after how can i send enter key or ctrlZ key via uC to module...
 

see my earlier post i have given you ascii of ctrlZ.... in that case confirm if it responds to ctrlZ or ENTER( cr + lf).....

if they dont respond try swapping tx and rx pin on one side of the cable interfacing controller and modem....

Are you using same cable to test controller boars and modem.. it should be same cable foe testing both.... or else you swap the rx and tx pin on one side of cable......

---------- Post added at 14:23 ---------- Previous post was at 14:18 ----------

either you should give (0x0a and 0x0d) in combination or give only 0x1a..... check that also.....
i dont see you waiting for OK response in the program... where are you receiving the response of modem.. receive and display ok or error on LCD for confirmation... you cannot get response if you put it in while(1) loop as it sends in microseconds... send the data and after printing ok or error put while(1);
 

Dear Sir,
I send command from uC but receiving on hyper terminal.
But sir please tell me how to send (0x1a) or (0x0d)after "AT" is my procedure to send command is rite or wrong please reply with sample code how to send (0x1a)(0x0d) in program.:roll:
 

in your program where are you sending the commands... its just printf.. you need to send it through UART... i dont think you have experience in programming....

first write a program to send and receive message from hyperterminal... then you will undrstand how to do it for modem...

you need to send serially the data to modem.... and wait for its response...
 

Dear Sir,
Now i can made the code working myself thanx for Ur kindly help........
 

hi, all

I have a problem with sim300W module, please help.

When i connect my module to hyper terminal via RS232. It do nothing, i am even enable to type command from hyper terminal.
Remember i am using SIM300W Module Not Modem.

Pin Connections:
MAX232-------------DB9--------------------SIM300W
P16 --> VCC
P15 --> GND
P14----------------- P2
P13----------------- P3
----------------------P5 -->GND
P11--------------------------------------------- TX
P12--------------------------------------------- RX
-----------------------------------------------VBAT--> 5V
-----------------------------------------------GND --> GND
 
Last edited:

Friends, Now i solve the issue, i can now write on hyperterminal screen, but this is a garbage value, different from what i was typing.

Is it a problem with baud rate or connections?

Thanks in advance
 

its baud rate problem. keep changing the baud rate in hyperterminal and keep testing. for some baud rate setting the response will be correct and not junk. when you get the correct response the change the baud rate of the modem using AT+ IPR = 9600.
then do an AT&W.
then change the baud rate of hyperterminal and reset the modem and see it work on 9600 baud rate.
 

hi, ckshivaram

I have just tried these commands.

But it still sending the gerbage values.

And now when i reset the module using its reset pin pulled down to ground. It works fine, but when i restart the supply, it again sending the gerbage valuse.

I also tried baud rate setting command as AT+IPR=9600

But when i unplug the module and again power on, it gives the same gerbage valuse until i reset it by RESET key.
 

screenshot of what?

Default baudrate is 9600, i checked by AT+IPC?

Reset button means PWR KEY of module.

When i power on the supply, and type in hyper terminal. it gives garbage value. And then i pulled down PWR KEY of module, and then it accept all the at commands. Is it a way, so i may not use this PWR key. Just Power up my supply and it starts working?
 

Now i solved the issue with garbage values by resetting the module after power on.

I new problem is faced now, when i insert the sim card in the module, it restarts after each 5 secs. I am seeing this response rapidly.

FUN:1

CPIN=Ready

Call Ready

and then again


FUN:1

CPIN=Ready

Call Ready

And then again and again and again, after each 5 sec.

Can any body tell me whats the matter?

Thanks in advance:
 

its power supply problem. the modem is getting reset repeatedly. please tell me how much voltage and current you are using. it needs 12V 1A power supply minimum, and it has 5V regulator in the modem. or they use LM317 in modems sometimes.
 

I am using 9V DC Battery to give it power.

For voltage regulator, i am using LM7805, it can provide 1A of current and 5V. This supply powering up SIM300W and MAX232.
When i gave it 5V, modem response was:
Maximum Power limit exceed

and then
Normal Power Down.

So i implant the DIODE after Regulator for simpler voltage divide which drops 0.7 Volts and sim300W got 4.3V

Its working well when i don't insert the SIM card, but when i insert the sim card, it starts reseting automatically.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top