The post instructs the users to implement the application located on Google Map via SMS messages and shows on Google Map uses PIC Easy R2 board, GSM/GPRS M95 Easy board and GPS L80 Easy board of AT-COM. Open source code compatible with USB HID Bootloader of PIC Easy R2. The user can "Plug and Play" thanks to the flexibility of ATCBus on each product.       

   1. PIC Easy R2 Overview

   PIC Easy R2 is a product designed and manufactured by AT-COM bring user many utilities when combining between ATCBus and PIC18FJ microcontroller family of Microchip. Board support to connect to the computer via USB Full Speed V2.0, with USB HID Bootloader allow the user direct load firmware for microcontroller that no need any the other programing kit. Beside that, PIC18F87J50 microcontroller with processor speed to 48MHz combine  with design Dual ATCBus Host Socket maximize the resources of microcontroller, responsive requests of programmer when deploys the applications as : GSM, GPRS, GPS, Wifi, Ethernet, USB, CAN, PWM…. special with handy data input, PIC Easy R2 will bring the most modern and refined design inspiration. Experience PIC Easy R2 to feel the great "Plug and Play" utilities by PIC Easy R2.                   

   2. GSM/GPRS M95 Easy Overview

   M95 Module is a GSM/GPRS module of Quectel manufacturer. M95 Module operates with Quad-band: GSM850 MHz, GSM900 MHz, DCS1800 MHz, PCS1900 MHz. M95 Module supports GPRS multi-slot class 12, SMS, MMS... M95 Module integrated with internet protocols as : TCP/IP, UDP, FTP and PPP, control according to AT command protocol.         

   

 

    GSM/GPRS M95 Easyis a productbyAT-COMdevelopment based onthe feature of M95 module. GSM/GPRS M95 Easy is designed with SIM Card Holder is integrated on the circuit, GSM built-in PIFA Antenna, earphone/microphone jack helps users to easily research and deploy the applications related to GSM/GPRS as: controls, monitor, collect data remotely via GPRS, SMS ... Besides,withcompact size, handy dataoutput,  GSM/GPRS M95 Easy will bring the most modern and refined design inspiration.

   3.GPS L80 Easy Overview

 

  L80 is an ultra compact GPS POT (Patch on Top) module with an embedded 15.0 × 15.0 × 4.0mm patch antenna. This space-saving design makes L80 the perfect module for the miniature devices. Adopted by LCC package and integrated with patch antenna, L80 has exceptional performance both in acquisition and tracking.

  Combining advanced AGPS called EASY™ (Embedded Assist System) and proven AlwaysLocate™ technology,L80 achieves the highest performance and fully meets the industrial standard. EASY™ technology ensures L80 can calculate and predict orbits automatically using the ephemeris data (up to 3 days) stored in internal flash memory, so L80 can fix position quickly even at indoor signal levels with low power consumption. With AlwaysLocate™ technology, L80 can adaptively adjust the on/off time to achieve balance between positioning accuracy and power consumption according to the environmental and motion conditions.

  L80 supports automatic antenna switching function. It can achieve the switching between internal patch antenna and external active antenna. Moreover, it keeps positioning during the switching process.

 With its tiny design, high precision and sensitivity, L80 is perfectly suitable for a broad range of M2M applications such as portable device, automotive, personal tracking, security and industrial PDA, especially suitable for special applications, like GPS mouse and OBD.

    With the desire to bring the superiority features of L80 module to theuser, AT-COM designs and brings to GPS L80 Easy product take advantage of the ability of L80 module and addedutility features such as:communication is 3V3 and 5V voltagelevelsLed stable location status message, Battery back upExternal antenna ConnectorBesides, with compact size,handy data outputGPS L80 Easy will bring the most modern and refined design inspiration.

   4. Application to locate the coordinates via SMS and show up Google Map

To implement the application we perform the steps follow:

    Step 1: Preparation

•   Hardware:        

                          + PIC Easy R2 board.

                          + GSM/GPRS M95 Easy board.

                          + GPS L80 Easy board.

                          + The phone using the Android OS already installed Google Map software and SMS2Map software.

•   Software: 

                          + USB HID Bootloader.

                          + SMS2Map.

Step 2: Connect the Hardware

    Insert SIM Card on GSM/GPRS M95 Easy board then connects GSM/GPRS M95 Easy board and GPS L80 Easy board withPIC Easy R2 board via ATCBus then supply for the system ( 5VDC via mini USB or 5VDC via Terminal or Battery power ). 

Step 3: Load application program for PIC Easy R2

     Source code PIC Easy R2 is presented in the post use the CCS Compiler for PIC18F87J50 microcontroller. The code was written according to USB HID Bootloader of PIC Easy R2. Can download the source code in PIC Easy R2 product ( PIC Easy R2-L80 demo code ).       

    Code after the download of the computer needs to be edited and recompiled using the software PIC C Compiler.

    After unpacking, we open file main.c up implements to edit phone number in the code to board sends message coordinates.    


   Then we edit password of board.

 

   After editing the Code is finished, we proceed to compile into .hex file: Choose Compile.  

     After compilation is finished, we proceed to load firmware for PIC18F87J50 via USB HID Bootloader

     To enter USB HidBootloader mode of PIC Easy R2we do the following:

    ConnectPIC Easy R2with the computer through mini USB portonboard.Then we press hold SW1/RB4 button andpress RESET buttonthen PIC Easy R2willonHid Bootloader mode.Whenon Hid Bootloader mode thenLD2/RE0 Led and LD1/RE1 Ledwill lightcontinuouslyflashes,waiting forthe user toupdate theFirmware for PIC18F87J50. 

    To load the Firmware for the user's applications run on PIC Easy R2, the user can use USB Bootloader V 2.9 j program of Microchip to flash the Firmware to the Memory Program of PIC18F87J50.

    After you download USB Bootloader V 2.9 j program about computers, you extract the WinRAR file and click the HIDBootloader.exe file to run the USB Bootloader program on your computer.

   After you run USB Bootloader V2.9j program, you choose "Import Firmware Image" and take the path to where the archive file.hex.

 

   After Import is a successful file.hex, you choose Erase/Program/Verify Device to load file.hex to Program Memory of PIC18F87J50.

 

     Step 4: Implement controls to retrieves coordinates and show up Google Map

     After the system has finished booting, the system will automatically send an SMS message to the user phone number (phone number is changed in step 3).

 

   Whensystem startupis complete, wecan get thecoordinatesofthe system by2 Methods:
 
   Method 1: press the SW2 button PIC Easy R2 board, the system will send an SMS message contains the coordinates link.

       The system returns a message containing the coordinates.

   Method 2: SMS messaging with the following syntax to retrieve the coordinates:

#position‹distance›‹password›.

    After gettingthe correctmessagesyntaxthenthe systemreturnsa message contains the coordinates link.

 

    the Users click on the link in the message to show up a map, we are positioned as follows:

 

     * Use the SMS2Map software to show the location of the system

    + Install SMS2Map software on your phone.

    + Open SMS2Map on the phone up then we can press SW2 button on PIC Easy R2 or be messaging to get coordinates of the device according to the following syntax:

#position‹distance›‹password›.

     When a message contains the coordinates are sent to the phone number of users then SMS2Map will automatically display the location on the map of the software.

     When usersclick on alocation on themap,the softwarewilldisplaythe address of the currentsystem.

 

 

   5. Video demo