|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
september 2011 doc id 17559 rev 2 1/49 AN3224 application note developing an application allo wing pr101-usb and mr101-usb feig readers to communicat e with m24lrxx transponders introduction this application note explains how to develop a visual basic or c/c++ application code to drive iso 15693 feig readers from a host computer. feig readers are contactless readers which can communicate with transponders based on the stmicroelectronics m24lrxx dual interface eeprom. the readers are delivered within st demonstration kit demokit-m24lr-a and development kit devkit-m24lr-a: pr101-usb feig reader is delivered within the demokit-m24lr-a (see figure 1 ) mr101-usb feig reader is delivered within the devkit-m24lr-a (see figure 1 ). this application note helps software engineers using and including the software delivered within the demokit-m24lr-a and the devkit-m2 4lr-a in their own application. code examples are also provided to illustrate how to send visual basic and c/c++ rf commands. note: 1 for details on feig readers go to http://www.feig.de. 2 this application note complements feig development tool documentation and examples. figure 1. pr101-usb and mr101-usb rf reader with integrated rf antenna www.st.com
contents AN3224 2/49 doc id 17559 rev 2 contents 1 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.1 m24lrxx dual interface eeprom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2 pr101-usb and mr101-usb feig contactless readers . . . . . . . . . . . . . 7 1.2.1 pr101-usb feig reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.2 mr101-usb feig reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3 feig development toolchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2 rf iso 15693 commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 installation requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1 installing the .dll files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4 pr101-usb and mr101-usb reader detection . . . . . . . . . . . . . . . . . . . 12 4.1 overview of reader detection and connection functions . . . . . . . . . . . . . . 12 4.1.1 feusb_clearscanlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.1.2 feusb_scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1.3 feusb_getscanlistsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.1.4 feusb_getscanlistpara . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.1.5 feusb_opendevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.1.6 feisc_newreader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2 detection and connection sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.3 visual basic source code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4 c/c++ source code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5 rf iso 15693 high-level commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.1 feisc_0xb0_isocmd general description . . . . . . . . . . . . . . . . . . . . . . . 26 5.2 rf iso 15693 high-level inventory command . . . . . . . . . . . . . . . . . . . . . 28 5.2.1 example of high-level inventory command visual basic source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.2.2 example of high-level inventory command c/c++ source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3 rf iso 15693 high-level reset to ready command . . . . . . . . . . . . . 31 5.3.1 reset to ready command visual basic source code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 AN3224 contents doc id 17559 rev 2 3/49 6 rf iso 15693 transparent comm ands . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1 feisc_0xbf_isotranspcmd general description . . . . . . . . . . . . . . . . . . 33 6.2 issuing a read single block request with a transparent command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.2.1 transparent read single block command visual basic source code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.2.2 transparent read single block command c/c++ source code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6.3 issuing a write single block request with a transparent command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.3.1 transparent write single block command visual basic source code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.3.2 transparent write single block command c/c++ source code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 appendix a feig reference documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 appendix b useful source code zip files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 appendix c list of error codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 c.1 feusb error codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 c.1.1 common errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 c.1.2 scanning errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 c.1.3 handle errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 c.1.4 communication errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 c.1.5 open/close device errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 c.1.6 parameter errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 c.1.7 identification errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 c.2 feisc error codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 c.2.1 common errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 c.2.2 query errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 c.2.3 handle errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 c.2.4 communication errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 c.2.5 parameter errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 c.2.6 plug-in errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 c.2.7 communication data flow errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 c.2.8 task errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 contents AN3224 4/49 doc id 17559 rev 2 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 AN3224 list of tables doc id 17559 rev 2 5/49 list of tables table 1. feusb_clearscanlist visual basic function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 2. feusb_clearscanlist c/c++ function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 3. feusb_scan visual basic function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 table 4. feusb_scan c/c++ function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 table 5. feusb_getscanlistsize visual basic function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 6. feusb_getscanlistsize c/c++ function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 7. feusb_getscanlistpara visual basic function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 8. feusb_getscanlistpara c/c++ function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 9. feusb_opendevice visual basic function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 table 10. feusb_opendevice c/c++ function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 table 11. feisc_newreader visual basic function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 12. feisc_newreader c/c++ function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 13. feisc_0xb0_isocmd visual basic prototype. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 14. feisc_0xb0_isocmd c/c++ prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 table 15. feisc_0xbf_isotranspcmd visual basic prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 table 16. feisc_0xbf_isotranspcmd c/c++ prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 table 17. example of read single block command in visual basic . . . . . . . . . . . . . . . . . . . . . . . . . . 35 table 18. example of read single block command in c/c++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 19. example of write single block command in visual basic . . . . . . . . . . . . . . . . . . . . . . . . . . 39 table 20. example of write single block command in c/c++. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 table 21. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 list of figures AN3224 6/49 doc id 17559 rev 2 list of figures figure 1. pr101-usb and mr101-usb rf reader with integrated rf antenna. . . . . . . . . . . . . . . . . 1 figure 2. demokit-m24lr-a application schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 figure 3. devkit-m24lr-a applicat ion schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 AN3224 description doc id 17559 rev 2 7/49 1 description 1.1 m24lrxx dual interface eeprom the m24lrxx is a dual interface eeprom which can be accessed either through an i 2 c serial bus or a contactless interfac e using the iso 15693 rfid protocol. to easily access the m24lrxx content through its rf interface, st offers several evaluation kits, among which are the demokit-m24lr-a and the devkit-m24lr-a. refer to the product datasheet and to application note an3163 ?configuring your iso 15693 reader to support the m24lrxx? for more in-depth information on the m24lrxx and for explanations on the rf and i 2 c communication protocols. both documents are available from http://www.st.com. 1.2 pr101-usb and mr101-usb feig contactless readers 1.2.1 pr101-usb feig reader the pr101-usb rf reader is delivered within st demokit-m24lr-a. it supports the iso 15693 protocol with high datarate transfers and one subcarrier to communicate with m24lrxx-based transponders by sending rf iso 15693 commands. the reader is connected to the host-computer usb port (see figure 2 ). figure 2. demokit-m24lr-a application schematics 2 & |