Hi all,
I've recently bought an ch340g uno board (meant to be clone of Arduino Uno R3) and believe i have this working as I can load sketch's to control an led. I am trying to read an rf card with the RC522 rf sensor however when using the Dumpinfo sketch from the rfid-master library i keep getting the following error in the serial monitor: MFRC522 Software Version: 0x88 (unknown)
i am positive my wiring is correct.
Any help would be greatly appreciated!
Hi
Can you post a link to the card reader you are using?
Do you get any other messages after the one you posted, when you put a card near the reader?
Regards
Ray
It prints the unknown software error message then prints "Scan PICC to see UID, type, and data blocks..." the program appears to still be running but does nothing when i scan a card.
Reader - http://www.ebay.com.au/itm/181750944757?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Controller - http://www.ebay.com.au/itm/221486495839?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Thanks for the info.
Just to check, are you connected as shown in this table (Uno column)?
* -----------------------------------------------------------------------------------------
* MFRC522 Arduino Arduino Arduino Arduino Arduino
* Reader/PCD Uno Mega Nano v3 Leonardo/Micro Pro Micro
* Signal Pin Pin Pin Pin Pin Pin
* -----------------------------------------------------------------------------------------
* RST/Reset RST 9 5 D9 RESET/ICSP-5 RST
* SPI SS SDA(SS) 10 53 D10 10 10
* SPI MOSI MOSI 11 / ICSP-4 51 D11 ICSP-4 16
* SPI MISO MISO 12 / ICSP-1 50 D12 ICSP-1 14
* SPI SCK SCK 13 / ICSP-3 52 D13 ICSP-3 15
Can you try the code below. After the message "Scan PICC to see UID, type, and data blocks...", try scanning a card. You may see "1", "0" or nothing. Restart the program a few times and scan the card once each time.
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN 9 //
#define SS_PIN 10 //
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance
void setup() {
Serial.begin(9600); // Initialize serial communications with the PC
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522
ShowReaderDetails(); // Show details of PCD - MFRC522 Card Reader details
Serial.println(F("Scan PICC to see UID, type, and data blocks..."));
while (!mfrc522.PICC_IsNewCardPresent())
{
}
Serial.println(mfrc522.PCD_PerformSelfTest());
while (1);
}
void loop() {
}
void ShowReaderDetails() {
// Get the MFRC522 software version
byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg);
Serial.print(F("MFRC522 Software Version: 0x"));
Serial.print(v, HEX);
if (v == 0x91)
Serial.print(F(" = v1.0"));
else if (v == 0x92)
Serial.print(F(" = v2.0"));
else
Serial.print(F(" (unknown)"));
Serial.println("");
// When 0x00 or 0xFF is returned, communication probably failed
if ((v == 0x00) || (v == 0xFF)) {
Serial.println(F("WARNING: Communication failure, is the MFRC522 properly connected?"));
}
}
Yes, can confirm that was the table i was using and nothing comes up when scanning a card running that code even after a few times of restarting it. 
Thanks.
The valid version numbers for an MFRC522 chip are 0x91 or 0x92. The library also includes information on a different (presumably clone) chip called the FM17522. It looks like this one works in the same way but it has a different version number of 0x88.
So, possible causes of your problem are ...
-
The reader is working OK but the card you are scanning is faulty or of a type that the reader can't handle. I didn't ask if you have tried more than one card? Did the card come with the reader?
-
The reader uses the FM17522 chip and this chip, in fact, is not compatible with the MFRC522 and / or this library. Are you able to read the labelling on the IC on the reader?
-
The reader uses the MFRC522 but there is a hardware problem that's causing the Arduino to get the wrong version code. Bit of a coincidence, I think.
Yes, have tried two different cards that came with the reader. The chip on the reader does say FM17522, so this would be incompatible?
Thanks for help so far, much appreciated.
I'm not sure that it is incompatible. There might be a hardware fault with the reader. It seems unlikely that the library author would add a self test for the chip if it didn't work with other parts of the code.
You might want to contact the seller and see if they can suggest anything. The