Contact us by email if you have any questions! Info@electrodragon.com

RC522 Write a Card Demo Code

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.

Data structure:

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.

Please note:

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:

Tagged

11 Replies to “RC522 Write a Card Demo Code”

  1. kaue mello says:

    Hi, the link for download is unavailable, do you have another link for arduino example? Thanks.

    1. Chao says:

      Yes, please try again, it supposes to be fixed now. Br,

      1. kauemello says:

        It worked, thanks,I am trying to use a rc522 for a few days, it will help me a lot, really thanks

      2. sergi says:

        where and how can I download sir? I didn’t see any link. Thanks

      3. ben nasr says:

        plz link
        thx

  2. poulbran says:

    Used this in a project at school, most of the guys though nothing of it.
    I think RFID is fricking cool!

  3. maos says:

    Hello, where how can I download sir?

  4. Okba says:

    thank you

  5. Chao says:

    Hi, arduino code only for purchase customer only, please login into wiki page and find it:
    https://www.electrodragon.com/w/RC522

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.