#trying to connect ttgo t8 esp32 s2 with mfrc522 via SPI

1 messages · Page 1 of 1 (latest)

stone bear
#

the to_read_adress() function is about how the address byte for the mfrc should be structured.
this isn't actually conforming to the spec atm, because the spec says the bytes addressing the MFRC should be terminated by a 0 byte, and then the data sent by the MFRC would start with a 0 byte and the second bye would be the reg-value, but i didn't do either in the micropython implementation and that worked
but just the spi-stuff, is there an error there? trying to get a minimal example for what i'm banging my head against

stone bear
#

i did get it to work both using SPI_Device and "bitbanging" on the SPI. i think the important mistake was missing [] brackets in the bytes constructor-call.
however, i'm still getting a different register read after reloading the esp on the FIRST read as opposed to all following ones...

#

so the same register on the MFRC is 0x25 on the first read but 0x92 ( which is correct, it's the "version" register) on all subsequent reads.

#

is that normal?