GPS evaluation board and GPS receiver

Bluetooth, XBee, RF......

Re: GPS evaluation board and GPS receiver

Postby ober » Thu May 20, 2010 5:08 pm

Jiewy WROTE:Ii am using PIC16f877a which read TTL(5V). I will have to use a max232cpe like wat u said earlier on. May i know the voltage logic level for the gps side?


so you want to make the MAX232 for PIC16F877A, right? Yup, you should try that one out.

As for the GPS side, it is stated in GPS module data sheet. It should be 3.3V logic, that is the reason why the evaluation board is using different type of MAX.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: GPS evaluation board and GPS receiver

Postby Jiewy » Fri May 21, 2010 11:13 am

Mr ober, i decided not to use the max232 anymore. I check using the oscilloscope. It is generating too much noise. I cant even have a 'standard waveform'. It is just too distorted.

I found another way to connect the eval to pic. Pls take a look at it in this link. http://tom.pycke.be/mav/84/connecting-m ... controller

Well after using this connection, and this code

CODE: SELECT_ALL_CODE
#include <stdio.h>
#include <htc.h>
#include "lcd.h"
#include "usart.h"

__CONFIG(0x3f71);

void main ( void )
{
   unsigned char input;

   // Initializations
   lcd_init();
   init_comms();

   printf ( "Starting app...\r\n" );

   lcd_goto ( 0x00 );

   lcd_puts ( "Rx:" );

   while ( 1 )
   {
      // Body
      input = getch();
      lcd_putch ( input );
      printf ( "Detected [%c].\r\n", input );
   }
}


My lcd can only display $PM or $GP which looks like a mtk packet or a nmea code.
Is this code problem or still hardware connection problem?
Jiewy
Novice
 
Posts: 24
Joined: Sun Mar 21, 2010 9:33 pm

Re: GPS evaluation board and GPS receiver

Postby ober » Fri May 21, 2010 4:04 pm

Jiewy WROTE:Mr ober, i decided not to use the max232 anymore. I check using the oscilloscope. It is generating too much noise. I cant even have a 'standard waveform'. It is just too distorted.

I found another way to connect the eval to pic. Pls take a look at it in this link. http://tom.pycke.be/mav/84/connecting-m ... controller

My lcd can only display $PM or $GP which looks like a mtk packet or a nmea code.
Is this code problem or still hardware connection problem?


I think you better take a look at previous discussion here. You actually have similar problem with him. http://forum.cytron.com.my/viewtopic.php?f=9&t=10370&start=20
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: GPS evaluation board and GPS receiver

Postby Jiewy » Mon May 24, 2010 1:37 am

Awesome! I have managed to receive the nmea data and parse the nmea into data that i want to use. Thanks ober. And .. where can i post guidelines to my project once its done?
Jiewy
Novice
 
Posts: 24
Joined: Sun Mar 21, 2010 9:33 pm

Re: GPS evaluation board and GPS receiver

Postby ober » Mon May 24, 2010 9:25 am

Good to hear you are working well and thanks for the willingness to share.

If you want to really share it, you can submit the article to our magazine at here: http://www.robothead2toe.com.my/userpage.php?id=submitarticle

Or you can also send to me at ober@cytron.com.my and I can share it at our blog here: http://blog.cytron.com.my/
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: GPS evaluation board and GPS receiver

Postby Jiewy » Wed May 26, 2010 11:22 pm

Ober, i have a problem in getting the right lat and long. Everytime my lcd will keep show me the invalid lat and long. Practically, the lat and long will keep changing slightly even if i am standing still. Right? But wat i am getting is jsut 8960 for lat and 0000 for long. Can u pls check my code and see if its correct?

CODE: SELECT_ALL_CODE
#include <stdio.h>
#include <htc.h>
#include "delay.h"
#include "lcd.h"
#include "usart.h"

__CONFIG(0x3f71);

void main ( void )
{
   unsigned char tmp;
   unsigned char validFlag;
   char latitude [ 12 ], longitude [ 12 ];
   unsigned char NSIndicator, EWIndicator;
   unsigned char counter;

   lcd_init();
   init_comms(9600);

   TRISD4 = 0;

   printf ( "Starting app...\r\n" );

   lcd_goto ( 0x00 );
   lcd_puts ( "GPS App" );

   lcd_goto ( 0x40 );
   lcd_puts ( "Validity: " );

   while ( 1 )
   {
      // Body
      RD4 = 1;
      while ( getch() != '$' )
         continue;

      if ( getch() != 'G' )
         continue;

      if ( getch() != 'P' )
         continue;

      if ( getch() != 'R' )
         continue;

      if ( getch() != 'M' )
         continue;

      if ( getch() != 'C' )
         continue;

      if ( getch() != ',' )
         continue;

      while ( getch() != ',' )
         continue;

      validFlag = getch();
      getch();

      for ( counter = 0; counter < 11; ++counter )
      {
         tmp = getch();

         if ( tmp != ',' )
            latitude [ counter ] = tmp;
         else
            break;
        }

      latitude [ counter ] = '\0';

      NSIndicator = getch();
      getch();

      for ( counter = 0; counter < 11; ++counter )
      {
         tmp = getch();

         if ( tmp != ',' )
            longitude [ counter ] = tmp;
         else
            break;
        }

      longitude [ counter ] = '\0';

      EWIndicator = getch();
      getch();

      lcd_goto ( 0x4a );
      lcd_putch ( validFlag );

      lcd_goto ( 0x14 );
      lcd_puts ( latitude );
      lcd_putch ( ' ' );
      lcd_putch ( NSIndicator );
        lcd_puts ( "    " );

      lcd_goto ( 0x54 );
      lcd_puts ( longitude );
      lcd_putch ( ' ' );
      lcd_putch ( EWIndicator );
      lcd_puts ( "    " );
      RD4 = 0;
   }
}
Jiewy
Novice
 
Posts: 24
Joined: Sun Mar 21, 2010 9:33 pm

Re: GPS evaluation board and GPS receiver

Postby waiweng83 » Thu May 27, 2010 3:45 pm

Please make sure you test the GPS at outdoor or location that GPS fix can be obtained.
With the power of dream, nothing is impossible...
User avatar
waiweng83
Moderator
 
Posts: 205
Joined: Wed Apr 15, 2009 2:17 pm

Re: GPS evaluation board and GPS receiver

Postby Jiewy » Thu May 27, 2010 4:42 pm

I tried testing it for over 1 hour under the open sky and the values doesnt changed. It just shows me 8900 for lat and 0000 for long. And when i off and on my circuit quickly, the values changed to a correct valid values and then once again, it just hangs at that value...
Jiewy
Novice
 
Posts: 24
Joined: Sun Mar 21, 2010 9:33 pm

Re: GPS evaluation board and GPS receiver

Postby ober » Fri May 28, 2010 11:00 am

You can verify the GPS data by connect it to evaluation board, and to computer. The data should update even the signal is not locked.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: GPS evaluation board and GPS receiver

Postby Jiewy » Fri May 28, 2010 11:08 am

When i change the program to just show the nmea sentence, it can get a fixed lock in no time at all. xD

Then when i use the parsin code, it just keeps showing me invalid code. Tell u wat, its okie i will try to continue to work it out.
Jiewy
Novice
 
Posts: 24
Joined: Sun Mar 21, 2010 9:33 pm

PreviousNext

Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 16 guests

cron