The article instructs users to program RFID applications using AT-COM's RFID Reader Easy board. The open source code is written to be compatible with the USB Hid Bootloader of the PIC Easy R1. Users can plug and play thanks to 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 RFID Reader Easy

  • The EM4095 transmits at 125 kHz

  • Read RFID tags in the EM4100 family

  • The signal is encoded using the Manchester encoding standard

  • Antenna integrated on the circuit

  • Operating voltage 4.5V - 5V

     

    Easy Rfid Reader interface with external microcontroller circuit via a 1x6 connector and "ATCBus" on the circuit.

     

  • GND: GND source

  • 5V: VCC source (4.5V - 5V)

  • MOD: output signal from EM4095

  • RDY: clock pulse generator

  • SHD: High voltage on this foot puts EM4095 to sleep mode.

  • MOD: The high voltage on this pin allows the modulation signal on the antenna to start

Source Code RFID Reader is presented in the article using CCS Compiler compiler for 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. RFID Reader can be downloaded in the RFID Reader Easy product.

To load Firmware via USB Hid Bootloader requires address declaration for Map reset vector and Map interrupt vector to avoid overlapping of memory when PIC18F4550 starts. Therefore the user should change as follows:

  •        reserve boot area (0x000-0x0FFF)

               

  • map reset vector at 0x1000

 

  • map interrupt vector from 0x01008 to 0x1018    

In CCS Compiler we need to declare the following:

 /* --- BEGIN: changes required for bootloader ------------------------------ */ 

/* map reset vector and interrupt vector *//* 0x000-0x0FFF is used by the bootloader. The bootloader maps the original *//* reset vecotr (0x1000) to 0x1007 and the interupt vector (0x1008) to 0x1018. */ #build (reset=0x1000, interrupt=0x1008) // use for HID Bootloader #org 0 , 0x0FFF {} // use for HID Bootloader 

To enter USB Hid Bootloader mode of PIC Easy R1 we do the following:

Connect the PIC Easy R1 to PC via USB mini on the board. Then press and hold the button SW1 / RD0 and press the RESET button, the PIC Easy R1 will enter the Hid Bootloader mode. When entering the Hid Bootloader mode, the LD2 / RD3 LED will flash continuously, waiting for the user to update the firmware for the PIC18F4550.

In order to load firmware for user application running on PIC Easy R1, user can use Microchip USB Bootloader V2.9j program to flash Firmware to Program Memory of PIC18F4550.

After downloading USD Bootloader V2.9j to your computer, extract the winrar file and click the HIDBootloader.exe file to run the USB Bootloader program on your computer.

 

 

After running USB Bootloader V2.9j, select Import Firmware Image and navigate to your 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.

 

  3.Video Demo