Great news – we have decided to open source this project!  It can be downloaded for free from GitHub – please follow this link.
Previous customers may continue to use the project under the embedded-code.com licence they purchased under, or apply the new MIT licence we have now released the project under.

Low cost 125kHz passive RFID tags are the ideal choice for all sorts of identification applications.  However many engineers view the task of designing a 125kHz RFID reader as too daunting a job involving dabbling in the black arts of radio frequency design.  Instead an engineer will typically opt for the safe approach of using one of the many off the shelf but expensive RFID reader OEM modules.

Actually designing a 125KHz RFID reader is very straightforward if a good RFID reader IC is used and this driver is designed to work with the excellent NXP (formerly Philips) HTRC110 RFID Reader Chip.

 

This driver provides complete functionality to read EM Marin EM4102 (previously named H4001/H4102) and compatible RFID transponders.  The EM4100 is one of the more common data formats for RFID transponders, so named because the microchip at the heart of compatible tags are based on a controller chip originally made by the company EM Microelectronic.  The protocol is typically used by the many types of generic 125kHz read only passive RFID tags available from a huge range of suppliers.  These simple RFID transponders carry 40 bits of read only memory and are typically supplied with a globally unique ID value (the 40 bits provide1,099,511,627,776 combinations).

The driver provides the following main features:-

  • Automatically handles the 64, 32 or 16 period data rates and Manchester or Biphase encoding methods used by EM4102 based tags.  Most tags use Manchester encoding due to many RFID readers only supporting Manchester encoded tags.
  • Optimised for small code footprint embedded designs.
  • State machine and interrupt based implementation to avoid your application stalling while tags are read and the modulated data stream decoded.
  • Automatically switches the HTRC110 to low power mode between reading tags.
  • No reliance on compiler specific libraries.
  • Full source code supplied for you to use and modify as required.

[product_section_start:product_page_section_specifications.png]

Hardware Specifications

The driver is designed to support the NXP HTRC110 RFID reader chip.  The driver has been designed to work with 8-bit, 16-bit and 32-bit microcontrollers.

In order to decode the modulated RFID tag data stream the driver requires the RFID Dout connection to be made to a microcontroller rising edge interrupt pin.  The driver carries out all other communications by driving and reading the microcontroller pins directly.

 

     
 
This source code product is written in C and has been designed to be used with any ANSI compliant C compiler on any platform. Direct compatibility has been tested with the compilers and processors / microcontrollers listed below. Using the driver with other ANSI compliant C compilers and devices should not present significant problems.
     
 
Tested with the Microchip C18 MPLAB C Compiler for PIC18 family of 8 bit microcontrollers with sample project included. Free version of the compiler available from Microchip.

 

 

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *