RC522 Write a Card Demo CodeChao
It is very easy and common to read the RFID card ID, which is the first 4 bytes of the data area, and used to identify the card holder. But also a lot of people ask if the RC522 can write a RFID card or not, the answer is yes, now we have a demo here. It tells how to write data after the first address block 0 from block 1, to store your data there.
You can buy this item here, and some extra cards here.
Please read more data structure info about the RC522 card, there are 0-63 blocks, each 4 blocks (0,1,2,3) in a line of a sector, the key data are stored in the block 3 (called trailer), see the data structure here below:
I am using a ACR122U-A9 card reader to read and write data with the software tool called NFCGUIFreeVer.exe here.
It is very risky to overwrite the card ID or key, will permanent lock card, so be careful unless you really know how to do it.
Demo Code available for downloading after purchase.
Edit the block address from 1~63 to store data inside, we have set it to 1 default, which will write data just after the card ID (first block 0). and finally I use the tool to see how the data update inside:
Hi, the link for download is unavailable, do you have another link for arduino example? Thanks.
Yes, please try again, it supposes to be fixed now. Br,
It worked, thanks,I am trying to use a rc522 for a few days, it will help me a lot, really thanks
where and how can I download sir? I didn’t see any link. Thanks
[…] trying make a library to iot core on c# based on arduino library (http://blog.electrodragon.com/rc522-write-a-card-demo-code/) but i don’t understand what […]
Used this in a project at school, most of the guys though nothing of it.
I think RFID is fricking cool!
Hello, where how can I download sir?
code example thank
Hi, arduino code only for purchase customer only, please login into wiki page and find it: