Good morning everyone,
Could anyone tell me how to use the IRQ pin of the MFR522 card with Arduino UNO?
All the examples I have found don't work.
Thank you
Stefano
Good morning everyone,
Could anyone tell me how to use the IRQ pin of the MFR522 card with Arduino UNO?
All the examples I have found don't work.
Thank you
Stefano
8.4 on the data sheet
ok, thanks...but which registers should i configure?
You have not described your problem in any detail so the solution can not be given in detail. The data sheet tells you the interrupt setup for this chip. How you use it to resolve your problem is, as yet, unknown. There are lots of tutorials and threads on the use of interrupts if you wish to search
There are a lots of tutorials but nobody explains how to configure registers to use IRQ pin.
My question was very simple, i need a minimal example or tutorial that explain how configure registers to enable IRQ.
I've found this for example:
...but it doesn't work.
Any suggestions?
Thanks
please specify what does it mean
how does it work and how does it differ from what you expect?
I have a machine that is broken, can you tell me how to fix it?
Think about the information in that statement that is missing but would be important to know before you can answer
Sorry but the example of the machine is not appropriate...
I simply asked for a code example for MFRC522 that is capable of activating an Interrupt on Arduino...I don't know what else to add.
Can you point me to one of the many tutorials you found in which the IRQ PIN is used or do I have to think that there aren't any?
Thanks
as i see you have an example ready to work with complete hardware setup.
Do you try it? Whats the result?
The usual advice is don't use interrupts unless you have to. Beginners often perceive the need to use interrupts when they actually don't have to. Why do you believe you need to use an interrupt?
I need to use Interrupt because I need to use 2 RFID MFRC522 on the same Arduino UNO.
Using the interrupt I could figure out which of the two devices has read a card and act accordingly.
So the first could send an IRQ to PIN 2 and the second to PIN 3.
But beyond the practical case, I might just want to try it out of curiosity
Returning to the example, I've completed the hardware setup, I've tried...and simply do not activate the registered function to receive the interrupt.
Thanks for any suggestion.
You have proved my point. You have no need to use interrupts.
I'd start by using a low cost logic analyzer to see if the IRQ pin is actually transitioning when you expect it to. If it is, then the problem is in the code's interrupt setup. If not, then open the device datasheet in one window and the code in another. Go line-by-line through both and find out where the code is setting up the device incorrectly.
If the IRQ pin of the MFRC522 is working correctly, you can just check the 2 Arduino pins connected to the IRQ pins using digitalRead() in loop(). Just make sure loop() executes quickly, there are no delay() used etc.
Each problem usually has multiple possible solutions. The one with interrupts I think is the best ... but apparently no one knows how to configure an IRQ pin on the MFR522.
The problem is how to properly configure the MFRC522 via the internal registers...which apparently no one has ever done until now
Thanks for the help anyway
it done in lines 69-70 of the example, referensed in post #5
As i said before, you have everything for this .... except for the intention
...are you a BOT?
From the library's ReadMe:
Not sure if that means a hardware or software issue. But once you figure it out, post the solution.