This article instructs the user to program the AT-COM M35 Easy R1 device driver application. The open source code is written to be compatible with the USB Hid Bootloader of the PIC Easy R1. Users can "Plug and Play" the flexibility of ATCBus on each product.

     1. Introduction of PIC Easy R1

    PIC Easy R1 is an AT-COM product that gives users the convenience of combining ATCBus with Microchip's PIC18F4550-I / PT microcontrollers. The board supports USB Full Speed V2.0 USB connection, with USB HID Bootloader, which allows users to download firmware directly to PIC18F4550-I / PT without any other load. In addition, the 48MHz PIC18F4550 high performance microprocessor meets the needs of programmers deploying applications such as Wifi, Ethernet, USB, CAN, PWM.


    2. Introduction of GSM M35 Easy R1

   The M35 module is a GSM/GPRS module of Quectel. M35 module operates in quad-band GSM850 MHz, GSM900 MHz, DCS1800 MHz, PCS1900 MHz. M35 module supports GPRS class 12 multi-slot, SMS, MMS ... The M35 module is integrated with Internet protocols such as TCP / IP, UDP, FTP and PPP, which is controlled by the AT Command set protocol.

  GSM M35 Easy R1 is a product developed by AT-COM based on the features of the M35 moduleGSM M35 Easy R1 is designed to be compact in size, SIMCARD is integrated on the circuit to help users easily research and deploy applications related to GSM/GPRS such as remote monitoring control, Remote data via GPRS, SMS ... Besides, with compact size, convenient data output, GSM M35 Easy R1 will bring the most modern and refined design inspiration.

    3. Device control app via SMS

   The GSM M35 Easy R1 Source Code is presented in the article using the CCS Compiler compiler for the PIC18F4550 microcontroller. The code is written in the USB Hid Bootloader of PIC Easy R1, which allows the microcontroller to run at a clock frequency of 48MHz. GSM M35 Easy R1 can be downloaded from the GSM M35 Easy R1

     After downloading the code to the computer, it should be edited and recompiled with PIC C compiler software.

     After unpacking, open the file main.c, proceed to correct the phone number in the code to board sent a message to monitor equipment, the phone number is 10 digits.

 Then, we modify the board password, password is a sequence of 6 digits.

After editing the code, we proceed to compile to .hex file

  The software has successfully compiled.

    Sau khi biên dịch xong, ta tiến hành nạp firmware cho PIC18F4550 qua USB HID Bootloader.

    Để vào chế độ USB Hid Bootloader của PIC Easy R1 ta thực hiện như sau: 

    Kết nối PIC Easy R1 với máy tính thông qua cổng USB mini trên board. Sau đó ta nhấn giữ nút nhấn SW1/RD0 và nhấn nút RESET thì PIC Easy R1 sẽ vào chế độ Hid Bootloader. Khi vào ở chế độ Hid Bootloader thì Led LD2/RD3 sẽ sáng nhấp nháy liên tục, đợi người dùng cập nhật Firmware cho PIC18F4550.  

    Để nạp Firmware cho ứng dụng của người dùng chạy trên PIC Easy R1, người sử dụng có thể sử dụng chương trình USB Bootloader V2.9j của Microchip để flash Firmware đến bộ nhớ Program Memory của PIC18F4550.  

    Sau khi download chương trình USB Bootloader V2.9j về máy tính, bạn giải nén file winrar và nhấp vào file HIDBootloader.exe để chạy chương trình USB Bootloader trên máy tính của bạn.



After running USB Bootloader V2.9j, select Import Firmware Image and navigate to file.hex.

    After successfully importing file.hex, select Erase / Program / Verify Device to load the file.hex to Program Memory of PIC18F4550.


After successfully loading the file.hex you can choose to reset the PIC18F4550 to run into the program you have programmed.

After resetting the PIC, the board boots to the M35 module and reports the complete boot message to the phone number that we fixed in the code above.

To control the device, we control the message with the following syntax:

                                                                                       #control .

  Where: device contains the following cases:

  • On 1
  • On 2
  • On 3
  • On 4
  • Off  1
  • Off  2
  • Off  3
  • Off  4

Note: All configuration messages start with a pound (#) and end with a dot (.).

After device control, the board will report the status of the device to the installed phone number.

4. Video demo