Closed punitdosports closed 4 years ago
I just checked the project code for which I wrote this library. That doesn't have a delay, project is still functional and without issues, so I don't think a delay is strictly necessary...
It can be many things, are there adequate decoupling capacitors close to the IC? Are the communication lines noise-free? Is the pullup / pulldown adequate? I'd try to rule out hardware issues by investigating the raw signals first. I don't expect the chip will have any timing requirements, but it's a long time ago since I read the datasheet.
We’re using a custom developed PCB so the arduino IC is close to MFRC630 IC which rules out the noise factor. Pull-up is fine as it’s able enough to light up an led connected to it. As for the decoupling capacitors we’re using 100nF on VDD line, 470nF on DVDD line, 470nF on AVDD, 100nF on PVDD, 100nF + 4.7uF on TVDD. Isn’t this enough?
P.S. I was talking about this line delay:
mfrc630_MF_example_dump_arduino(); delay(1000);
As for the decoupling capacitors we’re using 100nF on VDD line, 470nF on DVDD line, 470nF on AVDD, 100nF on PVDD, 100nF + 4.7uF on TVDD. Isn’t this enough?
Does sound reasonable, AN11022 has 6.8 uF and 100nF after the filtering coil, 100 uF and 100nF at the voltage input. It's a little bit more than on your board, but I'd be surprised if it was the problem. They do have 1 uF on PVDD, that's a larger difference. (See fig 7 in AN11022)
P.S. I was talking about this line delay:
yeah, it was clear which delay.
My project runs on an stm32, where I definitely don't have the delay. I'm honestly not sure why it would be any different on an Arduino :( I don't really know why it could be...
If it were to just try and detect the presence of a card for which just need to run the loop code at 5ms delay and just check if (atqa != 0), but with this the arduino is giving output even without the presence of any card. Is there something we can do?