AnsweredAssumed Answered

MFRC63002 13.56MHz Card Reader not operated

Question asked by avirut thiengsungnern on May 9, 2017
Latest reply on May 23, 2017 by Jorge_Gonzalez

I had tried MFRC630 for card reader 13.56MHz via SPI interface . I setting hardware as "CLEV633B_Blueboard_3v0_sch"

Power,Vdd,Pvdd,Tvdd,Dvdd,Avdd ,And SEL0=0,SEL1=1,IF0=MOSI,IF1=SCK,IF2=MISO,IF3=NSS as recommend but not respond anything. 

For Software I write get version for  MFRC630 but but not respond anything. 

Comparation,  I change IC to RC522 I can get version and read tag is normal operation.


I'd like to know, How to check MFRC630 working or not. Hardware,Software setting important point  ?

please advice to me.


#include <Arduino.h>
#include <SPI.h>

// Uncomment This for 630
#define MFRC630

// CHANGE HERE 0x37 FOR 522 and 0x7F FOR 630
// 630
#ifdef MFRC630

#define MFRC630_REG_VERSION 0x7F // 630 : 7Fh Datasheet Page 55 Expect Result 80
#define versionAddressFinal (MFRC630_REG_VERSION << 1) | 0x01 // Datasheet
// 522
#define MFRC630_REG_VERSION 0x37 // 522 : 37h Datasheet Page 39 Expect Result 92
#define versionAddressFinal 0x80 | MFRC630_REG_VERSION << 1 // Datasheet

#define CHIP_SELECT 10
#define RST 9

void setup() {
// Start serial communication.
// Set the chip select pin to output.
digitalWrite(CHIP_SELECT, HIGH);
pinMode(RST, OUTPUT);
digitalWrite(RST, LOW);
digitalWrite(RST, HIGH);

// Start the SPI bus.

void loop() {
// call the above function until infinity.
// PCD_WriteRegister();
byte v = PCD_ReadRegister();
Serial.print(String(millis()) + " ");
Serial.print(F("Firmware Version: 0x"));
Serial.print(v, HEX);
// Lookup which version
switch (v) {
case 0x88: Serial.println(F(" = (clone)")); break;
case 0x90: Serial.println(F(" = v0.0")); break;
case 0x91: Serial.println(F(" = v1.0")); break;
case 0x92: Serial.println(F(" = v2.0")); break;
default: Serial.println(F(" = (unknown)"));
// When 0x00 or 0xFF is returned, communication probably failed
if ((v == 0x00) || (v == 0xFF))
Serial.println(F("WARNING: Communication failure, is the MFRC properly connected?"));

byte PCD_ReadRegister() {
byte value;
Serial.print("TF Reg HEX: ");
Serial.println(MFRC630_REG_VERSION, HEX);
Serial.print("TF Hex: ");
Serial.println(versionAddressFinal, HEX);
Serial.print("TF BIN: ");
Serial.println(versionAddressFinal, BIN);
SPI.beginTransaction(SPISettings(SPI_CLOCK_DIV4,MSBFIRST ,SPI_MODE0));
digitalWrite(CHIP_SELECT, LOW); // Select slave
value = SPI.transfer(0); // Read the value b Serial.println("TF Reg: " + String(reg, HEX));
digitalWrite(CHIP_SELECT, HIGH); // Release slave again
SPI.endTransaction(); // Stop using the SPI bus
return value;