Author |
Message |
Topic: Using MFRC522 RFID Reader with PIC16F877 |
Mario_KA
Replies: 17
Views: 132548
|
Forum: Code Library Posted: Thu Nov 30, 2017 6:51 am Subject: Using MFRC522 RFID Reader with PIC16F877 |
I managed to implement the MFRC522. The headerfile is based on #include <main.h>
#include <lcd16216.c>
#define CS PIN_A5
#use rs232( baud=9600, parity=N, xmit=PIN_C6, rcv=PIN_C7, bi ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Mon Nov 27, 2017 1:06 pm Subject: RC522 RFID module SPI |
Well, the MFRC522 data sheet says the current can go up to 100ma
when the TX outputs are enabled. So the effective load resistance
can be calculated:
R = V/I = 3.3v / 0.1 A = 33 ohms
So your ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Mon Nov 27, 2017 12:27 pm Subject: RC522 RFID module SPI |
Are you using a resistor divider to try and function as a voltage regulator?
Yes I thought that be sufficient for the first tests.
What are those resistor values ?
1Kohm and 2KOhm |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Mon Nov 27, 2017 8:40 am Subject: RC522 RFID module SPI |
I think Tx1 and TX2 are connected to the antenna , at least that what the library says.
I use the ICD- U40 as power supply and then an easy voltage divider made of two resistors to cut the voltage ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Mon Nov 27, 2017 7:46 am Subject: RC522 RFID module SPI |
This chip is giving me the hardest headache ever.
I can read/write but whenever I set the TxControlReg the chip turns off, even the LED on the chip is off and I have to reconnect.
I use the same ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Sun Nov 26, 2017 3:47 pm Subject: RC522 RFID module SPI |
Yes true, but I swapped them without success.
It so weird because I just hooked up my MC3202-C ADC with SPI and it is running without any problem. So basically SPI seems correct from my point of view ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Sun Nov 26, 2017 2:21 pm Subject: RC522 RFID module SPI |
https://s8.postimg.org/s73dgztq9/connection.png
I swapped SDO and SDI several time just to make sure thats not the issue. |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Sun Nov 26, 2017 1:08 pm Subject: RC522 RFID module SPI |
I had that before and then I decided to use it without functions because I just want to read that one Register to find out where the issue is.
I still changed it and there is no difference :(
#i ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Sun Nov 26, 2017 12:36 pm Subject: RC522 RFID module SPI |
#include <main.h>
#include <lcd16216.c>
#define VersionReg 0x37
//spi modes
#define SPI_MODE_0 (SPI_L_TO_H | SPI_XMIT_L_TO_H)
#define SPI_MODE_1 (SPI_L_TO_H)
#define SPI_MO ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Sun Nov 26, 2017 12:17 pm Subject: RC522 RFID module SPI |
Sounds reasonable but didnt change anything unfortunately
Thats all I want to do know because the rest will be selfexplaining once i get to write/read one register.
output_low(CS);
//spi_ ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Sun Nov 26, 2017 10:46 am Subject: RC522 RFID module SPI |
Cool beans,
I have another Question. I have an Arduino Mega here and the RFID reader is working perfectly fine. Anyway I need to use PIC16...
First step is reading the firmware version in the sa ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Thu Nov 23, 2017 12:44 am Subject: RC522 RFID module SPI |
Honestly that's what programming is ! Reading hundreds of pages of datasheets, spending weeks cutting code, and drinking pots of coffee into the wee hours to LEARN how to use 'chips'. I've got 5+ dec ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Wed Nov 22, 2017 6:01 am Subject: RC522 RFID module SPI |
...as for the hardware, just use a 3 volt power supply and keep set the PIC clock at 8MHz. This will interface properly however you might have damaged the RFID device from supplying 5 volts. It's best ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Tue Nov 21, 2017 3:48 pm Subject: RC522 RFID module SPI |
The 'N' is a standard abbreviation for -ve. The PD input needs to be high, or the whole chip is disabled. However the data sheet suggests that the RST is an _edge triggered_ signal, with a reset trig ... |
Topic: RC522 RFID module SPI |
Mario_KA
Replies: 68
Views: 275637
|
Forum: General CCS C Discussion Posted: Tue Nov 21, 2017 1:57 pm Subject: RC522 RFID module SPI |
I had some issues today which I can't fix before Friday :(.
Anyway I am not too sure how to connect the Reset. In this thread he guys claimed RST is connected to ground?
On some other schematics I ... |
|