PIC12F683 EM4100 RFID Emulation

January 25, 2013

After seeing a bunch of examples around on the internet of using a MPU’s internal circuits to make a really simple RFID badge, I figured I would try my hand at it. I just got a shipment of a bunch of PIC12F683 chips too.

The main article that helped me along is at http://www.t4f.org/en/projects/open-rfid-tag/57 and, sure, the author had put up the asm file for the project, after trying out the code and a few different coils, I realized that the fuses were probably set wrong. This was probably a good thing because I never really sat down and did any experiments with using an external clock on a PIC before.

So, I broke out the data sheet and another pic and wrote up some simple tests to figure out exactly how to set the fuses in order to get the pic to clock off of the clock in correctly. Here are the correct fuses:

__CONFIG _FOSC_EC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOREN_OFF & _IESO_OFF & _FCMEN_OFF

Once I got that working, I went back and tried out the different coils I had from my initial tests and found one that was able to get the chip voltage up to about 5 volts (!) via the coil alone. I need to do a bit more work on making a better coil but for now, I’m pretty happy that it works at all.

The final concern was figuring out the correct parity bits. This forum post helped a bit… but really, I had to go to http://www.priority1design.com.au/em4100_protocol.html and actually LEARN about parity bits via Wikipedia. So that was also a pretty good learning experience.

The “column parity” didn’t make sense at first… it’s just calculated from the respective places in each of the data nibbles - using even parity. So that ALSO was a good learning experience.

After all of this, I was able to emulate the badge I use to get in to my work and tried it out on the front door… but it didn’t work. The coil probably isn’t big enough to get the voltage up. Maybe I can throw a battery on the thing just to make SURE it gets enough power…

Ah well. It clearly works even if it doesn’t work as well as I wanted it to…

Working RFID clone!:

Working RFID clone!

The second antenna is a bit better but it really isn’t as tuned as it needs to be…:

The second antenna is a bit better but it really isn't as tuned as it needs to be...


James Hagerman

Written by James Hagerman

© 2026