10 seconds electrical 5V pulse
triggered by phone call

Want to include this in your project?
Based on G510 chip

G510 can operate on any GSM/GPRS network to provide data communications and supports Q50-00: Quad Band 850/900/1800/1900 MHz.

GSM signal on

Main purpose for this project is to trigger a signal for a known call, which can be from anywhere. For simplicity, phone numbers are programmed into the chip.

Free project

All resources for this project have been shared: code, schematics, MPLAB workspace, data-sheets and media.

GSM network clock

Only works if the network has this capability. The clock is displayed on two alphanumeric LCD lines using custom characters and requires no setting!

The main reason for choosing this one was that it's on 16 bit and that it can be programmed with PICKIT2. Before starting this project I didn't know how many pins I needed so the bigger the better. MPLAB ASM30 it's great in comparison with MPASM for 8 bit. Did not use C compiler because C and MPLABX are not my favourite development tools. I used the chips UART module with at external XT 7.3728 MHz oscillator with 4x PLL enabled => 29.48 MHz. This will match G510 UART speed operating at 115200 kBps.

For G510 I choose JINYUSHI variant because was good and reliable. The module auto configures SIM CARD and send +SIM READY signal when it can be used. The SIM card must not be protected by PIN. The module requires an antenna and 5V-2A power source. SIM800L cannot be used with this project unless the code is changed.

RC2004A-LLG-JSVE LCD is based on VATN technology which "offers a great alternative to traditional STN and OLED character displays. The heart of VATN lies in its vertically aligned liquid crystals that align perpendicular to the viewing plane when voltage is at zero, creating a totally black background. Upon voltage being applied the crystals realign, allowing the backlight to appear, with the amount of light being governed by the angle of the crystals, allowing for the display of bright coloured characters." And they forgot to say that the VATN modules are much cheaper than OLED displays.

How it works

Device functionality steps and phases

When the device is powered on, the JINYUSHI G510 module will try to initialize the SIM card. It first sends an UART message "> AT Command ready" to let de microcontroller know it's ready for UART instructions. The device will wait until the G510 module sends "+SIM READY" command. The SIM card must not be protected by PIN number.This means SIM was properly initialized and it's ready for instructions. After SIM is ready, the device sends following UART commands:

  • ATE0 (switch UART echo off)
  • ATCGMR (print G510 version)
  • ATCSQ (print network signal quality)
  • ATCLIP (enable information from the caller)
Few seconds

After the initialization is done the device will try to get the clock from the GSM network. If your network does not support it then this will not work. The clock is fetched by issuing UART command AT+CCLK? and this should bring clock in this format: +CCLK: "21/12/30,20:39:32+08" where: year/month/day, hours:minutes:seconds+GMT. While initializing the clock values, sometimes the signal is weak and the clock cannot be retrieved. In this case values of 00:00 will be displayed for hours/minutes.

2 seconds

If the clock was fetched with success then a text parsing is done to get the year, month, day, hours, minutes, seconds and the GMT value (see get network clock section). The clock is fixed based on the GMT. A value of +08 GMT means that +8*15 minutes must be added to the clock. If -08 then means -8*15 minutes must be subtracted from the clock. The device queries the network clock data each 30 seconds. If the signal is poor and clock data could not be retrieved then the clock does not update. Hour and minutes are displayed on two LCD lines using custom characters. On the lines 3 and 4 are displayed: the day of the week with day of the month and respectively month and year. Year uses only two characters because only two characters are received from the network.


As an example, in the code there are two phone numbers added (more can be added). The project does not have the capability to change settings other than code-change-recompile steps. Phone numbers must be modified/added directly in the source code. When G510 module receives a call, it will send to the PIC micro the text "RING" followed by the caller's phone number "+CLIP: "+407********". If the phone number is found in the source code then it will send a 10 second pulse of +5V to one of its pins. The device will display "known call", start a count down from 9 to 1 and output the +5V pulse. This pulse can be used for anything like: open a door, start an automatic wood pellet stove, turn on an alarm, etc.

10 seconds

Device Pictures

Development and testing

Schematics quick Overview

Included in the download zip file

Signal triggered by
GSM registered phone call


Zip file content

  • MPLAB project with ASM source code
  • Eagle libraries, schematics and board files
  • Notepad++ highlight for ASM30
  • Osciloscope pictures for various UART TX/RX signals
  • Tested AT commands for G510 module
  • Documentation

AT commands used
ASM30 code instructions
Data memory

Signal triggered by GSM registered phone call

youtube video - not yet added