CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

problem with ublox gps
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 29, 2014 7:04 pm     Reply with quote

This website has messages to turn on/off various Ublox messages:
http://www.zeedless.com/articles.html
This website also has useful information:
http://ukhas.org.uk/guides:ublox6

Example:
Code:
NMEA Message - RMC

$PUBX,40,RMC,0,0,0,0*47 // Turn OFF
$PUBX,40,RMC,1,1,1,0*46 // Turn ON


You could send the message from your PIC to the UBlox GPS
with this statement:
Code:
printf("$PUBX,40,RMC,1,1,1,0*46\r\n");   // Turn ON GPRMC
tatoo



Joined: 26 Aug 2014
Posts: 11

View user's profile Send private message

problem with ublox gps
PostPosted: Sat Aug 30, 2014 7:05 am     Reply with quote

I use the
Code:
$PUBX,40,RMC,1,1,1,0*46 // Turn ON

but i still can not see the RMC .

the code which i use is :
Code:

void main(void)
{
   enable_interrupts(INTR_GLOBAL);
   enable_interrupts(INT_RDA2);

printf("$PUBX,40,RMC,1,1,1,0*46\r\n");

  while(TRUE)
   {

//printf("$PUBX,40,RMC,1,1,1,0*46\r\n");

if (GPSDataReady)
      {
       
            fprintf(PC,"DATA:%s\n",GPSData);
         
         GPSDataReady = FALSE;
      }
 }
}


what is wrong ?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Aug 30, 2014 7:44 am     Reply with quote

1. It's possible that you don't have the correct connections between the
PIC serial port and the GPS.

2. You may not have a Ublox GPS chip, or the model that you have may
not respond to the PUBX commands.

3. You may have a defective GPS chip.

4. You may have a counterfeit GPS chip that you bought on eBay
and it just doesn't work correctly. This can happen on eBay.
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Sat Aug 30, 2014 11:51 am     Reply with quote

Hi,

It's possible that you are trying to send configuration data to the GPS module too soon? Most GPS modules have a start-up sequence and are not ready to receive data immediately. A number of my projects receive NMEA data from a GPS module (various types, but mostly USGlobalSat SiRF chipset), and I send the configuration data to the GPS about 4 seconds after power on. During this time I'm doing some other start-up tasks, and when they are done, I configure the GPS, and then enable the #int_rda interrupt. Try to add some delay before sending the GPRMC On command, and do this all before enabling the Rx interrupt.

John
tatoo



Joined: 26 Aug 2014
Posts: 11

View user's profile Send private message

problem with ublox gps
PostPosted: Sun Aug 31, 2014 12:48 pm     Reply with quote

I suspect that the problem is that i can receive data from the gps but i can not sent data to the gps .

so i can not sent the
Code:

printf("$PUBX,40,RMC,1,1,1,0*46\r\n");
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Sun Aug 31, 2014 1:39 pm     Reply with quote

Hi,

It could be a hardware problem, or you could be sending the wrong commands. Really impossible to tell as you never provided the documentation for the actual module you are using. At the point, the best we can do is make educated guesses.... I really have no clue why you want to handicap yourself, and us, like that?

John
tatoo



Joined: 26 Aug 2014
Posts: 11

View user's profile Send private message

problem with ublox gps
PostPosted: Sun Aug 31, 2014 4:15 pm     Reply with quote

all the data which i have are here:

http://www.speedyshare.com/3PCcz/gps-module.rar
temtronic



Joined: 01 Jul 2010
Posts: 9108
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Aug 31, 2014 4:20 pm     Reply with quote

Ok...while I'm waiting for your files to download...

Do this simple test
Cut code to allow the PC KBD to send data to the PIC,receive it, send out to the 'GPS comport' loopback via a wire, receive the 'GPS data' then send it to the PC screen.

This simple,basic test will confirm whether the PIC and hardware is working OK.
No ISRs, just simple getc() and putc() functions will do.

so
recode/recompile/retest/report back


hth
jay
temtronic



Joined: 01 Jul 2010
Posts: 9108
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Aug 31, 2014 4:37 pm     Reply with quote

sigh... no wonder WHY you're having problems if that dotRAR is the sum total of information you have !

arrgh..

two problems I can see

1) you MUST wait for at least 30 seconds BEFORE trying to access the GPS. OK, the datasheet say 26, but really wait 30.

2) that 'ardunio shield' appears to have a voltage divider in the RX line.If true then the data from the GPS only goes up to 1.5 volts , not enough for the 3V PIC to recognize as a logic level '1'.

My 'hunch' is that #2 is your main probelm, #1 is easily fixed, just add a delay_ms(30000) in main() during your PIC initalization.

also....

use rs232(...) functions normally require a MAX232 type device , yet the GPS is a LVTTL type so ou may need to invert the data. Just an idea...without chips and scope I can't tell for sure...


hth
jay
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 31, 2014 4:47 pm     Reply with quote

The schematic shows a voltage divider consisting of R1 and R3. This
voltage divider will reduce the input voltage to the UBlox RX pin by 50%.

However, there's a problem. We still don't know for sure what UBlox
chip you are using. You gave us the data sheet for the Neo-6, but the
schematic shows a Neo-5Q. And, they have different specs for the Rx
input voltage levels. The Neo-6 data sheet shows Vih is 0.7 * Vdd
which is 2.31 volts. But the Neo-5Q data sheet has a separate spec
for the RxD1 pin. The Vih is 0.91 volts.

Conclusion: If that is really the schematic of your board, and if you
really have the Neo-5Q, then it should work with your dsPIC33.

But, if you are using that schematic, but instead with a Neo-6, the
voltage divider will reduce the signal level to 1.65 volts, and that's
not going to work with the Rx pin on the Neo-6.

So again, as we said over and over to you, we must have full disclosure
of all the facts. What board do you have ? Does your posted schematic
match that board ? And what UBlox chip do you have on the board ?
Until you answer these questions we can't do anything.
tatoo



Joined: 26 Aug 2014
Posts: 11

View user's profile Send private message

problem with ublox gps
PostPosted: Sun Aug 31, 2014 4:52 pm     Reply with quote

I can clearly read from the chip :

NEO-6M-0-001


so the chip is the NEO-6M.

At the board there is a switch(for choose 3.3V or 5V) as input. So the power supply of 3.3V is ok .
temtronic



Joined: 01 Jul 2010
Posts: 9108
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Aug 31, 2014 5:00 pm     Reply with quote

and... to add further confusion..

the GPS data output (pin 20[information FROM the GPS]) is labelled RX becomes the Ardunio shield internal label TXD which the user configures to a real micro pin.....

things were a LOT simpler with RS-232 !!

jay
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Sun Aug 31, 2014 5:58 pm     Reply with quote

Hi,

So, you need to eliminate the voltage divider on the GPS Rx input if you are using the Neo-6 GPS module. Remove the resistor connected to Gnd, and short out the series one. Test, and report back.

John
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Tue Sep 02, 2014 1:28 pm     Reply with quote

Hi,

[Rant]
I guess it should not bother me, but I find it extremely discourteous when someone comes here to the forum, asks for our help, takes part in a back-and-forth exchange of ideas toward a solution, and then - POOF! - suddenly disappears without so much as a status report, a simple thank you, or even an FU.

I'm going to start putting some of these jokers on my 'do not respond' list!
[/Rant]

John
tatoo



Joined: 26 Aug 2014
Posts: 11

View user's profile Send private message

problem with ublox gps
PostPosted: Tue Sep 02, 2014 2:58 pm     Reply with quote

ezflyr i try to find a solution for the resistor.
(The smd components is not my favorite so ... )

Do you think is a good idea to buy another gps (NEO-6m) module (only with gps module without sd card) ?

If yes, can you suggest where can i buy (except ebay )
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 5 of 6

 
Jump to:  
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