I2GPS v1

An easy to use RTC, GPS and SD memory card interface

brought to you by

Features

Potential Uses


Block Diagram


Schematic,  #1

Schematic,  #2

Physical Interfaces


Physical Interfaces, Description

( RED Markers point to Pin # 1 of each header )

Note: to use the SoftwareSerial libary:

#include “SoftwareSerial.h”

SoftwareSerial sws(6, A7);

NOTE : These pins are intended to be used for changing I2C address.  Default program uses 88 as the base address (although this is completely arbitrary as long as the address does not conflict with any other devices on your I2C bus.  

NOTE: Use ATMEGA internal pull-ups on these pins.  For instance, to set internal pull-up on pin 8 use this code snippet:

pinMode(8, INPUT);

digitalWrite(8, HIGH);

PB0 (Arduino Pin 8)

PB1 (Arduino Pin 9)

I2C Address

LOW

LOW

88

LOW

HIGH

89

HIGH

LOW

90

HIGH

HIGH

91

To change I2C Address, jumper one or both of these ports to GND

Note






Software Interface Options

I2GPS (I2C interface to SD and GPS)

GPS INTERFACE

This interface provides time, position, and motion information when the GPS receiver is tracking without a large processing or memory burden on the host processor.  The data is read from a large table stored on the I2GPS depicted above.  To read from the table, send one byte of data to the I2GPS to set the starting address.  Then request the desired number of bytes to read.  For instance, to read latitude and longitude, start at address 0x04 and read 8 bytes.  You can also log GPS data to a file open for writing. (See SD interface).  Some helper functions are defined I2GPS.h.  See interface below.


/*

 * Read n_byte from slave starting from offset address addr.

 * Store result stored in dest (which must be at least n_byte long).

 * Return true if successful.

 *

 * Must be preceded with call to Wire.begin()

 */

void gps_raw_write(uint8_t addr, uint8_t n_byte, uint8_t *source);


/*

* write single byte

*/

   void gps_raw_write1(uint8_t addr, uint8_t data_byte);

/*

 * Read n_byte bytes from I2GPS starting at address addr.

 * Store result in dest.

 *

 * Must be preceded by a call to Wire.begin()

 */    
bool
 gps_raw_read(uint8_t addr, uint8_t n_byte, uint8_t *dest);


Example GPS over I2C usage.

Client Code

Comment

uint32_t lat;

gps_raw_read(I2GPS_LAT_ADDR, 4, (uint8_t*)&lat);

Read latitude in .001 of a degree

uint8_t gps_data[32];

gps_raw_read(0, 32, gps_data);

Read 32 bytes of GPS data starting from address 0..

uint8_t ymdhms[6];

gps_raw_read(I2GPS_YEAR_ADDR, 6, ymdhms);

Read GPS year, month, day, hour minute, second.

SD INTERFACE

The SD interface works in very much the same way but it is a little more complicated because it adds the step of opening and closing a file.  There can only be one file open at a time on the I2GPS.

Client Code

Comment

Example SD file access over I2C


LINKS


www.wyolum.com        Page  /         info@wyolum.com