Jump to content
  • 0

PmodGps connection to Zedboard


Sridhar Prasath Aruppukottai Ganesan

Question

Hello all,

I have connected PmodGps to JA connector of zedboard.  I have downloaded the pmod example code(Microblaze) and did a little modification for Zynq devices. The code is listed below. For some reasons the code does not seem to be working. (The build is finished but there is blank terminal. Its not going inside that while loop. Probably because GPS.Ping does not get any data).

And there is a minor warning in one of the files of  BSP (bsp -> ps7_coretexa9_0 -> libsrc -> PmodGps_v1_1 - > src - PmodGPSselftest.c). I have attached the screenshots for better understanding. 

Please help me with this.

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/************ Include Files ************/
#include "PmodGPS.h"
#include "xil_cache.h"
#include "xparameters.h"
#include "xil_printf.h"
/************ Macro Definitions ************/
#ifdef XPAR_CPU_CORTEXA9_0_CPU_CLK_FREQ_HZ
#define PERIPHERAL_CLK 100000000 // FCLK0 frequency is not in xparameters.h for some reason
#else
#define PERIPHERAL_CLK XPAR_CPU_M_AXI_DP_FREQ_HZ
#endif
/************ Function Prototypes ************/
void DemoInitialize();
void DemoRun();
/************ Global Variables ************/
PmodGPS GPS;
/************ Function Definitions ************/
int main(void) {
    DemoInitialize();
    DemoRun();
    return 0;
}
void DemoInitialize() {
    GPS_begin(&GPS, XPAR_PMODGPS_0_AXI_LITE_GPIO_BASEADDR ,
            XPAR_PMODGPS_0_AXI_LITE_UART_BASEADDR, XPAR_CPU_CORTEXA9_0_CPU_CLK_FREQ_HZ);
    GPS_setUpdateRate(&GPS, 1000);
}
void DemoRun() {
   while (1) {
      if (GPS.ping) {
         GPS_formatSentence(&GPS);
         if (GPS_isFixed(&GPS)) {
            xil_printf("Latitude: %s\n\r", GPS_getLatitude(&GPS));
            xil_printf("Longitude: %s\n\r", GPS_getLongitude(&GPS));
            xil_printf("Altitude: %s\n\r", GPS_getAltitudeString(&GPS));
            xil_printf("Number of Satellites: %d\n\n\r", GPS_getNumSats(&GPS));
         } else {
            xil_printf("Number of Satellites: %d\n\r", GPS_getNumSats(&GPS));
         }
         GPS.ping = FALSE;
      }
   }
}   

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


 

gps1.JPG

gps2.JPG

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi @Sridhar Prasath Aruppukottai Ganesan,

The PmodGPS IP core should work with the zedboard without needing to alter it. Are you using the vivado library here? Where are you testing this project? Are you outside or very close to a window.  Is there tall buildings near where you are testing your project? The demo will not print anything unless it has acquired a satellite.

thank you,

Jon 

Link to comment
Share on other sites

Hi @jpeyron Thanks for the reply. You are the one who is replying to my question every time. Thank you so much.  I have used pmodgps ip and ran the sample code ...It didnt work for me. I have waited for almost half an hour near the window. Instead, I have created AXI UARTLITE IP and connected the tx and rx pins of gps module and created a manual custom code to parse the streaming data. Now its perfectly working with my manual code. Thank you again.

 

If you have time, try to look at my next post about GSM module. I am really trying to find the answer for the past 10 days. Thank you in advance.

Link to comment
Share on other sites

Hi @Sridhar Prasath Aruppukottai Ganesan,

Rural canyons(buildings making it impossible to acquire a gps signal) can be an issue along with signal strength in a building. The code you have will not print anything until you acquire a gps satellite. I would suggest to go outside like to a park or on top of a building to better acquire a satellite.

thank you,

Jon  

Link to comment
Share on other sites

hi @jpeyron Thanks for your reply. The code I have designed is printing the streaming data and I have managed to parse the data (latitude,longitude,time,date etc) and store it in the memory. Infact, that is what I needed to do with pmodgps by connecting pmodgps ip. But unfortunately, for vivado 2017.4, I think there is a problem with pmodgps ip . So I decided to do it with AXI uartlite Ip and do manual coding . Even there is no problem with pmodgps ip,  have managed to collect the data with my code and my purpose has been served. So, I dont need to do it with pmodgps IP anymore. My next task is to send the data to server via gsm module. So if you have your valuable time,please have a look at my querry about my GSM module.

Warm regards,

Sridhar Prasath

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...