AN-00141 ViSi SM130 RFID Module Interface to 4D Display

Description This application note shows how to update the driver and firmware of the CC3000 WiFi chip. This application note comes with a project specially made to perform the update.
Supported Processor DIABLO16
Supported Environment

ViSi

Difficulty Difficult

 

File Downloads
Documentation
Files

Description

This Application note is intended to demonstrating to the user how to interface SM130 RFID Module to Diablo16 Displays. How to perform HALT, SEEK, AUTHENTICATE, and READ BLOCK commands of RFID using 4D Display will be discussed.

Before getting started, the following are required:

Visit www.4dsystems.com.au/products to see the latest display module products that use the Diablo16 processor.

When downloading an application note, a list of recommended application notes is shown. It is assumed that the user has read or has a working knowledge of the topics presented in these recommended application notes.

 

Application Overview

This document shows how to make a 4D Display – based RFID evaluation software/reader that reads Mifare tags. The Graphical User Interface contains buttons for HALT, SEEK, AUTHENTICATE and READ BLOCK. The ViSi program controls the SM130 RFID Module via UART.

“Radio-frequency identification (RFID) is the wireless non-contact use of radio-frequency electromagnetic fields to transfer data, for the purposes of automatically identifying and tracking tags attached to objects. The tags contain electronically stored information. Some tags are powered by and read at short ranges (a few meters) via magnetic fields (electromagnetic induction). Others use a local power source such as a battery, or else have no battery but collect energy from the interrogating EM field, and then act as a passive transponder to emit microwaves or UHF radio waves (i.e., electromagnetic radiation at high frequencies). Battery powered tags may operate at hundreds of meters. Unlike a bar code, the tag does not necessarily need to be within line of sight of the reader, and may be embedded in the tracked object.

RFID tags are used in many industries. An RFID tag attached to an automobile during production can be used to track its progress through the assembly line. Pharmaceuticals can be tracked through warehouses.

-Wikipedia

 

SM130 RFID Module

 

RFID EVALUATION SHIELD

 

Setup Procedure

For instructions on how to launch Workshop 4, how to open a ViSi project, and how to change the target display, kindly refer to the section “Setup Procedure” of the application note

ViSi Getting Started - First Project for Picaso and Diablo16

 

Create a New Project

For instructions on how to create a new ViSi project, please refer to the section “Create a New Project” of the application note

ViSi Getting Started - First Project for Picaso and Diablo16

 

Design the Project

To create a simple program that will be able to control the SM130 RFID Module, we will need to use some commands enlisted in the DIABLO 4DGL Internal Functions.

Serial (UART) Communication functions are the commands/functions used to be able to control the RFID module. This project used uLCD - 35DT which uses DIABLO processor. To use UART commands, first we need to specify the GPIO pin to use for the com ports receive and transmit line. Here is the list of available GPIO to use:

 

This project used PA12 GPIO for RX pin, and PA13 for TX pin which is connected to Serial Port of SM130 Module.

 

The ViSi - based application project

SM130 have two communication interfaces; UART and I2C. In this application note, UART was used. The communication between the host and the module can take place at 9600bps, 19200bps, 38400bps, 57600bps or 115200bps.

 

In this project, the communication between SM130 and the display is at 9600bps.

 

If one of the button is pressed. The display will output the following: Command, Response, UART frame sent by the display and Response sent by SM130.

 

The datasheet of SM130 RFID Module shows the different commands and responses. The datasheet also discusses the communication protocols. This project only discusses how to execute HALT, SELECT, AUTHENTICATE and READ BLOCK 0 commands.

 

Halt Command

To execute HALT command of the SM130, the display must transmit the necessary UART FRAME:

 

This UART Frame is sent by the HALT() function which is executed if HALT button is pressed

 

Select Command

This command Selects a Tag if it is present in the field. On receiving the command, the module executes an Anti-collision and Select command sequences. If a tag was present, then it selects the tag and sends the serial number of the tag as response. If a tag was not present, it sends an error code back.

 

Here are the following UART Frame sent by the display in Select() function:

 

If a tag was selected, the response data length is 6 or 9 bytes. The first byte is the command byte (0x83) and the next is the Tag Type and the next 4 bytes / 7 bytes are the tag serial number MSB first. The serial number is 4 bytes for Mifare 1K and 4K tags and 7 bytes for Mifare Ultralight tags.

 

If no tag was present, the data length is set to 1 and the Error code returned is ‘N’ If RF Field is OFF, the data length is set to 1 and the Error code returned is ‘U’.

Output when no tag                                  

 

Output when tag is present

 

Authenticate Command

This command authenticates the specified block with the specified Key type and Key sequence. If Authentication fails then the Select Tag operation should be repeated to authenticate again.

 

Here are the following UART Frame sent by the display in Authenticate() function:

 

If a tag is previously selected the response would be login successful. Else if no tag is previously selected then the response would be no tag present.

Output with no tag

 

Output with tag

 

Read Block Command

This command reads 16 bytes from the specified block. Before executing this command, the particular block should be authenticated. If not authenticated, this command will fail.

 

Here are the following UART Frame sent by the display in Authenticate() function:

 

When reading a Mifare UL tag, the first 4 bytes are from the block number specified. The next 12 bytes are from the consecutive blocks. In this project, BLOCK 0 of the tag is read.

Output if read successful

 

Output if read fail

 

Running the project

For instructions on how to save a ViSi project, how to connect the target display to the PC, how to select the program destination (this option is not available for Goldelox displays), and how to compile and download a program, please refer to the section “Run the Program” of the application note

ViSi Getting Started - First Project for Picaso and Diablo16

 

The uLCD-32PTU and uLCD-35DT display modules are commonly used as examples, but the procedure is the same for other displays.

 

Share: