|
|
View previous topic :: View next topic |
Author |
Message |
GM862 Guest
|
GM862 can't receive any response |
Posted: Wed Apr 08, 2009 1:11 am |
|
|
Hi,
i am trying to commincate with telit gm862-gps.
i have a circuit which can send sms and can make a call but i can't get any response. I tested my circuit with hyperterminal it is working correctly i can send data and receive data. and when i connect the module to hyper terminal i can send and receive data.
But can't receive any thing from module my code is simple.
Code: |
while(true)
{
printf("ATDXXXXXXXX;");
putc(13);
response = getc();
//then i blink a led when any thing is received
}
. |
when i connect it to module it calls the number but can't receive anything.
when i conncet it to hyperterminal it sends and can recieve data to.
i am using ccs 3.249 18F2620 running at 32mhz internal osc.
i am using just 3 pin connection (TX,RX,GND) and module works fine with hyperterminal with this connecion.
sory my exact code isn't here right now.
and i am using HW usart whith correct pins and i have ERRORS in #use_rs232 statement.
Any suggestions |
|
|
Guest
|
|
Posted: Wed Apr 08, 2009 4:30 am |
|
|
post the complete code |
|
|
GM862 Guest
|
|
Posted: Wed Apr 08, 2009 4:45 am |
|
|
complete code isn't with me but i will post it 3-4 hours later.
But as i mentioned before the module and my PIC are working whit PC. |
|
|
GM862 Guest
|
|
Posted: Wed Apr 08, 2009 9:54 am |
|
|
here is my complete code
if i use my circuit with hyper terminal i get the data. when i conncet the gps module to hyperterminal i can get the data when i conncet the module to my circuit i can send data but i can't get the response.
Code: |
#include <18F2620.h>
#use rs232(BAUD = 9600, XMIT = PIN_TX, RCV = PIN_RX, PARITY = N, BITS=8,ERRORS)
#use fast_io(A)
#use fast_io(B)
#fuses INTRC_IO,NOMCLR,BORV28,NOLVP,PROTECT,NOPBADEN,PUT,NOWDT
#use delay (clock = 32000000)
#include <variables.h>
////////////////////////////////////////////////////////////////////////////////
void main(void)
{
setup_oscillator(OSC_32MHZ);
SETUP_ADC_PORTS(NO_ANALOGS);
port_b_pullups(TRUE);
setup_comparator(NC_NC_NC_NC);
setup_adc(ADC_OFF);
setup_ccp1(CCP_OFF);
setup_ccp2(CCP_OFF);
set_tris_a(0x13);
set_tris_b(0xFF);
set_tris_c(0xC0);
delay_ms(30000);
printf("ATE0"); //echo disabled
putc(13);
printf("AT+IPR=9600");
putc(13);
while(TRUE) //sonsuz döngü içerisinde
{
if(BTN_1 == 0)
{
delay_ms(100);
if(BTN_1 == 0)
{
if(kbhit()) gps_location[0] = getch();
printf("AT$GPSACP");
delay_ms(100);
putc(13);
gps_location[0] = getch();
for(sayac = 1; sayac < 10; sayac++)
{
bekleme_sure = 0;
gps_location[sayac] = getch();
}
}
}
}
}
|
|
|
|
GM862 Guest
|
|
Posted: Wed Apr 08, 2009 10:05 am |
|
|
and by the way i am using EZ10 board |
|
|
GM862 Guest
|
|
Posted: Wed Apr 08, 2009 11:24 am |
|
|
Problem solved.
I don't know but i received the response from interrupt it works now.
i did not understand why it was not working but for now i don't care important is it is working. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|