EasyManua.ls Logo

Freenove RFID-RC522 User Manual

Freenove RFID-RC522
11 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #6 background imageLoading...
Page #6 background image
6
RFID www.freenove.com
Sketch
Sketch 1
Before writing the code, we need import the library RFID.zip first.
This sketch will read the unique ID number (UID) of the card, recognize the type of the card and display the
information through serial port.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <SPI.h>
#include <RFID.h>
//D10:pin of card reader SDA. D9:pin of card reader RST
RFID rfid(10, 9);
unsigned char status;
unsigned 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("The card's number is : ");
//Display card serial number
for (int i = 0; i < 4; i++) {
Serial.print(0x0F & (str[i] >> 4), HEX);
Serial.print(0x0F & str[i], HEX);
}
Serial.println("");
}
//card selection (lock card to prevent redundant read, removing the line will make
the sketch read cards continually)
rfid.selectTag(str);
}
Question and Answer IconNeed help?

Do you have a question about the Freenove RFID-RC522 and is the answer not in the manual?

Freenove RFID-RC522 Specifications

General IconGeneral
ChipMFRC522
Operating Voltage3.3V
Communication InterfaceSPI
Operating Frequency13.56 MHz
Maximum Data Rate10 Mbit/s
Dimensions40mm x 60mm
Compatible PlatformsArduino, Raspberry Pi
Card Types SupportedMIFARE Ultralight, MIFARE Pro, MIFARE DESFire
Read RangeUp to 3 cm

Summary

Project 1 Read UID

Component List

Lists all hardware components required for the RFID project.

Circuit Knowledge

RFID Overview

Explains RFID technology, its systems, and product categories.

Component Knowledge

MFRC522 RFID Module

Details the MFRC522 module, its integration, and communication interface.

Mifare1 S50 Card Details

Card Structure

Explains the 1K byte capacity, sectors, and blocks of the Mifare1 S50 card.

Circuit Connection

Schematic Diagram

Visual representation of the RFID module and UNO board connections.

Hardware Connection

Practical wiring guide for connecting the RFID module to the UNO board.

Arduino Sketch

Sketch 1 - Read UID

Code example to read RFID card UID and display information via serial port.

FCC Statement

Radiation Exposure Statement

Details FCC radiation exposure limits and installation guidelines.

End Product Labeling

Requirements for labeling the final product with FCC ID.

Manual Information to End User

OEM integrator's responsibility for end-user manual content regarding the RF module.

Integration Instructions

Applicable FCC Rules

Lists the relevant FCC rules investigated for the modular transmitter.

RF Exposure Considerations

Addresses RF exposure limits for the equipment and installation distance.

Antenna Information

Details approved antenna types and their gain for the transmitter.

Label and Compliance Information

Specifies requirements for end-product labeling and FCC ID.

ISED Statement

ISED Modular Usage Statement

Guidance on labeling when the ISED certification number is not visible externally.