//Page 0:Command and Status
Reserved00: Reserved for future use
CommandReg: Starts and stops commands execution
CommIEnReg: Controls bits to enable and disable the passing of interrupt Requests
DivlEnReg: Controls bits to enable and disable the passing of interrupt Requests
CommIrqReg: Contains interrupt Request bits
DivIrqReg: Contains interrupt Request bits
ErrorReg: Error bits showing the error status of the last command executed
Status1Reg: Contains status bits for communication
Status2Reg: Contains status bits of the receiver and transmitter
FIFODataReg: in and output of 64 byte FIFO buffer
FIFOLevelReg: indicates the number of bytes stored in the FIFO
WaterLevelReg: Defines the level for FIFO under and overflow warning
ControlReg: Contains miscellaneous Control Registers
BitFramingReg: Adjustments for bit oriented frames
CollReg: Bit position of the first bit collision detected on the RF-interface
Reserved01: Reserved for future use
//Page 1:Command
Reserved10: Reserved for future use
ModeReg: Defined general modes for transmitting and receiving
TxModeReg: Defines the transmission data rate and framing
RxModeReg: Defines the receive data rate and framing
TxControlReg: Control the logical behavior of the antenna driver pins TX1 and TX2
TxAutoReg
TxSelReg: Selects the internal sources for the antenna driver
RxSelReg: Selects internal receiver setttings
RxThresholdReg: Selects threadholds for the bit decoder
DemodReg: Defines demodulator settings
Reserved11: Reserved for future use
Reserved12: Reserved for future use
MifareReg
Reserved13: Reserved for future use
Reserved14: Reserved for future use
SerialSpeedReg: Selects the speed of the serial UART interface
//Page 2:CFG
Reserved20: Reserved for future use
CRCResultRegM: Shows the actual MSB values of the CRC calcalation
CRCResultRegL: Shows the actual LSB values of the CRC calcalation
Reserved21: Reserved for future use
ModWidthReg: Controls the settting of the ModWidth
Reserved22: Reserved for future use
RFCfgReg: Configures the receiver gain
GsNReg: Selects the conductance of the antenna driver pins TX1 and TX2 for modulation
CWGsPReg
ModGsPReg
TModeReg: Defines settings for the internal timer
TPrescalerReg
TReloadRegH: Describes the 16 bit timer reload value
TReloadRegL
TCounterValueRegH: Shows the 16 bit actual timer value
TCounterValueRegL
//Page 3:TestRegister
Reserved30: Reserved for future use
#define TestSel1Reg 0x31
#define TestSel2Reg 0x32
#define TestPinEnReg 0x33
#define TestPinValueReg 0x34
#define TestBusReg 0x35
#define AutoTestReg 0x36
#define VersionReg 0x37
#define AnalogTestReg 0x38
#define TestDAC1Reg 0x39
#define TestDAC2Reg 0x3A
#define TestADCReg 0x3B
#define Reserved31 0x3C
#define Reserved32 0x3D
#define Reserved33 0x3E
#define Reserved34 0x3F
0x4: MFRC522 Command Set
上位机(可以是arduino uno)通过MFRC522预设的指令集来间接的操作RFID射频卡(读写指定扇区数据),RC522支持的指令操作如下
//MF522 command bits
#define PCD_IDLE 0x00 //NO action; cancel current commands
#define PCD_AUTHENT 0x0E //verify password key
#define PCD_RECEIVE 0x08 //receive data
#define PCD_TRANSMIT 0x04 //send data
#define PCD_TRANSCEIVE 0x0C //send and receive data
#define PCD_RESETPHASE 0x0F //reset
#define PCD_CALCCRC 0x03 //CRC check and caculation
前面说过,arduino向MFRC522发送指令本质上就是arduino向MFRC522的指令寄存器写入2字节的指令,等待MFRC522读取并执行、响应
Authentication 认证操作
1. MCM中设有专用的密码存储器(KEY-RAM),用于存储3个密码集KEYSET0,KEYSET1,KEYSET2,每一个KEYSET又包含了各个扇区的KEY A 及KEY B
2. Authentication操作就是将KEY-RAM中的密码与卡中对应的密码进行三次相互认证
3. Authentication操作的卡应答以AE位给出