RFID MFRC522 avec interface UART, SPI, I²C

Discontinued RobotDyn SKU: RD-RFID-MFRC522-FR
RFID  MFRC522 avec interface UART, SPI, I²C

Vue d’ensemble

Module lecteur RFID 13.56 MHz basé sur la puce NXP MFRC522 avec trois interfaces sélectionnables : SPI, I²C ou UART. Lit et écrit les tags ISO/IEC 14443 Type A — MIFARE Classic 1K, MIFARE Ultralight, NTAG21x. Portée typique : 30-50 mm. Idéal pour systèmes de contrôle d’accès, pointage, suivi d’inventaire et projets makers personnalisés.

Spécifications

SpécificationValeur
Reader ICNXP MFRC522
Operating Frequency13.56 MHz
Supported ProtocolsISO/IEC 14443 Type A (MIFARE Classic, Ultralight, NTAG21x)
Read Range~30–50 mm (depends on tag and antenna)
InterfacesSPI (up to 10 Mbit/s), I²C, UART
Operating Voltage3.3 V (with onboard regulator from 5 V)
Logic Level3.3 V or 5 V tolerant
Pins8 (3.3V, RST, GND, IRQ, MISO, MOSI, SCK, SDA)
Card Memory (MIFARE Classic 1K)1 KB
Read/WriteBoth (with appropriate authentication)
Package ContentsModule + 1× MIFARE Classic 1K card + 1× keychain tag

Applications courantes

Programmation

#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN  10
#define RST_PIN 9

MFRC522 rfid(SS_PIN, RST_PIN);

void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();
  Serial.println("Tap a card...");
}

void loop() {
  if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial()) return;

  Serial.print("UID: ");
  for (byte i = 0; i < rfid.uid.size; i++) {
    Serial.print(rfid.uid.uidByte[i] < 0x10 ? " 0" : " ");
    Serial.print(rfid.uid.uidByte[i], HEX);
  }
  Serial.println();
  rfid.PICC_HaltA();
}

Voir aussi