Difference between revisions of "RFID Application Guide"

From Flowcode Help
Jump to navigationJump to search
Line 46: Line 46:
  
 
== Example 1: Reading the status of the RFID Card ==
 
== Example 1: Reading the status of the RFID Card ==
 +
 +
{{Fcfile|Apps_RFID_Ex1_Card_Status.fcfx|RFID Card Status}}
  
 
This example simply initialises the RFID module and then reads the status of the card when placed in the detection area of the RFID board.
 
This example simply initialises the RFID module and then reads the status of the card when placed in the detection area of the RFID board.

Revision as of 08:57, 29 August 2014

Introduction

These examples demonstrate the use of the Flowcode RFID component.

In particular they make use of the EB052 E-blocks RFID board, connected to an EB00600V9 E-blocks PICmicro multiprogrammer fitted with a 16F1937 microprocessor.

However, the examples are easily changed in Flowcode to support other microprocessors and platforms.

The standard RFID E-Block comes with support for the 13.56MHz Mifare and I-Code devices.

The Matrix TSL EB539SI6 Easy RFID bundle has all the items required for these sample applications and is an ideal introduction to RFID.


Setting up the project hardware

Connect the E-Blocks as indicated in the table below.

The RFID, LCD and Switch E-Blocks all need to be powered via wire connections to the +V on the EB006.

Hardware Setup
EB00600V9 PICmicro multiprogrammer
EB005 E-blocks LCD board Port A
EB004 E-blocks LED board Port B
EB052 E-blocks RFID board Port C
EB007 E-blocks push-to-make switch board Port D


Example 1: Reading the status of the RFID Card

FC6 Icon.png RFID Card Status

This example simply initialises the RFID module and then reads the status of the card when placed in the detection area of the RFID board.

This Flowcode example also uses the LCD display to inform the user of progress.

The card status is displayed on the LED board, described in the following tables:


Mifare RFID Device Status Flags
LED
0 EEPROM error (Internal EEPROM write error)
1 Card OK (Card serial number matched to identity code list)
2 Rx OK (Card communication and acknowledgement OK)
3 RS232 error (Host serial communication error)
4 MF type (0 = MF 1k card, 1 = MF 4k card)
5 UL type (0 = MF standard 1k/4k card SINGLE UID, 1 = MF Ultralight card DOUBLE UID)
6 MFRC error (Internal or antenna fault)
7 1


ICODE RFID Device Status Flags
LED
0 EEPROM error (Internal EEPROM write error)
1 Card OK (Card serial number matched to identity code list)
2 Rx OK (Card communication and acknowledgement OK)
3 RS232 error (Host serial communication error)
4 0
5 0
6 MFRC error (Internal or antenna fault)
7 1


To switch between the Mifare and ICODE types of RFID card you can simply change the Card Type property in the RFID component properties window and then recompile to the device.