Difference between revisions of "GPS Application Guide"

From Flowcode Help
Jump to navigationJump to search
 
Line 22: Line 22:
 
|+Hardware Setup
 
|+Hardware Setup
 
|-
 
|-
 +
|
 
|EB006
 
|EB006
 
|PICmicro multiprogrammer
 
|PICmicro multiprogrammer
|
 
 
|-
 
|-
 +
|Port A
 
|EB004
 
|EB004
 
|E-blocks LED board
 
|E-blocks LED board
|Port A
 
 
|-
 
|-
 +
|Port B
 
|EB005
 
|EB005
 
|E-blocks LCD board
 
|E-blocks LCD board
|Port B
 
 
|-
 
|-
 +
|Port C
 
|EB056
 
|EB056
 
|E-blocks GPS board
 
|E-blocks GPS board
|Port C
 
 
|-
 
|-
 +
|Port D
 
|EB007
 
|EB007
 
|E-blocks push-to-make switch board
 
|E-blocks push-to-make switch board
|Port D
 
 
|}
 
|}
 
  
 
== Example 1: GPS time and date acquisition and display ==
 
== Example 1: GPS time and date acquisition and display ==

Latest revision as of 15:00, 3 September 2014

Introduction

These examples demonstrate the use of the Flowcode GPS (Global Positioning System) component.

In particular they make use of the EB056 E-blocks GPS board, connected to an EB006 E-blocks PICmicro multiprogrammer fitted with a 16F1937 microprocessor.

However, the examples are easily changed in Flowcode to support other microprocessors and platforms.

The Matrix TSL EB765SI6 Easy GPS bundle has all the items required for these sample applications and is an ideal introduction to Global Positioning System technology.


Setting up the project hardware

Connect the E-Blocks as indicated in the table below.

The GPS, LCD and Switch E-Blocks all need to be powered via wire connections to the +V on the EB006.

Hardware Setup
EB006 PICmicro multiprogrammer
Port A EB004 E-blocks LED board
Port B EB005 E-blocks LCD board
Port C EB056 E-blocks GPS board
Port D EB007 E-blocks push-to-make switch board

Example 1: GPS time and date acquisition and display

FC6 Icon.png GPS Time and Date Example

Example 1 demonstrates using a GPS receiver to collect time and date information. The GPS data is automatically fed into the UART on the microcontroller by the GPS receiver hardware.

Every time the microcontroller receives a byte from the GPS it automatically adds the byte to the incoming buffer ready to be processed. When a carriage return is detected signifying the end of a message string the string data is parsed into separate values which are saved by the Flowcode component.

Calling the read functions of the Flowcode GPS component then retrieves the values for further processing and display.


Example 2: GPS position acquisition and display

FC6 Icon.png GPS Position Example

Exercise 2 demonstrates the collecting of GPS position data and displaying to the LCD.

The Flowcode GPS component macro IsDataValid is used to check that the data being received by the GPS receiver is reliable. This will return a 0 when there is either no GPS connection or if the fix data is still unstable due to lack of lock with enough satellites.