Comments (7)
It says on the Leonardo ETH page that pin 10 is reserved for the Wiznet interface. I think you need to use a different SS pin.
from mfrc522.
Thanks for your reply
I already used the folllowing parts in my sketch to set SS to Pin 8 because of this fact, and also set Sd and Ethernet SS Pins to Output as I found in a topic in another place ...
But the "ReaderDetails" always shows "NFC Error" so it seems not to detect the reader via SPI (Version = FF or 00)
regards
Gerald
// SPI & RFID ----------
#include <SPI.h>
#include <MFRC522.h>
// ########## NFC Defs ##########
#define SS_PIN 8
#define RST_PIN 9
// NFC CREATE -------------
MFRC522 mfrc522(SS_PIN, RST_PIN);
// setup
void setup() {
// Open serial
Serial.begin(9600);
// CS-Lines for SD and Ethernet
pinMode(4, OUTPUT);
pinMode(10, OUTPUT);
// RFID READER INIT -----
SPI.begin();
mfrc522.PCD_Init(); // Init RC522
Serial.print(F("NFC:"));
ShowReaderDetails(); // Show RC522 Card Reader details
}
// get details about RC522 hardware
void ShowReaderDetails() {
// Get MFRC522 software version
byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg);
Serial.print(F("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("=v?.?"));
Serial.println("");
// When 0x00 or 0xFF is returned, communication probably failed
if ((v == 0x00) || (v == 0xFF)) {
Serial.println(F("NFC ERROR"));
}
}
from mfrc522.
You don't seem to be using my library, but the miguelbalboa/rfid that mine is based on.
from mfrc522.
I am sorry, I used the library of miguelbalboa before and that doesnt work either
So i switched to your library ... why do you think I am using the other one?
Maybe I posted the wrong code ... Iยดll try again by using your library when I am back at home ... so long
thanks for your help and sorry if I bothered you!
regards
Gerald
from mfrc522.
I didn't mean to be brash. It is no bother. The reason I think you are using miguelbalboas library is that you are calling mfrc522.PCD_Init(). PCD_Init is not a method in my library.
from mfrc522.
Also, for troubleshooting communication issues, a logic analyzer is a very helpful tool.
This one is relatively inexpensive and quite powerful. also the java software supports decoding of common protocols.
http://www.seeedstudio.com/depot/Open-Workbench-Logic-Sniffer-p-612.html
hook up any analyzer to your lines and verify you are getting the appropriate responses expected from the MFRC522 datasheet.
from mfrc522.
Thanks a lot for your suggestions, I have an arduino based logic analyzer and already did some SPI-sniffing, but got stuck because of my lack of understanding the protocol.
I have to investigate a little more and also I have to test again with your library - have scrambled up my tests al ittle bit.
Sorry again for opening the issue here! Your help is highly appreciated.
Gerald
from mfrc522.
Related Issues (12)
- Cannot read new card after authenticate HOT 1
- Card does not get detected. HOT 1
- UID reading problem
- Due problem HOT 1
- I can't compile examples/check_firmware.ino HOT 1
- MFRC522 compiling error -please help HOT 2
- How to check if card is removed or not? HOT 3
- Arduino Due HOT 1
- Register Errors wrong HOT 1
- CRC error HOT 4
- Error in haltTag() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mfrc522.