background image

 

RFID 

www.freenove.com █ 

sector 1 

block 0 

 

data block 

block 1 

 

data block 

block 2 

 

data block 

block 3 

Password A-access control-password B 

control block 

…… 

…… 

…… 

…… 

 

sector 0 

block 0 

 

data block 

60 

block 1 

 

data block 

61 

block 2 

 

data block 

62 

block 3 

Password A-access control-password B 

control block 

63 

 
Each sector has a set of independent password and access control which are put in the last block of each 
sector, and the block is also known as sector trailer, that is Block 3 in each  sector. Sector 0, block 0 (namely 
absolute address 0) of S50 is used to store the vendor code, which has been solidified and can ’

t be changed, 

and the card serial number is stored here. In addition to the manufacturer and the control block, the rest of 
the cards are data blocks, which can be used to store data. Data block can be used for two kinds of applications: 
(1) used as general data storage and can be operated for reading and writing. 
(2) used as data value, and can be operated for initializing the value, adding value, subtracting and reading 
the value. 
The sector trailer block  in  each  sector is  the control block,  including a  6-byte password A, 4-byte access 
control and 6-byte password B. For example, the control block of a brand new card is as follows: 

A0 A1 A2 A3 A4 A5 

FF 07 80 69 

B0 B1 B2 B3 B4 B5 

password A 

access control 

password B 

 
The default password of a brand new card is generally A0A1A2A3A4A5 for password A, B0B1B2B3B4B5 for 
password  B,  or  both  the  password  A  and  password  B  are  6  FF.  Access  control  is  used  to  set  the  access 
conditions for each block (including the control block itself) in a sector. 
Blocks of S50 are divided into data blocks and control blocks. There are four operations, "read", "write", "add 
value", "subtract value (including transmission and storage)" for data blocks, and there are two operations, 
"read" and "write" for control blocks. 
For more details about how to set data blocks and control blocks, please refer to Datasheet. 
By default, after verifying password A or password B, we can do reading or writing operation to data blocks. 
And after verifying password A, we can do reading or writing operation to control blocks. But password A can 
never be read. If you choose to verify password A and then you forget the password A,  the block will never 
be able to read again. It is highly recommended that beginners should not try to change the contents of 
control blocks.
 
 
 

 

Summary of Contents for RFID-RC522

Page 1: ...munication technology Project 1 Read UID In this project we will read the unique ID number UID of the RFID card recognize the type of the RFID card and display the information through serial port Component List Freenove UNO x1 RC522 RFID Module x1 Mifare1 S50 Standard card x1 Mifare1 S50 Non standard card x1 USB able x1 Jumper F M x7 ...

Page 2: ...he main operating frequency of Passive RFID products are 125KHZ low frequency 13 56MHZ high frequency 433MHZ ultrahigh frequency 915MHZ ultrahigh frequency Active and semi active RFID products work at higher frequencies The RFID module we use is a passive RFID product with the operating frequency of 13 56MHz Component Knowledge MFRC522 RFID Module The MFRC522 is a highly integrated reader writer I...

Page 3: ...lobal unique identifier number USN UID which can be rewritten 100 thousand times and read infinite times Its storage period can last for 10 years The ordinary Mifare1 S50 Card and non standard Mifare1 S50 Card equipped for this kit are shown below Mifare1 S50 Standard card Mifare1 S50 Non standard card The Mifare1 S50 capacity 1K byte is divided into 16 sectors Sector0 Sector15 Each sector contain...

Page 4: ...ontrol block including a 6 byte password A 4 byte access control and 6 byte password B For example the control block of a brand new card is as follows A0 A1 A2 A3 A4 A5 FF 07 80 69 B0 B1 B2 B3 B4 B5 password A access control password B The default password of a brand new card is generally A0A1A2A3A4A5 for password A B0B1B2B3B4B5 for password B or both the password A and password B are 6 FF Access ...

Page 5: ...5 RFID www freenove com Circuit The connection of Freenove UNO board and RFID module is shown below Schematic diagram Hardware connection ...

Page 6: ... char str MAX_LEN MAX_LEN is 16 size of the array void setup Serial begin 9600 SPI begin rfid init initialization Serial println Please put the card to the induction area void loop Search card return card types if rfid findCard PICC_REQIDL str MI_OK Serial println Find the card Show card type ShowCardType str Anti collision detection read card serial number if rfid anticoll str MI_OK Serial print ...

Page 7: ... to the SDA pin and the RST pin 5 RFID rfid 10 9 In setup initialize the serial port SPI and RFID 11 12 13 Serial begin 9600 SPI begin rfid init initialization In loop use findCard waiting for the card approaching Once it detects card contact this function will return MI_OK and save the card type data in parameter str Then enter the if statement 20 if rfid findCard PICC_REQIDL str MI_OK After ente...

Page 8: ...NO open the serial port monitor and make a card approach the sensing area of RFID module Then serial port monitoring window will display the displacement ID number and the type of the card If the induction time is too short it may lead to incomplete information display ...

Page 9: ...es with FCC radiation exposure limits set forth for an uncontrolled environment This equipment should be installed and operated with minimum distance 0cm between the radiator and your body This transmitter must not be co located or operating in conjunction with any other antenna or transmitter Country Code selection feature to be disabled for products marketed to the US Canada This device is inten...

Page 10: ...r your body 2 7 Antennas This radio transmitter FCC ID 2A4TN FN RFID RC522 has been approved by Federal Communications Commission to operate with the antenna types listed below with the maximum permissible gain indicated Antenna types not included in this list that have a gain greater than the maximum gain indicated for any type listed are strictly prohibited for use with this device Antenna No Mo...

Page 11: ...é avec rss 102 de l exposition aux rf les utilisateurs peuvent obtenir des données canadiennes sur l exposition aux champs rf et la conformité This equipment complies with Canada radiation exposure limits set forth for an uncontrolled environment Cet équipement est conforme Canada limites d exposition aux radiations dans un environnement non contrôlé This equipment should be installed and operated...

Reviews: