0 Replies Latest reply on Sep 4, 2013 4:59 PM by cy.wbz

    PSoC 4 Pioneer Kit Community Project#086 – GPS Algorithm Example




      In today’s example we are showcasing a simple example to ‘Ghost’ a GPS data stream from the PC to test reading a GPS example. We will use a Hyperterminal application to send down GPS formatted strings using the USB-UART serial bridge and have the PSoC 4 parse that data and display it on an LCD module.


      In many cases certain Arduino shields may be too expensive or users do not have access to the hardware, but they still want or need to develop applications targeting a certain end application. The Pioneer board provides a great interface accomplish this system testing. To ‘Ghost’ the GPS UART data flow we use the onboard USB-UART bridge and a hyperterminal application to mock up our end design. Using this example the user can develop an application that reads GPS data streams from a GPS module without having that module in their test hardware.


      001 - Schematic Design.png


      Forum Post Attachments:


      At the bottom of this post we are including the following items:

      • Example Project Zip File
      • Project Images
      • GPS Sample Data Streams
      • GPS Datasheet


      Components Used: 


      The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

      • Char LCD
      • UART (x2)
      • CyPins


      Firmware Description:


      The main.c firmware is included in the example project. Please review the commented sections for more details.


      The firmware for this PSoC 4 example pulls in GPS data and echoes that data back to the host. The PSoC 4 receives the GPS data using the USB-UART bridge on the PSoC 5LP device. Here the user will be able to use a Hyperterminal application to send the data packet to the target. That data packet will be received and echoed back to the PC and also display that data on an LCD screen.


      The following image is an example of the firmware flow. The firmware checks to see if a valid position fix is obtained. If a valid fix is found then the data is then parsed and displayed on the LCD module.


      011 - Firmware Flow Chart.png


      You will notice in the design we have two UARTS placed. In this design we are only using the Debug UART to communicate with the PSoC 5LP. A second GPS UART has been placed to communicate with a GPS shield. The user will need to decomment the Debug UART code in favor of the GPS UART to communicate with a GPS shield.


      Hardware Connections:


      For this example the user will need to connect the Debug UART component connections to the PSoC 5LP UART bridge.


      The Debug UART is connected to the P3.0 and P3.1 pins. Connect these UART pins to the P12.6 and P12.7 pins on the PSoC 5LP header.


      Next connect an LCD module using a bread board and wires. This section is not necessary since you can see the echoed characters on the hyperterminal application.


      002 - Project Image.JPG


      Test Your Project:


      Program the example into the Pioneer board. Connect the UART to the PSoC 5LP and then launch a hyperterminal application. Use the example GPS commands linked below to transmit a command to the PSoC 4 device.


      I hope this example can help you in your design.