jmy 502 users manual by luckboy

VIEWS: 48 PAGES: 8

More Info
									Jinmuyu Electronics Co., LTD Mifare Module JMY-502 user’s manual V1.21

http://www.jinmuyu.com

JMY-502 User’s Manual
(Revision 1.21)

1 Summary
JMY-50x series contactless card Read/Write module was designed base on MF RC500 or MF RC531 series PCD product of Philips. Users need not take care how to control the PCD. Just send command to module over IIC or UART selected by a Pin could operate contactless card with fully functions. JMY-501 Support Mifare One & Mifare Pro, auto request selectable when working with Mifare One. JMY-502 Mifare One appropriative, auto request selectable. JMY-503 Ultra Low Power version of JMY-502. Power consumption is about 25mA (average) during operating cards and 0.15mA when set power down. JMY-509 Module builds in high performance antenna (operating distance 110mm, Mifare one), IIC/UART selectable.

2 Characteristic
2.1 2.2 Completely operation of Mifare One through simple command set. Communication Protocol: 2.2.1 2.2.2 2.3 UART: Suitable for PC and 8 bits UART MCU/DSP baud rate 19200bps. IIC: Suitable for MCU/DSP, max. 400Kbps.

Auto request default, need not send request command frequently. Indicate a low level (0) when card in the antenna area.

2.4

Build in watchdog.

1

Jinmuyu Electronics Co., LTD Mifare Module JMY-502 user’s manual V1.21

http://www.jinmuyu.com

3 Dimensions and Pins 3.1 JMY-502

3.2 TX-500 Antenna

3.3 MT-500 Testing board
MT-500 testing board is design for JMY-50x serial RF module. Users could use MT-500 to test and develop to JMY-50x serial module rapidly. MT-500 uses MCS51 MCU to operate the module. Users could develop application rapidly based on the source code supplied with MT-500 (including IIC and UART). The sample codes are functions of C51 in a KEIL project. MT-500 could be communicated bridge of PC and JMY-50x. Users who use PC could program on PC and build application to operate JMY-50x rapidly.
2

Jinmuyu Electronics Co., LTD Mifare Module JMY-502 user’s manual V1.21

http://www.jinmuyu.com

3.4 Dimensions of module
Product name Module Antenna Model JMY-50x TX-500 TX-501 TX-502 Testing board MT-500 ( mm) 43.0 * 20.5 70.0 * 70.0 50.0 * 50.0 30.0 * 30.0 102.0 * 76.0

3.5 Package
The package of the module is same as DIP32. Just some Pins are not be use.

3.6 Pins function
PIN 1 2 14 15 16 17 18 19 31 32 Function RX TGND ICC 0: card in; 1: card out TXD/SDA RXD/SCL VCC GND SPS 0: IIC 1: UART TX1 TX2 Antenna output 1 Antenna output 2 UART TXD/IIC SDA UART RXD/IIC SCL VCC GND Serial port selector Description Antenna receive Antenna GND Card in/out indicate

3

Jinmuyu Electronics Co., LTD Mifare Module JMY-502 user’s manual V1.21

http://www.jinmuyu.com

4 DC characteristic
Parameter Power supply Current consumption Module start up time Card response Operating temperature Storage temperature Com port switch time -25 -40 Min 4.5 12 200 Typ 5.0 50 400 Max 5.5 70 500 200 +85 +125 200 Units V mA mS mS ℃ ℃ mS

5 Protocols 5.1 UART protocols of Commands
5.1.1 5.1.2 5.1.3 5.1.4 Asynchronism half duplex Baud rate: 19200bps Data package format: Start header + Command length + Command + Data + Checksum Start header: 0xAA 0xBB, if there is 0xAA in data package, and then MUST add a 0x00 follow to distinguish start header. But Command length will NOT increase. 5.1.5 5.1.6 5.1.7 5.1.8 Command length: number of bytes from Command length to the last byte of Data. Command: command of this package. Data: parameters and the other data, maybe empty. Checksum: Exclusive OR (XOR) result from Command length byte to the last byte of data.

5.2 UART protocol of Data return format
5.2.1 Success:

Command header + Command length + Command just received + Data + Checksum
4

Jinmuyu Electronics Co., LTD Mifare Module JMY-502 user’s manual V1.21

http://www.jinmuyu.com

5.2.2

Failure:

Command header + Command length + (0xFF - Command just received) + Checksum

5.3 IIC protocols of Commands
5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 IIC address of module is 0xA0 IIC speed: 400Kbps Data format: (Module address + W/R) + Command length + Command + Data + Checksum Command length: number of bytes from Command length to the last byte of Data. Command: command of this package. Data: parameters and the other data, maybe empty. Checksum: Exclusive OR (XOR) result from Command length byte to the last byte of data.

5.4 IIC protocol of Data return format
5.4.1 Success:

Command header + Command length + Command just received + Data + Checksum 5.4.2 Failure:

Command header + Command length + (0xFF - Command just received) + Checksum

5.5 Serial COM port switch
JMY-50x serial module support IIC and UART both. If SPS pin is high level (1), the COM port is UART and low level the COM port is IIC. UART baud rate is 19200bps and IIC is max. 400Kbps. User could switch COM port when module is working. But for anti-jamming, switch COM port need 5ms. For reliability that 200ms delay is strong recommended.

5

Jinmuyu Electronics Co., LTD Mifare Module JMY-502 user’s manual V1.21

http://www.jinmuyu.com

6 List of commands
Command name Command length Command Data and description byte
1 byte working model antenna status → Bit0=0: OFF Module Send 0x03 0x11 Auto request → Bit0=1: ON Bit1=0: OFF Bit1=1: ON return Send 0x02 0x02 0x02 0x11 0x12 0x12 1 byte request model Send 0x03 0x20 Request model =0: request all =1: Request not halted

1
control

2

Set Idle Return

3

Request

Success 0x06 return Failure 0x02 return 1 byte key identification + 1 byte block number + 6 bytes key key identification Send 0x0A 0x21 =1: key B block number = 0-63(S50) =0: key A 0xDF 0x20 4 bytes card serial number

4

Read block = 0-255(S70) Success 0x12 return Failure 0x02 return 6 0xDE 0x21 16 bytes data

Jinmuyu Electronics Co., LTD Mifare Module JMY-502 user’s manual V1.21

http://www.jinmuyu.com

1 byte key identification + 1 byte block number + 6 bytes key key identification Send 0x0A 0x29 =1: key B Read Sector Sector number = 0-15(S50) = 0-63(S70) Success 0x42 return Failure 0x02 return 1 byte key identification + 1 byte block Send 0x1A 0x22 number + 6 bytes key + 16 bytes data to write Success 0xDE 0x29 64 bytes data =0: key A

5
(4 blocks)

6

Write block return Failure

0x02

0x22

0x02 return

0xDD

1 byte key identification + 1 byte block Send 0x0E 0x23 number + 6 bytes key + 4 bytes purse value (LSB first) Initialize

7
purse

Success 0x02 return Failure 0x02 return 1 byte key identification + 1 byte block Send 0x0A 0x24 number + 6 bytes key Success 0xDC 0x23

8

Read purse return Failure

0x06

0x24

4 bytes purse value (LSB first)

0x02 return

0xDB

7

Jinmuyu Electronics Co., LTD Mifare Module JMY-502 user’s manual V1.21

http://www.jinmuyu.com

1 byte key identification + 1 byte block Send 0x0E 0x25 number + 6 bytes key + 4 bytes increment value (LSB first) Purse

9
increment

Success 0x02 return Failure 0x02 return 1 byte key identification + 1 byte block Send 0x0E 0x26 number + 6 bytes key + 4 bytes decrement value (LSB first) Purse 0xDA 0x25

10
decrement

Success 0x02 return Failure 0x02 return 1 byte key identification + 1 byte current purse Send 0x0B 0x27 block number + 1 byte backup to block number + 6 bytes key 0xD9 0x26

11

Backup purse

Success 0x02 return Failure 0x02 return Send Success 0x02 0x28 0x02 0x28 0xD8 0x27

12

Card halt

return Failure 0x02 return 0xD7

8


								
To top