Home
SSRFIDV1.0Manual
Contents
1. The SPI interface is directly connected with MFRC522 s SPI You can access MFRC522 via this interface If you do so you need to refer to MFRC522 Datasheet Command descripted below is not supported by this interface LED There are 3 LEDs on the board We marked near each LED STATE LED Show status While this module is powered up STATE LED is on If this module executes command successfully STATE LED flashes once Otherwise it flashes 4 times CARD LED While this module detects cards this LED is on While the card leaves the detection area this LED is off MODE LED In Basic Command mode MODE LED is off In Compact Command mode MODE LED is on Command Description There are two kinds of commands Basic Command and Compact Command Basic Command consists of 3 or more bytes Compact Command consists of only 1 byte All Command Data in hexadecimal format For any wrong command sending to this module OxFF will be returned Basic Command should be sent to this module within 5 seconds Otherwise the module will return OxEE If any other data is added behind a right command and sent to this module those data will be ignored Take the command AB 02 01 for example if AB 02 01 AA is sent to this module the AA will be ignored and the command AB 02 01 will be executed H UART Configuration Baud rate could be 2400bps 115200bps Default setting e Baud Rate 9600bps e Parity bit None e Start bit 1 e Data bit
2. 8 e Stop bit 1 H Compact Command l Command Format No Command Explain 1 0x01 Automatically search cards 2 0x02 Automatically read the card serial number 3 0x03 Card serial number will be automatically stored in the EEPROM 4 0x04 Automatically determine whether the card is in authorization list 5 0x05 Automatically find and remove the card in authorization list I Respond Data Success Related Command or Data www elechouse com e Related Command the command calling this respond e Data data for the command depending on the command Fail Value of NOT operation over the related command code H Compact Command Description 1 Search card 0x01 Description look for cards Return 0x01 while it detects a card in its reading area Return OxFE while a card leaves the reading area Command format 01 2 Read the card serial number 0x02 Description Be ready to read the card Return the card serial number if a card is detected Command format 02 3 Record the card s serial number into an authorization list 0x03 Description Whenever a card enters the reading area it records the card s serial number into the EEPROM Maximum 256 cards number can be recorded This module will check the free space of EEPROM from Ox0000 If there are 4 continuous addresses available it will save the card number there Each number will be only saved once If you use this command we do not recommend you do writing opera
3. this operation runs successful only while this module knows a card near it 3 Read data in a block of the card 0x03 Instruction 0x03 Description Reads the data in the blocks 0 63 of the card Format Command AB 0A 03 Block Number Key type Key Checksum Respond Success AB Length 03 Data Checksum Parameter Block Number 0 63 S50 and 0 255 S70 Key type 0x00 A type 0x01 B type www elechouse com Fail AB 02 FC Key authorization key 6 bytes Data the data in that block 16 bytes Example Send AB OA 03 02 00 FF FF FF FF FF FF Return AB 12 03 Block data Tips For a new card the Key is OxFFFFFF Not every block of the card can be read Please refer to the Mifare s datasheet 4 Write data to a block of the card 0x04 Instruction Description Format Parameter 0x04 Write to the Command Block Number 0 63 S50 and blocks 0 63 of AB 1A 04 Block Number Key type Key Data 0 255 S70 the card Checksum Key type 0x00 A type Respond 0x01 B type Success AB 02 04 06 Key authorization key 6 bytes Fail AB 02 FB F9 Example Send AB 1A 04 02 00 ff ff ff ff ff ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff Return AB 02 04 Tips e Not every block can be written Please refer to the Mifare s datasheet e Data filed should be 16 bytes If the Data is less than 16 bytes checksum or even part of next command will be written into blocks as
4. 04 OF has a checksum of OF We got the checksum in the following way OF 07 0C 00 00 04 If you need more information about XOR operation you can click here Tips before sending basic commands you should make sure the checksum setting first By default the basic command has no checksum More information will be explained later Instruction code No Instruction Explanation 1 0x01 Read the card type 2 0x02 Search cards and read the card s serial number 3 0x03 Read data in the card 4 0x04 Write data to the card 5 0x05 Initialize the wallet 6 0x06 Recharge the wallet Z 0x07 Deduct from the wallet 8 0x08 Read wallet 9 0x09 Read EEPROM 10 Ox0a Write EEPROM 11 Ox0b Erase EEPROM 12 OxOc Check if the EEPROM is being written 13 Ox0d Add or remove checksum of Basic Command 14 Ox0e Configure the baud rate 15 OxOf Return to default configuration 16 0x10 Return to standby state Tips No 5 NO 8 are means e wallet functions Respond Data Success Header Length Instruction Data Checksum e Header 0xAB e Length 1 byte all the bytes from Length filed to the last byte of Data field e Instruction 1 byte the Instruction calling this respond e Data Depending on the command can be empty e Checksum 1 byte optional value of XOR operation over all the bytes from the Length byte to the last byte of Data www elechouse com Fail Header Length NOT_of_Instruction Checksum e Header 0xAB e Len
5. ROM Ox0A Instruction Description Format Parameter Ox0A Write data Command Data_Length the byte number to write to EEPROM AB Data_Length 5 0A Mode Mode Address Data Checksum e 0x00 normal writing Respond e 0x01 compulsive writing Address 2 bytes High byte First Data the data to write You can write to EEPROM in two ways Normal Writing or Compulsive Writing By Normal Writing writing is refused if the Success AB 02 0A 08 Fail AB 02 F5 F7 addresses already have data in it any data but OxFF You have to erase the sector first if the addresses are already written By Compulsive Writing data can be written to the addresses no matter if the addresses already have data Example Send AB 09 0A 00 00 01 02 03 04 07 Return AB 02 0A Warning e Becareful while using compulsive writing All the data except the config data is unprotected which means you can change the data in all addresses with this command We recommend that check the status of that address before writing to it e The addresses 0x0200 and 0x0201 save the config data Those 2 addresses are protected Writing to them will fail e Data can t be written into 2 Sectors by one command You should make sure the addresses in one command are all in the same Sector If in 2 Sectors writing will fail And no data was written in 11 Erase EEPROM 0x0B Instruction Description Format Parameter Ox0B Erase data in Command Sector_number The sector n
6. data 5 Initialize the wallet 0x05 Command Description Format Parameter 0x05 Initialize wallet set a Command Block Number 0 63 S50 and 0 255 S70 specified number AB 0E 05 Block Number Key type Key type 0x00 A type money amount inthe Key Value Checksum 0x01 B type specified block Respond Key authorization key 6 bytes Success AB 02 05 07 Value money amount 4 bytes Low Byte Fail AB 02 FA F8 first High byte last Example Send AB OE 05 02 00 ff ff ff ff ff ff 00 ff 00 ff initial amount is OxffOOff00 Return AB 02 05 Tips Usually we take the value as a 4 byte unsigned int If you take this value as signed 4 byte int please remember it is always the complement code 6 Recharge wallet 0x06 www elechouse com Instruction Description Format 0x06 increase value in Command the specified AB OF 06 Block Number Key type block Key Value Checksum Respond Success AB 02 06 04 Fail AB 02 F9 FB Example Send AB OE 06 02 00 ff ff ff ff ff ff 00 00 00 01 Return AB 02 06 7 Deduct from wallet 0x07 Instruction Description Format 0x07 Reduce value inthe Command specified block AB OE 07 Block Number Key type Key Value Checksum Respond Success AB 02 07 05 Fail AB 02 F8 FA Example Send AB OE 07 02 00 ff ff ff ff ff ff 00 00 00 01 Return AB 02 07 Parameter Block Number 0 63 S50 and 0 255 S70 Key type 0x00 A type 0x01 B type Key authoriza
7. e of S50 and S70 And if you use the SPI interface you may need MFRC522 datasheet Mifare S50 d Mifare S70 d MFRC522 Datasheet Disclaimer and Revisions The information in this document may change without notice Please visit www elechouse com for new information Revision History Rev Date Author Description A Nov 22nd 2011 Wilson Shen Initial version
8. gth 1 byte all the bytes from Length filed to the last byte of Data field usually it is 0x03 e NOT ot Instruction 1 byte the value of NOT operation over the related Instruction code e Checksum 1 byte optional value of XOR operation over all the bytes from the Length byte to the last byte of Data f Command Description Note In description of some basic commands we supply examples Examples are all without checksum 1 Read the card type 0x01 Instruction Description 0x01 Read the card type Example Send AB 02 01 Format Command AB 02 01 Respond Success AB 04 01 Card_Type Checksum Fail AB 02 FE FC Return AB 04 01 0400 Card type is Mifare_One S50 Parameter Card_Type 0x4400 Mifare_UltraLight 0x0400 Mifare_One S50 0x0200 Mifare_One S70 0x0800 Mifare_Pro X 0x4403 Mifare_DESFire Tips while sending this command the card has to be in reading area This means this operation runs successful only while this module knows a card near it 2 Read the card serial number 0x02 Instruction Description 0x02 Read the card serial number Example Send AB 02 02 Format Command AB 02 02 00 Respond Success AB 06 02 Serial Number Checksum Fail AB 02 FD FF Return AB 06 02 DE CE C961 Card NO is DE CE C9 61 Parameter Serial Number 4 byte serial number of the card Tips while sending this command the card has to be in reading area This means
9. m Success AB 02 0D Fail AB 02 F2 Example Send AB 03 0D 00 Return AB 02 OD www elechouse com Tips this command has no checksum in any time 14 Set the baud rate OxOE Instruction Description Format Parameter OxOE Set the baud rate Command Number AB 03 OE Number Checksum See the table below Respond Success AB 02 OE 0C Fail AB 02 F1 F3 Example Send AB 03 0E 05 set the baud rate of 19200 Return AB 02 OE Baud Rate Number HEX Baud Rate bps 0x01 2400 0x02 4800 0x03 9600 0x04 14400 0x05 19200 0x06 28800 0x07 38400 0x08 57600 0x09 115200 15 Restore the default configuration OxOF Instruction Description Format Parameter OxOF Restore the default configuration Command NC e No checksum AB 02 OF Checksum e 9600bps Respond Success AB 02 OF 0D Fail AB 02 FO F2 Example Send AB 02 OF Return AB 02 OF 16 Set the module in standby mode Instruction Description Format Parameter 0x10 Exit from executing any command and wait for Command NC new command AB 02 10 Checksum Respond Success AB 02 10 12 Fail AB 02 EF ED Some commands such as 0x01 will occupy this module until next command is received This command will release the module and let it in standby mode working like reset function but data will be not lost Example www elechouse com Send AB 02 10 Return AB 02 10 Size and Drawing 1605 Cmi 1275 088 mil 4e V0H93I3 t tU_si
10. tion key 6 bytes Value money amount 4 bytes Low Byte first High byte last Parameter Block Number 0 63 S50 and 0 255 S70 Key type 0x00 A type 0x01 B type Key authorization key 6 bytes Value money amount 4 bytes Low Byte first High byte last Tips Always read the wallet to check the balance before you do the deduction 8 Read wallet 0x08 Instruction Description Format 0x08 Read value inthe Command specified block AB 0A 08 Block Number Key type Key Checksum Respond Success AB 06 08 Value Checksum Fail AB 02 F7 F5 Example Send AB OA 08 02 00 ff ff ff ff ff ff Return AB 06 08 value Checksum 9 Read EEPROM 0x09 Instruction Description Format 0x09 Read data from Command specified address AB 05 09 Address Data_Length Checksum in EEPROM Respond Parameter Block Number 0 63 S50 and 0 255 S70 Key type 0x00 A type 0x01 B type Key authorization key 6 bytes Value money amount 4 bytes Low Byte first High byte last Parameter Address 2 bytes High byte First Data_Length the byte number to read Data 4 bytes the reply data in that Success AB Data_Length 2 09 Data Checksum address Fail AB 02 F6 F4 Example www elechouse com Send AB 05 09 00 00 04 4 bytes data Return AB 06 09 Data 4 bytes Checksum Tips The EEPROM is 8K For the Data_Length field is 1 byte So this command can read max 255 bytes data once 10 Write to EEP
11. tion to the EEPROM Otherwise the data of authorization list might be lost Command format 03 Return e Success 03 e Fail FC A Check if a card is in authorization list 0x04 Description Whenever the card enters the reading area check if the card is in the authorization list Command format 04 Return e inthe list 04 e Not in the list FB 5 Remove acard s serial number from authorization list Description Whenever the card enters the reading area remove the card from authorization list in EEPROM Command format 05 Return e Success 05 e Fail FA www elechouse com H Basic Command Description l Command format Header Length Instruction Data Checksum Header OxAB Length 1 byte the byte number from Length field included to the last byte of Data field Instruction 1 byte operation instruction more detail on latter pages Data Depending on the command some commands contain none data WR WN BK Checksum 1 byte optional can be configured by command It is the value of XOR operation over all the bytes from the Length byte to the last byte of Data By default this byte is not included in basic demand However to improve working stability of this module in certain environment checksum can be added in Basic Command If the checksum is active in your command you have to calculate it We supply example code of adding and verifying checksum For example this command AB 07 OC 00 00
12. uboM_dI79 1500 008 ml 1950 mild o IDENTIFY neen og O LR SI 2 BU CR a Le d P o S i z a eee e Gei oF a o 3 f i e D on BE OE r aaa Ba ee www elechouse com Code Example of Checksum Here we supply code example of adding checksum and verifying command by checksum vf Function add checksum for basic commands Parameters the basic commands without checksum 2 void AddChkCode unsigned char Cmd 4 unsigned char xorRes Cmd 1 the result of XOR unsigned char i for i 0 i lt Cmd 1 1 i xorRes xorRes Cmd i 2 XOR on from the Length field to the last byte of data Cmd Cmd 1 1 xorRes J f Function verify the checksum of basic commands Parameters the basic commonds with checksum Returns check correct return 1 Parity error it returns 0 SI unsigned char ChkCmd unsigned char Cmd uchar i uchar xorRes Cmd 1 for i 0 i lt Cmd 1 1 i xorRes xorRes Cmd i 2 if xorRes Cmd Cmd 1 1 return 1 else return 0 Example void main unsigned char cmd1 4 OxAB 0x02 0x01 store the basic command 1 Card type no checksum AddChkCode cmd1 add basic instruction a check code ChkCmd recCmd check the received command school Reference information www elechouse com To understand how to write to Mifare cards you may need more information about the structur
13. umber of specified sector of AB 03 OB Sector_Number Checksum EEPROM FEPROM Respond Success AB 03 OB 02 09 Fail AB 02 F4 F6 Example Send AB 03 0B 02 Return AB 02 OB Tips www elechouse com e The addresses 0x0200 and 0x0201 in Sector 2 save the config data Erasing Sector 2 will not delete data in those two addresses e This module has 16 sectors with each sector 512 bytes Sector NO Address Range 1 0x0000 0x01FF 2 0x0200 0x03FF 3 0x0400 0x05FF 4 0x0600 0x07FF 5 0x0800 0x09FF 6 Ox0A00 OxOBFF 7 0x0C00 OxODFF 8 OxOEOO OxOFFF 9 0x1000 0x11FF 10 0x1200 0x13FF 11 0x1400 0x15FF 12 0x1600 0x17FF 13 0x1800 0x19FF 14 0x1A00 0x1BFF 15 0x1C00 0x1DFF 16 0x1E00 Ox1FFF 12 Check status of EEPROM 0x0C Instruction Description Format Parameter 0x0C Check if the specified Command Address 2 bytes High byte First address in EEPROM ofis AB 05 0C Address Data_Length Checksum Data_Length The address number to already written Respond be checked Unwritten AB 02 0C 0E Written AB 02 F3 F1 Example Send AB 05 OC 00 00 04 check addresses 0x0000 0x0003 Return AB 02 0C Tips if the data in the addresses are OxFF those addresses are regarded as unwritten 13 Set the checksum in Basic Command Ox0D Instruction Description Format Parameter Ox0D Add or remove Command Value checksum of Basic AB 03 OD Value 0x00 No checksum Command Respond oxo1 With checksu
14. www elechouse com SSRFIDV1 0 Manual Instruction This RFID reader module is based on MFRC522 supporting the 15014443 standard It supports ISO 14443A MIFARE mode and MIFARE Classic e g MIFARE Standard products This module has UART interface Users don t have to consider the complex control algorithms within the RF unit simply sending commands through the UART interface can do all the operation This module also provides compact commands which is useful in the application of access control attendance and other identification system This module supports cards including Mifare One S50 S70 Mifare_UltraLight Mifare_Pro Mifare_DESFire etc With built in 8K of EEPROM in this module users can easily read and write data by sending commands Feature Control by Serial UART interface Typical operating distance in Reader Writer mode for communication to a ISO IEC14443A MIFARE is 40 50mm With the chip 15014443 it supports MIFARE standard encryption algorithm Configuration data is preserved in EEPROM against power cut off Built in 8K EEPROM easy to access it by sending commands Easy to use by sending simple commands users can control it to read or write cards In compact command command is as short as one byte Excellent EMC performance ROSH lead free Parameter e Power Supply 4 5V 5 5V typically 5V e Interface UART 5V TTL and SPI 3 3V TTL e Size 40mm x 50mm www elechouse com
Download Pdf Manuals
Related Search
SSRFIDV1.0Manual
Related Contents
CM30 - GE3A Prospekt - H + S Bürosysteme Untitled - s3.amazonaws.com Chapter 6 Testing and Troubleshooting Clarity Controls Agilent 1100 Clarity Controls Agilent 1100 取扱説明書 - Gaming Alexandria - Freescale Semiconductor FMI DVF36NH-HA Indoor Fireplace User Manual Saeco Coffee Makers MAC 2002 Coffee Grinder User Manual Copyright © All rights reserved.
Failed to retrieve file