Recent

Author Topic: RC522  (Read 2343 times)

sergechelli

  • New member
  • *
  • Posts: 9
RC522
« on: December 05, 2018, 08:08:14 pm »
Hi,

I am using Lazarus on Raspberry Pi (raspbian)
I want to use the RFID card reader/writer RC522.
Do you have an example how to use it with Lazarus please ?
All library and example found use Python.

Thank you

Serge

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: RC522
« Reply #1 on: December 06, 2018, 10:16:51 am »
On the net I can see that Mifare MFRC522 uses SPI. If that is the reader you have, then there are more then one way to access SPI from FPC on Pi:
http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi
http://wiki.freepascal.org/Hardware_Access
http://wiki.freepascal.org/Raspberry_Pi_-_SPI

On this page you can find RC522 datasheet and Arduino library with example code:
https://playground.arduino.cc/Learning/MFRC522

It would be much easier to adapt Arduino code then Python code. If you don't speak C then datasheet will be your best friend (after logic analyzer, of course :-).
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

sergechelli

  • New member
  • *
  • Posts: 9
Re: RC522
« Reply #2 on: December 07, 2018, 12:00:50 am »
Thank you.

 

TinyPortal © 2005-2018