0

I followed this https://raspberrypi.stackexchange.com/a/56513/57412 trying to use my RC522 on spi 1.0 but I'm stuck.

Could someone give me a hand wiring correctly (I hope it is) and how to use the right Python library and codes in order to get it working.

I use RPi3.

I added this to /boot/config.txt:

dtoverlay=spi1-3cs
dtoverlay=pi3-disable-bt

and if I search, I can see this:

ls /dev/spi*
/dev/spidev0.0  /dev/spidev0.1  /dev/spidev1.0  /dev/spidev1.1   /dev/spidev1.2

I used these repos:

https://github.com/mxgxw/MFRC522-python 
https://github.com/lthiery/SPI-Py

and here is the wiring list:

Name    Pin #   Pin name
SDA     36      BCM16
SCK     40      BCM21
MOSI    38      BCM20
MISO    35      BCM19
IRQ     None    None
GND     Any     Any Ground
RST     None    None
3.3V    1       3V3

How can I find where the RC522 is actually connected? On which spidev?

1

Use this repository: https://github.com/ondryaso/pi-rc522

It implements IRQ (Interruption Request) that makes insignificant CPU usage and much more efficient the reading process (non-blocking). You will need to add one more cable from the IRQ pin on the MFRC522.

0

http://abyz.me.uk/rpi/pigpio/index.html#Type_3 shows the needed SPI GPIO.

For the auxiliary SPI (spidev1.x) you need to connect miso, mosi, sclk.

You also need to choose a slave select line as follows. It doesn't matter which you use.

ce0  for spidev1.0
ce1  for spidev1.1
ce2  for spidev1.2
0

I actualy get it working with my previous settings here in my first post. However I think it's because i used an older version according to my "uname -a":

Linux raspberry 4.4.13-v7+ #894 SMP Mon Jun 13 13:13:27 BST 2016 armv7l GNU/Linux

So i think that the problem could come with my tests under the last Pixel desktop release.

I could mark this post as closed if anyone could confirm my opinion on pixel or not ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.