• AVR Freaks

Hot!RFID Mifare using PIC18F26K40

New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2021/01/07 07:09:11
  • Location: 0
  • Status: offline
2021/01/11 04:29:12 (permalink)

RFID Mifare using PIC18F26K40

Hello everyone.
I'm having trouble reading MIFARE cards using the MFRC522 module.
I know where the problem is, but I don't know how to fix it.
I am able to communicate with the module via SPI. When I call the function to identify if there is a card, it transmits the 0x26 byte to the antenna and waits to receive a byte from the card. However, she is not receiving anything, even with the card next to the antenna.
attached is the code for a part of the main. I didn't put the configuration pins, because I think everything is ok


while (1)
if( MFRC522_isCard( TagType ) ) 


if( MFRC522_ReadCardSerial( &UID ) )



attached is the library code
(the problem is in the MFRC522_ToCard function. After executing the command, it loops, waiting for a bit from the COMMIRQREG register to be set, indicating that a data has been received.
But even with the card, it receives nothing (the loop ends without setting the bit in the register))

0 Replies Related Threads

    Jump to:
    © 2021 APG vNext Commercial Version 4.5