Home

LinkSprite RFID Reader/Writer Module (ISO14443

image

Contents

1. Note 0 means low voltage 1 means high voltage x means don t care UART interface The default baud rate is 19200bps Power on default is automatically scan for card and don t need the host to frequently issue scan for card command When card is present SIG will send an interrupt signal and then host MCU can use scan for card command to read the serial number of the card The following two diagrams show how HY502 is connected to host MCU and PC A RS232 level shifter is needed when connecting to PC The RST signal can be left floating and will automatically reset on power cycle SS LinkSprite TXD RXD RXD TXD MCU RST RST HY502 INTO SIG Connection between MCU and HY502 MAX232 or MAX485 Connection between PC and HY502 using a RS232 or RS485 signal level shifter IC interface Only require 2 wire 7 bit programmable address and can support up to 127 module Data rate can be as high as 400kHz Noise suppression circuit can support glitch with duration shorter than 50ns Internal pull up resistors Connection between MCU and HY502 SS LinkSprite Device 1 Device 2 Device 3 aas Device n R1 R2 SDA SCL 4 gt IC multiple devices R1 and R2 are pull up resistors The normal value is 10k The driving capabilitv is 400pF without additional driver IIC timing diagram The bus timing diagram is shown below The SDA must be kept stable logical signal when SCL is high
2. o Success Command header length byte command byte data field check byte o Failed Command header length byte inverted command byte data field check byte Command table and return value UART is used as example IIC and SPI Length byte the length from length byte to the last byte of data field Check byte the accumulated XOR byte value from the length byte to last byte of data will not include the command header 0xAA 0xBB Note Unless specified all numbers are hex Command Length Command ae ID Name Status Byte Code Data and Description 1 byte control byte software power dropping mode nonzero will exit soft sales sena pa DE power dropping mode and 0x00 will enter soft power dropping mode 1 Return 0x02 0x11 Send aabb 03 11 00 12 Command header length byte command code data field check byte Example Return aabb 02 11 13 Command header length byte command code check byte When this command is executed the card will be set to be idle For re Send owe Qala activation card needs to be removed Set card from antenna area and move back IDLE Success 0x02 0x12 2 Return Fail Return 0x02 OxED Send aabb 02 12 10 Command header length byte command code check byte Example Return aabb 02 12 10 Command header length byte command code check byte Set 1 byte data field 0x01 to turn on automatic Send 0x03 0x13 automatic scan and 0x00 to turn off
3. Logical high is data 1 and logical low is data 0 The data can only be changed when the SCL is logical low Addr MSB Add LSB AW ACK Dats MSB Data LSB ACK os CA a AAA LA ATT 9 START SLA R W Data Byte STOP IIC TIME SEQUENCE SPI interface 3 wire synchronous data transfer Write jam protection Wake up call from bus Master and salve SS LinkSprite P1 0 P1 1 MCU P12 P1 3 P14 NSS is the slave selection signal and active low SPI timing diagram UUUUUUUU SAMPLE MOSI MISO MISO 1 H l H H i i t H l i NSS 4 4 1 enr jem 1 MSB FIRST MSB Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 SPI TIME SEQUENCE Driver example include main h include hy502 h define KEY_PRESS 0 sbit M1 P113 mode define define UMODE 0 uart mode define IMODE 1 iic mode define SMODE 2 spi mode mode select funtion void modset unsigned char xx SS LinkSprite if xx 0 uart NSS 1 else if xx 1 iic NSS 0 else if xx 2 SPI M1 0 NSS 1 PERSE SERET FESAT AEREE ESTES main function start here d ES RER een void main uchar idata cStatus uchar BusMode InitializeSystem Init Reset_HY502 LED VELLOW 0 test led LED GREEN 0 delay_10ms 50 LED VELLOW I LED GREEN 1 LED light 0 5s beep 2 test buzz Il test key Ji if KEV 1 KEV PRESS splash if KEY2 K
4. 12 SS LinkSprite scan Success 0x02 0x13 Return Fail Return 0x02 OxEC Send aabb 03 13 00 10 Command header length byte command code data field check byte Example Return aabb 02 13 11 Command header length byte command code check byte Send 0x02 0x19 No data field Success 2 byte data field card type Return PM pa 50 card 0x0400 70 0x0200 A aara 0x02 Oxe6 Send aabb 02 19 1b Command header length byte command code check byte Example Return aabb 04 19 0400 19 Command header length byte command code data field check byte This function includes scan card anti Send me 0x20 collision and select the card Scan for MucgaSs 0x06 0x20 4 byte data the serial number of the card card Return 5 Fail Return 0x02 OxDF Send aabb 02 20 22 Example Command header length byte command code check byte P e Return aabb 06 20 92BF7259 20 Command header length byte command code data field check byte 1 byte key tag 1 byte block number 6 byte key Pa eee QR Key tag 0x00 PICC_AYTHENT1A Read 0x01 PICC_AUTHENT1B block Success A Return 0x12 0x21 16 byte data Fail Return 0x02 OxDE Send aabb 0a 21 00 08 ffffffffffff 23 Command header length byte command code data check byte Examp l e Retu rn aabb 2 1 00112233445566778899AA00BBCCDDEEFF 33 Command header length byte command code data field check byte 1 byte key tag 1
5. 0 means card is present J1 8 VCC Power Positive terminal of power J1 9 GND Ground Ground J2 connector Pin Name Description J2 1 GND Ground J2 2 TX1 Sending antenna 1 J2 3 GND Ground J2 4 TX2 Sending antenna 2 J2 5 GND Ground J2 6 RX Receive antenna Electrical specification Charater Parameter Minimu Typical Maximu Unit m m Tstr Environment or storage temperature 40 150 C Top Operating temperature 25 25 85 C Vec Operating voltages 9 ae 96 V 4 5 5 5 5 lect Operating current 7 54 120 mA Tasr Minimum reset pulse duration 1 6 us e In UART mode the operating voltage is 5V If want to work under 3 3V please contact us at sales cutedigi com e If not specified BOD is 2 7V BOD is 4V if specifically work at 5V SS LinkSprite Selection of interface HY502 supports UART IIC and SPI at the same time The selection of interface is one by setting the voltage level of NSS and M1 Interface Pins IIC UART SPI M1 NSS 10 11 01 The change of interface can be done when the module is in operation But due to the interference the process needs 4ms To guarantee the reliability we recommend to add a delay of 20ms Definition of interface pins at different mode Pin J1 1 J1 2 J1 3 J1 4 J1 5 Mode RXD SCL TXD SDA MISO MOSI NSS M1 IIC SCL SDA AO 0 1 SPI SCL MISO MOSI 1 0 UART RXD TXD X 1 1
6. EY_PRESS splash if KEY3 KEY_PRESS splash if KEY4 KEY_PRESS splash if KEY1 KEY_PRESS 1 2 3 4 a ee NS 3 Mon Select UART jA if KEY2 KEY_PRESS to Select IIC a0 1 al 0 a2 1 else if KEY3 KEY_PRESS BusMode SMODE Select SPI modset BusMode Set interface mode SS LinkSprite delay_10ms 50 l main loop H KeyPress process key add your code here check command tag if g_bReceCommandOk g_bReceCommandOk FALSE if BusMode IMODE cStatus cmd process iic if cStatus cStatus 0 else if BusMode SMODE cStatus cmd_process_spi if cStatus cStatus 0 else cStatus cmd_process_uart if cStatus cStatus 0 UartSend g cReceBuf Send data to uart add your code here Interface Communication Protocols 1 UART protocol e 1 start bit 8 data bit 1 stop bit e Baud rate 19200 10 SS LinkSprite Command format o Command header length byte command byte data field check byte Command header OXAA OxBB if the following data contains OxAA please add an additional 0x00 to distinguish the command header but the length byte will not be increased Length byte the byte length from length byte to last byte of data field Command byte command code Data field the data for the command code Check byte the accumulated XOR byte value from the leng
7. SS LinkSprite LinkSprite RFID Reader Writer Module ISO14443 Proximity cards standard HY502F User Manual December 2009 SS LinkSprite Brief Introduction HY502 series of RFID reader writer modules are based on non contact card reader ASCI chip compatible with ISO14443 standard It uses 600nm CMOS EEPROM technology supports ISO14443 typeA protocol and also supports the MIFARE standard encryption algorithm The chipset integrates analog modulation and demodulation circuits only requires minimal peripheral circuits to function The module supports UART interface 12C interface and SPI interface The digital circuits has dual working voltages mode TTL and CMOS The HY502 module is targeting water electricity gas meters vending machines access control elevators drinking fountains telephone billing system or other identification card reader system applications Users can simply select the desired interfaces to harvest the full operation of the system and do not need to struggle with the complicated radio base station design HY502 series supports Mifare One S50 S70 Ultra Light amp Mifare Pro FM11RF08 and other compatible cards It can be set to automatically find cards by default to automatically find cards HY502 series is a low power modules wide voltage 2 7 5 5V using an integrated module with embedded antenna can significantly reduce PCB size Features o Supports three interfaces at the same time o UART seri
8. al interface o SPI Interface o IC interface o Automatically detect the card close to the antenna area and generate an interrupt signal to the host MCU o Employ chipset of ISO14434A standard and support MIFARE standard encryption algorithm o Working voltage is between 2 7V 5 5V has TTL CMOS voltage modes o Use industrial grade high performance processor built in hardware watchdog with high reliability o Anti jamming processing and excellent EMC performance o A few simple commands can cover the complicated underlying read and write card operations SS LinkSprite Pictures Size 57 8mm X 34 5mm The embedded antenna can read cards within 0 6cm The external antenna which can be connected to J2 by disconnecting the 4 short soldering point can read cards within 0 10cm Pins RXD SCL j TXD SDA MISO te Mined GND MOSI TXI NSS GND RST TX2 MI GND SIG RX VEC oO GND Definition of pins J1 is the connectors from module to host MCU J2 is the connector for external antenna SS LinkSprite J1 connector Pins Name IO type Description TTL CMO S Voltage Ji 1 RXD SCL V O UART receive or clock line for IIC and SPI Jl 2 TXD SDA MISO O UART send or data line for IIC MISO for SPI J1 3 MOSI O MOSI for SPI J1 4 NSS Slave selection for SPI J1 5 RST Reset and active low Floating is okay J1 6 M1 Interface selection bit 1 J1 7 SIG O Interrupt signal
9. byte block number 6 byte key send 0018 pied Key tag 0x00 PICC_AYTHENT1A Write 0x01 PICC_AUTHENT1B block Success 7 Return 0x02 0x22 Fail Return 0x02 OxDD Send aabb la 22 00 08 ffffffffffff 00112233445566778899AA00BBCCDDEEFF 30 Command header length byte command code data check byte Example Return aabb 02 22 20 Command header length byte command code check byte Wallet 1 byte key tag 1 byte block number 6 wae Send Ox0E 0x23 byte key 4 bytes init wallet amount 8 Initializatio i Success 0x02 0x23 14 SS LinkSprite Return Fail Return 0x02 OxDC Send aabb 0e 23 00 08 ffffffffffff 11110000 24 Command header length byte command code data check byte Example Return aabb 02 23 21 Command header length byte command code check byte Send 0x0A 0x24 1 byte key tag 1 byte block number 6 byte key Head Sucess ang 0x24 4 bytes wallet amount LSB in the front wallet Return 9 Fail Return 0x02 0xDB Send aabb 0a 24 00 09 ffffffffffff 11110000 27 Ex ampl e Command header length byte command code data check byte Return aabb 06 24 11110000 22 Command header length byte command code data check byte 1 byte key tag 1 byte block number 6 Send Ox0E 0x25 byte key 4 bytes wallet amount LSB in Deposit the front money Fe 0x02 0x25 10 i Fall 0x02 OxDA Return Send aabb 0e 25 00 08 ffffffffffff 11110000 22 Command header len
10. gth byte command code data check byte Example Return aabb 02 25 27 Command header length byte command code check byte 1 byte key tag 1 byte block number 6 Send Ox0E 0x26 byte key 4 bytes wallet amount LSB in Withdraw ing rant Success monev Return 0x02 0x26 11 Fail Return 0x02 0xD9 Send aabb 0e 26 00 08 ffffffffffff 11110000 21 Command header length byte command code data check byte Example Return aabb 02 26 24 Command header length byte command code check byte 14 SS LinkSprite LinkSprite Technologies Inc Add 1410 Cannon Mountain Dr Longmont CO 80503 Tel 720 204 8599 Email sales linksprite com Technical questions support linksprite com Web www linksprite com 15
11. th byte to last byte of data field Return data format o Success Command header length byte command byte data field check byte o Failed Command header length byte inverted command byte data field check byte 2 IIC protocol The 4MSB of the IIC address is 1010 ie OxAO the four LSB of IIC address can be set set using A2A1A0 W R Data rate of IIC communication 400kbps Data format Address W R length byte command byte data field check byte o Example the module address is 0xA0 Write command W R 0 so the write command will be OxAO 0x0 0xA00 o Example the module address is 0xAO Read command W R 1 so the read command will be OxA0 0x1 OxA1 Length byte the length from length byte to the last byte of data field Command byte the command code Data field the data for the command code Check byte the accumulated XOR byte value from the length byte to last byte of data field Return data format o Success Command header length byte command byte data field check byte o Failed Command header length byte inverted command byte data field check byte 3 SPI protocol Data format Status byte length byte command byte data field check byte 11 SS LinkSprite e Status byte the status byte of the bus A status byte will be sent in the beginning of sending operation Command byte the command code Data field the data for the command code field e Return data format

Download Pdf Manuals

image

Related Search

Related Contents

octobre 2011 - Mairie de Champigny sur Marne  ECMS plus NVR User`s Manual    Prestigio PER5062B e-book reader  Samsung CLX-3185 Urządzenie wielofunkcyjne kolor  Massive Ceiling light 30200/86/10  ES1 manual      welcome - NetvisionDvr  

Copyright © All rights reserved.
Failed to retrieve file