134.2kHz RFID Evaluation Kit User s Guide. Atmel ATAN0083. Introduction

APPLICATION NOTE Atmel ATA2270-EK2 - AVR-based 125/134.2kHz RFID Evaluation Kit User’s Guide Atmel ATAN0083 Introduction Congratulations on your purc...
Author: Mae Hill
0 downloads 1 Views 2MB Size
APPLICATION NOTE Atmel ATA2270-EK2 - AVR-based 125/134.2kHz RFID Evaluation Kit User’s Guide Atmel ATAN0083

Introduction Congratulations on your purchase of the Atmel® AVR®-based 125/134.2kHz RFID evaluation kit. As a fully stand-alone RFID system, this evaluation kit is for demonstrating how Atmel integrates 125/134.2kHz RFID technology. This user guide describes the setup and operation of the evaluation kit. Section 2. “Getting Started” on page 4 describes the assembly of the hardware and provides a demonstration of RFID. Subsequent sections discuss the variables that can be manipulated via the software.

9321A–RFID–06/13

1.

Overview

1.1

Purpose It is the intention of Atmel® to provide everything necessary for you to decide whether 125/134.2kHz RFID is suitable for your intended application. This kit includes a reader system with an LCD screen and several Atmel transponders that demonstrate communication between the reader and transponders. The supplied hardware also provides a starting platform for developing a custom prototype. The updated soft- and firmware related to this evaluation kit can be downloaded from the Atmel RFID FTP server. The access code can be found in a separate document within the kit. A PC is only required to support custom demonstrations or to launch firmware updates (optional AVR® tools required to (re-) Flash the firmware). This user guide will be modified to reflect the updated firmware features. If your evaluation kit does not appear to have the same features listed in this document, please download and install the latest firmware from the Atmel FTP server. We also ask that you register your address with the registration code by sending a message to this email address: Doing so ensures you receive notifications about software releases and password changes. Email address: [email protected]

1.2

General Description Radio frequency identification (RFID) has been used for more than a decade and continues to provide more and more benefits, primarily in the areas of access control (employee badge entry), animal ID (ear tags or pet injectables), and auto immobilizer (theft prevention); RFID can be used for many additional applications as well. The wide variety of transponder features now offered makes it possible to maximize return on equity for prospective systems. An RFID reader or interrogator functions by passing an alternating current through an air core coil and thus generating an electromagnetic field. The magnetic field provides all of the power needed to operate the tag or transponder. This source of power eliminates the need for a separate power supply on the tag and thereby reduces the size, cost, and any placement constraints. In this case, the RF field operates at 125/134.2kHz. The tag responds by manipulating this RF field.

1.3

Evaluation Kit Features ● ● ● ● ● ● ● ●

Large 128x64 graphic LCD with backlighting Four-way joystick with center press Four configurable push buttons Plug-in connectors accept modular RFID reader boards 9V-16V power supply with reverse polarity protection 3V battery backup circuit to preserve real-time clock function Soft-power switch to shutdown system for battery operation Fully compatible AVR tools interface connectors (JTAG/ISP)

This evaluation kit is scalable to accommodate new reader boards as they become available. Adding an interface to a PC-based development environment later is also possible via the mainboard. These interfaces allow the basic kit to be used for the expanding family of Atmel RFID products. As support for these features is added, the firmware can be downloaded from the Atmel RFID FTP server and Flashed into the microprocessor on the mainboard using very common tools such as the AVR Studio®, STK500, or the JTAGICE.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

2

1.4

Included in the Kit The kit features basic components specified individually below. ● The reader system



1.5



An Atmel® ATA2270-EK2 mainboard (1)



An Atmel ATAB4095A-U1.1 reader board (1)



A 125/134.2kHz RFID antenna coil (1)



Universal power supply



A USB-to-RS232 serial converter

Sample tags ●

Atmel ATA5577M1330C-PP



Atmel ATA5577M1330-PAE (NOA3S micromodule)



The Atmel ATA5575M2 animal ID tag



The Atmel ATA5577 ISO card



The Atmel ATA5575M1 ISO card



The Atmel ATA5577 key fob



The Atmel ATA5577 coin tag

Optional Items Not Included in the Kit The following items are useful for additional evaluation of this kit. These can be used to (re-)Flash the firmware provided by Atmel or customer-specific application code. ● The Atmel AVR® STK600 starter kit and development system

● ● ●

JTAGICE MKII AVRISP MKII AVR Studio® 6 (downloadable from the Atmel website)

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

3

2.

Getting Started The Atmel® U2270-EK2 kit is based on the EM4095 reader chip solution which superseded the discontinued Atmel U2270B device. The reader system consists of the reader board (RB) and the Atmel ATA2270-EK2 mainboard (MB). The Atmel ATA2270-EK2 evaluation kit is designed to allow rapid setup and evaluation of a working RFID system. The following paragraphs provide guidance on hardware assembly, menu navigation, and writing and reading a tag.

2.1

Hardware Assembly The steps for assembling the hardware are listed below. 1. Ensure that the reader board is connected to the mainboard. With the mainboard oriented so that the power connector is at the lower left corner, the reader board should be oriented so that the antenna connector is on the lower right side.

2.2

2.

Connect the supplied 125/134.2kHz antenna. This is an air core coil wound around a plastic housing.

3.

Connect to power using the supplied source. This is a 12V supply capable of providing 800mA. This supply comes with interchangeable universal plugs to support operation in the US, UK, Europe, and Asia.

4.

The evaluation kit is now ready for operation. To begin, move the power switch towards the power supply plug-in (ON position).

Navigating the Menus The F1 to F4 buttons are used for jumping back to the previous menu. A four-way joystick is used for all other navigation. The “Enter” command is accomplished by pressing the center of the joystick.

2.3

Initializing a Tag Note:

The following process contains no verification of success; it is an attempt only. Ensure that a valid tag type is present in the RF field when performing this step.

When beginning to work with a new tag for the first time, the tag must be placed into a fixed configuration. Choosing “RFID”, then the “Write Configurations” menu, and then selecting YES accomplishes this. When ENTER is pressed, the system attempts to write the appropriate configuration block data into the selected tag type. The configuration block (normally block 0) specifies the data rate, modulation type, number of blocks returned, synchronization type, and other features the tag is capable of supporting. This only needs to be done when the state of the tag is unknown.

2.4

Writing a Tag The steps for writing to a tag are listed below. If there is a problem, refer to Section 5 to ensure all initial values are set in the reader system. 1. Ensure that the correct tag type is selected in the “RFID>Select Reader/Tag” menu. 2.

Place the tag being evaluated in the RF field. Ensure proper orientation of the tag and reader antennas. The two antenna coils must be parallel to each other for the magnetic field to couple and provide adequate power.

3.

Go to the “RFID>Read/Write” menu and select “One Block” in the write column.

4.

Choose the desired block. Move the joystick up or down to change the block number.

5.

Move to the thirty-two bit number shown in the data column.

6.

Use the joystick to set any hex number (edit high and low nibbles) as desired. Press ENTER to exit.

7.

Press ENTER again to perform the write operation. Verification of the write operation is performed and audio feedback is provided. A message window also pops up briefly showing the status of the operation.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

4

2.5

Reading a Tag The steps for reading a tag are listed below. If there is a problem, refer to Section 5. “Troubleshooting” on page 23 to ensure all initial values are set in the reader system. 1. Ensure that the correct tag type is selected in the “RFID>Select Reader/Tag” menu. 2.

Place the tag being evaluated in the RF field. Ensure proper orientation of the tag and reader antennas.

3.

Go to the “RFID>Read/Write” menu and select “Manual” in the read column.

4.

Press ENTER to perform the read operation.

5.

Observe the contents of the tag fields on the LCD. Audio feedback is used to signify the status of the read attempt. A beep confirms that a read operation was successful.

Caution: 6.

If the power supply is disconnected before the power switch is moved to OFF, the kit is NOT in a low power state and the button cell battery drains very quickly.

After finishing, move the mainboard power switch away from the power supply plug-in (OFF position) to disconnect from the main power. If the unit is not going to be used in the near future, disconnect the power supply as well.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

5

3.

Hardware Description This section contains a detailed description of the hardware furnished with the evaluation kit.

System Block Diagram A block diagram of the user I/O, reader, and transponder is shown in Figure 3-1. Figure 3-1. System Block Diagram Reader Hardware Antenna Driver

Audio Output

Command Inputs

Diode PLL AVR Microcontroller

Transponder Hardware

Capacitor

Visual Display

Antenna Coil

User I/O Hardware

Antenna Coil

3.1

Transponder IC

Freq Tune Programming I/O

PC Interface

Input Filter

Power Supply

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

6

3.2

Atmel ATA2270-EK2 Mainboard Components of the Atmel® ATA2270-EK2 mainboard are shown in Figure 3-2 and discussed in the following subparagraphs. Figure 3-2. Atmel ATA2270-EK2 Mainboard

3.2.1

Board The MB was designed as a generic interface platform to support Atmel RFID reader products. This board makes it convenient to work with RFID and allows the reader boards to be limited to the most basic RF circuits. All user interface and audio/visual feedback is contained in this board. Gerber files for this two-layer board are available on request.

3.2.2

LCD The large graphic display provides an evaluation environment. Because the display supports graphics as well as text, advanced control features can be implemented. The display can be used during prototype development of the end system. The size of the display (128x64) provides a large screen area, maximizing the amount of data visible without having to scroll. Menu options can be used to adjust contrast and brightness depending on the environment and viewing angle.

3.2.3

Reader Board Connections The reader board connector’s twenty pins allow the MB to interface with and control the reader hardware. These pins also supply the reader board with two potential power rails. Features included are TWI, SPI, ADC (3), and timer I/O. The pinout is listed in Table 3-1 on page 8.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

7

Table 3-1.

Reader Board Connector U2/ Atmel ATmega128

Pin

3.2.4

Pin

1

VCC1

VCC2

11

2

PG5 (OC0B)

PD0 (SCL/INT0)

12

3

PB0 (SS/PCINT0)

PD1 (SDA/INT1)

13

4

PB1 (SCK/PCINT1)

PD4 (ICP1)

14

5

PB2 (MOSI/PCINT2)

PD6 (T1)

15

6

PB3 (MISO/PCINT3)

PD7 (T0)

16

7

PB4 (OC2A/PCINT4)

PF1 (ADC1)

17

8

PB5 (OC1A/PCINT5)

PF2 (ADC2)

18

9

PB6 (OC1B/PCINT6)

PF3 (ADC3)

19

10

GND

GND

20

AVR Microprocessor The entire RFID reader system is controlled by one AVR® micro. The Atmel® Atmega128 provides large Flash memory for future upgrades (the initial release uses 30 percent of the 128K Flash). Additional features can be added in the future as well as providing a system to develop custom software using the kit hardware. This microcontroller also includes 4K of EEPROM that is used to store the kit setup state. This makes it possible to resume a previous evaluation state after a power cycle without having to reset all the variables.

3.2.5

PC Serial Connector A serial port connector is located under the LCD. This connector is enabled in a firmware upgrade to be released on the Atmel website at a later time (http://www.atmel.com).

3.2.6

Power Supply and Switch The MB provides power through the reader board connectors to both the control/display portion as well as the RB. The kit contains a wall power adaptor that supplies 12V and can be used around the world with interchangeable plugs. The power supply circuits on the MB protect against reverse bias and feed a 5V voltage regulator. Caution:

If the power supply is disconnected before the power switch is moved to OFF, the kit is NOT in a low power state and the button cell battery drains very quickly.

The second function of the power supply circuit is to provide a battery (3V Li) backup supply for the AVR microcontroller. This maintains the real-time clock (RTC) function while the kit is not supplied with main power. The power switch is a “soft” switch because it does not disconnect the power supply directly. The power switch controls a microcontroller I/O line that, when set low, places the kit system into low-power sleep mode with the RTC still active. The main power can then be removed. In this state the battery should last for more than two years. Note:

3.2.7

If main power is removed before the power switch is turned off, the kit is NOT in a low-power state and the button cell battery drains very quickly. This does not compromise the RFID functionality of the kit and the system can still be used with main power applied.

Joystick and F4 Button The joystick and F1 to F4 buttons allow menu navigation and selection activation. Provisions are made for additional function switches to accommodate later expansion of the kit. These function buttons execute the “Return to Previous Menu” function. The joystick allows navigation in four directions. Navigate the menus by moving the joystick in the desired direction. The joystick also acts as an “Enter” button when it is pressed down with the joystick centered. When pressed, the menu item currently selected is activated.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

8

3.2.8

Interconnecting to the Atmel AVR STK600 Starter Kit and Development System and the JTAGICE MKII Programming the Flash and EEPROM memories can be accomplished using standard Atmel® AVR® tools. There are two interface connectors provided to accomplish this. The 6-pin connector can be used with the ISP header on the STK600; the 10pin connector is a dedicated JTAG connector and can be used with the JTAGICE MKII. Both of these use AVR Studio to interface with and program the evaluation kit. The pinout of both connectors is shown in Table 3-2 and Table 3-3. Table 3-2.

The JTAG Connector

Pin

Pin

1

PF4 (TCK)

2

3

PF6 (TDO)

4

5

PF5 (TMS)

Reset

6

7

8

9

Table 3-3.

PF7 (TDI)

10

The ISP Connector

Pin

Pin

1

MISO (PDO)

VCC

2

3

SCK

MOSI (PDI)

4

5

Reset

GND

6

The General Use Interface A 10-pin header has been included to allow users to easily connect external hardware. This header allows access to the AVR microcontroller as well as direct access to the reader board. Power and ground have also been included for ease of signal biasing. The microcontroller pins available are shown in Table 3-4. Refer to the pins listed in Table 3-1 on page 8 to see what connections on the reader board are applicable. Table 3-4.

The General User Connector for the Atmel ATmega128

Pin

Pin

1

PF1 (ADC1)

PD0 (SCL/INTO)

2

3

PF2 (ADC2)

PD1 (SDA/INT1)

4

5

PB5 (OC1A/PCINT4)

PD4 (ICP1)

6

7

PB6 (OC1B/PCINT6)

PD6 (T1)

8

9

GND

VCC

10

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

9

3.2.9

Atmel ATA2270-U2 Reader Board Assembly of the Atmel® ATA2270-EK2 reader board is shown in Figure 3-3. Figure 3-3. Atmel ATA2270-U2 Reader Board

3.2.10 LED Section Five status LEDs are provided for quickly indicating the status of the RFID reader. The first two LEDs show the power supply state. The next three indicate the state of the RF field being generated by the reader. Viewed from left to right, the LEDs show regulated power, Reader IC active mode, RF field activity, and two-stage frequency tuning settings.

3.2.11 Power Section The reader board is supplied by 5V regulated voltage fed from the MB via the lower right U2-2 connector. The reader remains in power-down (sleep) mode if the SHD input is pulled to high level.

3.2.12 Reader Section There are four main areas in the reader of the RB: the antenna resonant circuit, the Q factor, the input filter circuit, and the frequency tuning circuit. The antenna resonant circuit: This circuit sets the self resonant point for the reader antenna. The resonant LC circuit also allows the antenna voltage to increase above the driving voltage. Resonance is accomplished by adding a series capacitance to the inductance provided by the external antenna coil. A series resistance is also used to limit the current and set the antenna Q factor. A method for tuning the antenna circuit is to start with an LC combination and drive this circuit with a square wave from a function generator. Monitor the antenna voltage at the capacitor connection point and attempt to get the peak voltage to occur at 125/134.2kHz. Increasing the frequency of the function generator to greater than 125/134.2kHz results in greater voltage, making additional capacitance necessary. If a lower frequency has greater voltage, this means there is too much capacitance in the system. Input filter circuit: The data response from a transponder is modulated directly on the carrier frequency. In order to decode this signal, it must first be “harvested” from the carrier. A capacitive voltage divider shifts the modulated high-voltage carrier to a suitable level for processing by the demodulator input.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

10

Frequency tuning circuit: The maximum range of communication is achieved when the resonant frequency of the reader matches the resonant frequency of the transponder. Higher Q factors for the antenna, while increasing the range, also make the frequency match even more important. Because the tag antenna is fixed in most cases, this circuit allows trimming of the resonant frequency of the reader antenna through software control. There are four steps provided in increments of approximately 2kHz. The current selection is displayed on the status LEDs in a binary manner. The frequency is tuned by adding capacitance to the resonant circuit. This is accomplished using high-voltage (200V) MOSFET devices. The capacitor can be connected to ground through the FET using software. This lowers the resonant frequency of the circuit. With two of these structures, there are four possible combinations to choose from.

3.2.13 Antenna Coil Included in the kit is an air core antenna coil shown in Figure 3-4. This is an external antenna so that a custom antenna can be interfaced with the RB if other antennas are to be experimented with. This antenna is wound to give an inductance of approximately 800µH. If a different antenna is used, it should either meet this number or the capacitors on the RB should be adjusted to make the circuit resonant. The connector is a locking type because of the high-voltage differential placed on the antenna. Figure 3-4. The Air Core Antenna

The area of the antenna is an important factor in the range the system can achieve. There is always a trade-off between available area and range required. In addition, the area the transponder antenna encloses also affects the system range. This antenna attempts to achieve a compromise suitable for a simple system. However, this only serves as a guideline reference and is not the ultimate form factor for an antenna.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

11

3.2.14 Reader Board Connections The 20 pins of the reader board connector allow the reader hardware to communicate with the microcontroller. These pins also supply the reader board with two potential power rails. The functions used for the EM4095 reader device are listed in Table 3-5. Table 3-5.

The Reader Board Connector Function

Pin

Pin

1

VIN

2

5V

11

RDY/CLK

12

3

13

4

DEMOD_OUT

14

5

MOD

15

6

SHD

16

7

EPD

17

8

BD (board detection)

18

9

19

10

3.3

GND

GND

20

125kHz Transponders All of the transponders except for the Atmel® ATA5575 consist of data grouped into blocks. These blocks contain 32 bits and are displayed in hex format. It is very important to be aware of the order of these blocks. When displayed, bits 1 to 32 read from left to right. Data BlockX Bit Order 1

2

3

4





29

30

31

32

Some transponders described in this document are obsolete and no longer available on the market. Nevertheless, they are supported by the RFID kit, allowing customers to evaluate and test existing applications. The transponders (tags) consist of the following items: an IC, a capacitor, and an antenna coil. There are several options provided by Atmel, from bare ICs on a wafer all the way to a complete transponder in a plastic package. Included in the kit are several form factors for these transponders. These are not the only options available, but intended as a guideline reference for what can be achieved.

3.3.1

Atmel ATA5577 The Atmel ATA5577 is the latest Atmel 125kHz transponder. This transponder is equipped with a configurable analog front end and is reverse-compatible to the now obsolete Atmel ATA5551, ATA5557, and ATA5567 types in the most commonly used modes. This enables the tag to be configured to work in a variety of circumstances such as a very high Q configuration. In addition, this allows the Atmel ATA5577 to have industry-leading performance when used in an ISO11784/785 configuration. This device should be considered for all new designs. Please visit the Atmel website for more information on what is required when configuring the analog front end supported by the kit in the firmware (http://www.atmel.com).

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

12

Tag samples of the Atmel® ATA5577 are provided by kits having various shapes: Figure 3-5. Various Shapes Provided by the Kit

3.3.2

Atmel ATA5575 Read/Write Device The Atmel ATA5575 is an optimized subset of the Atmel ATA5577. Two versions are designed to address two general LF-RFID applications: ● The Atmel ATA5575M1 is intended for the widely used unique format



The Atmel ATA5575M2 is intended for the animal ID segment according to ISO-11784 and ISO-11785 but also for access control applications in FSK modulation also knows as Q5 mode

This transponder consists of one configuration byte and 15 bytes of user memory. The evaluation kit is set to the typical M1/M2 configuration. This ensures that if a tag is configured properly it will be read by the system with very little difficulty. If it is not sure whether the tag is properly configured, write the proper configuration using the “Write Configuration” menu before using the other menu options.

3.3.3

Atmel TK5530 (Obsolete) Read only device. The data is programmed at the factory and cannot be modified. Customers can provide Atmel with a custom file to be loaded into the tags if they would like specific numbers. Otherwise, Atmel will load a sequential number to the tags. There is a maximum of 128 bits of data stored in these tags. Various modulation and data rates are available. This kit supports a “default” tag type configured to use RF/32, Manchester, 64-bit data.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

13

3.3.4

Atmel TK5551M-PP Read/Write Device This transponder consists of one configuration block and seven data blocks. Each data block stores 32 bits of information for a total data memory of 224 bits. The evaluation kit is set to use only one configuration. This ensures that if a tag is configured properly, it will be read by the system with very little difficulty. If it is not sure whether the tag is properly configured, write the proper configuration using the “Write Configuration” menu before using the other menu options. This transponder is shown in Figure 3-6 in relation to a dime. This package also includes the Atmel® ATA5577M1330C-PP based on the new Atmel ATA5577 chip technology. Figure 3-6. The Atmel TK5551M-PP (Atmel ATA5577M1330C-PP) Transponder

3.3.5

Atmel TK5552 Read/Write Device (Obsolete): Not Described, Selectable in Stand-Alone, Inoperable

3.3.6

Atmel T5557 and Atmel ATA5567 Read/Write Device (Obsolete) This transponder consists of one configuration block, seven data blocks, and two manufacture ID blocks. Each data block stores 32 bits of information for a total programmable memory of 224 bits. The evaluation kit is set to use only one configuration. This ensures that if a tag is configured properly, it will be read by the system with very little difficulty. If it is not sure whether the tag is properly configured, write the proper configuration using the “Write Configuration” menu before using the other menu options. The manufacture ID blocks are locked from the factory and can be used as a unique ID to track the tags.

3.3.7

Atmel ATA5570 Read/Write Device (Obsolete) Figure 3-7. Optional Atmel ATA5570 Board

3.3.8

Atmel ATA5558 (Obsolete) The ATA5558 has an anti-collision feature and is furnished with a larger memory size of 1k bits. The anti-collision uses “Interrogator Talk First” and then a tree-walking scheme. This evaluation kit currently includes basic read and write support but does not support multiple tags in the field.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

14

4.

Software Description This section contains a detailed description of the software furnished with the evaluation kit. The menu hierarchy shows the initial settings that should be used.

4.1

Menu Hierarchy When switching the evaluation kit on for the first time, the main menu appears across the top row of the LCD. The main menu consists of the following four items: RFID, PC, RTC, and Display. This section covers these menu items in detail. Entries are shown in parenthesis and for convenience the initial setting has an asterisk (*) next to it.

4.1.1

RFID ●





Select reader/tag ●

Reader column (U2270B*)



Tags column (x5530/ x5551/ x5552/ x5557/ x5567*/ x5577/ x5570/ x5558)

Reader options (U2270B) ●

RF field - (Off*/On)



Output - (Off/On*)



Standby - (Off/On*)



Ant tune - (High/ Semi-High/Semi-Low*/Low)

Tag options (will change based on tag type) ●



Write column - Pulse-pause code timings (x5567) ●

SGap time (300µs to 600µs) 330µs*



Gap time (100µs to 300µs) 220µs*



One time (300µs to 500µs) 370µs*



Zero time (80µs to 250µs) 100µs*

Read column - Minimum and maximum limits for Manchester times (x5567) ●

Short (µs) (50µs min, 210µs max)*



Long (µs) (210µs min, 350µs max)*



Term (µs) (330µs min, 450µs max)



Write configurations (Yes/No) - If Yes, an attempt is made to program block 0 of the selected tag. No verification is done in this step.



Read/Write menu (begins with search and select menu for x5558 tag) ●



Write column ●

Write one block - Edit/write one block



Write all blocks - Edit/write all blocks



Write AFE options - Only x5577



Write tag ID - Only x5558



Write clear - Only x5558

Read column ●

Read manual - ENTER starts read



Read auto - Reads until exit (F4 button)



Read Mfg. ID - Only supported tags



Read AFE Reg - Only x5577



Read tag ID - Only x5558

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

15



Animal ID ●



4.1.2

Write lot - Reserved for future batch programming mode (not available yet)

Read column ●

Read lite - Reads ISO 11874/875 format country and national code. A check mark indicates correct CRC.



Read all - Reads ISO 11874/875 formatted data and displays all of the information contained.

Serial (not supported yet) USB (not supported yet)

Time - Displays the current time ●



Pressing ENTER while the time is selected changes the time format. Select value and use joystick up/down to change. Save by pressing ENTER.

Date - Displays the current date ●

Note:

Pressing ENTER while the date is selected changes the date format. Select value and use joystick up/down to change. Save by pressing ENTER. The 3V button cell battery must be used so that the time and date remain active and correct. Insert the button cell battery into the receptacle on the bottom of the mainboard. Observe proper polarity by orienting the battery so that the plus (+) side is away from the board.

Display ● ● ● ●

4.2

Write one - Edit and program tags to comply with the ISO 11874/875 protocol



RTC ●

4.1.4



PC ● ●

4.1.3

Write column

Contrast - Adjust LCD contrast Brightness - Adjust backlighting Sound - Turn audio feedback (Off/On*) Inverse - Invert LCD colors (Off/On*)

Using RFID The menu settings are explained in more detail in the following paragraphs.

4.2.1

Select Reader/Tag Menu In order to begin the evaluation of the Atmel® family of RFID devices, a reader and tag type must be chosen. Atmel currently uses one reader interface equipped with the EM4095 device. This is selected by default. To select a transponder, scroll up/down using the joystick. The currently selected tag is indicated by a check mark. To change the selected tag, select it and press ENTER. The new check mark position shows that the change was successful. Note:

It is very important to choose the desired reader/tag combination before proceeding. The other menu options may differ depending on the selections made in this menu.

The selected tag type is displayed in the header for easy reference in the subsequent menus.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

16

4.2.2

Reader Options Menu This provides control over the selected reader hardware. Only the EM4095 reader IC is currently supported. This menu allows control of the RF field, demodulated output, standby mode, and antenna resonant frequency. ● RF field: This option allows direct control of the generation of the RF field by turning it on or off. Testing of the RF field spectrum, tag response time, etc., can be achieved by using this menu option.



Demodulated output: The received RF signal is demodulated and placed on the output pin. The result is that the output line is constantly toggling even if there is no valid tag in the field. If it is not necessary to provide this to the microcontroller all the time, the output can be turned OFF until needed.



Standby mode: The reader IC can be placed in a standby mode to reduce current consumption. If turned on, the IC goes into a low-power state.



Antenna resonant frequency: This allows the RF frequency to be adjusted by ~2kHz steps. There are four possible choices. These are labeled to show the direction the frequency is being shifted. This is achieved by switching capacitors in using software control. The tuning of the RF field is a manual operation and does not automatically choose the best option. For best system performance, the resonant frequency of the reader antenna and tag antennas must be matched. This circuit allows the reader resonant frequency to be adjusted because in most cases the tag side cannot be modified.

The menu option is selected in all cases by moving the joystick up/down. When the desired option is selected, change the value by moving the Joystick left/right. The change is stored in EEPROM and survives after power is removed.

4.2.3

Tag Timing Options Menu The timing limits are used in the communication protocol with the transponder. There are two timing limits that are available to most tags—write and read. Write timings control downlink communication. This is where the reader sends commands and/or data to the transponder. The Atmel® reader uses pulse-pause coding (PPC) where the RF field is modulated by OOK. OOK indicates that the RF field is switched completely on or off. PPC uses fixed gaps (RF OFF) to separate the individual data bits. A logic “1” is considered a long (RF ON) and a “0” a short (RF ON) burst of RF field between two gaps. Sending a gap of SGap time starts the write process. The write timings menu allows the actual time value of these to be modified. Read timings deal with the uplink communication from the transponder to the reader. Although many of the Atmel tags can communicate in other modes, the U2270B (default) reader can only demodulate AM responses. In addition, this evaluation kit only decodes Manchester data formats (except for animal ID). Other data formats may be implemented in the future. In Manchester decoding it is important to specify edge-timing limits. There are minimum and maximum limits set for Manchester short (T) times as well as Manchester long (2T) times. Some tags also require a sequence terminator-timing limit to synchronize the incoming data. Where applicable, this appears in the “Read Timing” menu. To modify a limit, first move up/down while the limit name is selected. Then move right/left to select the limit to modify. Finally, move up/down to change the limit value. Return to the limit name by moving right/left again. These timing limits are preset to work in most normal operating conditions. If the system is being used in different conditions or if changes have been made, these limits may need to be adjusted. For example, limits need to be adjusted if a custom transponder or reader antenna is being used. Default timings for the different tags are shown in Table 4-1 on page 18.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

17

Table 4-1.

Default Timing Values Write Timings (µs)

Tag Type

SGap

Gap

One

Read Timings (µs) Zero

x5530

Short Min

Short Max

Long Min

Long Max

50

200

200

320

Term Min

Term Max

x5551

350

276

324

80

50

200

200

300

300

450

x5552

?

?

?

?

?

?

?

?

?

?

5557

330

220

370

100

50

200

200

350

5567

330

220

370

100

50

200

200

350 ?

?

x5575

?

?

?

?

?

?

?

?

5577

330

220

370

100

50

200

200

350

5570

330

220

370

100

50

200

200

350

5558

300

100

(ref)120

50

200

200

350

Note:

The Q factor of the antennas in the system play an important role in the timing limits required.

4.2.3.1 Write Configurations Menu Most of the Atmel® transponders provide a means of configuring the uplink communication by setting a configuration block with the appropriate value. The configuration block (normally block 0) specifies the data rate, modulation type, number of blocks returned, synchronization type, and other features the tag is capable of supporting. For the Atmel ATA2270-EK2 kit to provide the most reliable communication with the different transponders, the tags must be placed into a fixed configuration. Choosing the “Write Configurations” menu and selecting YES accomplishes this. When ENTER is pressed, the system attempts to write the appropriate configuration block data into the selected tag type. This only needs to be done when the state of the tag is unknown. Do this when beginning to work with a new tag for the first time. If a different configuration is desired, the change must be made in the source code provided on the supplied CD. Note:

This process contains no verification of success; it is an attempt only. Ensure that a valid tag type is present in the RF field when performing this step.

4.2.3.2 Read/Write Menu The primary purpose of the evaluation kit is contained in this menu. The menu provides the interface used to store and retrieve information from a passive RFID transponder. If the selected transponder is a read-only device, the choices will be limited to simple retrieval of the stored data. Availability of these menus is dependent on what the selected transponder supports. The following sections describe the operation of the menu items in detail.

Write - One Block This item allows each data block to be written separately. First, select the block number to be written by scrolling up/down with the joystick. The number of data blocks is dependent on the selected tag type. Once the block number is selected, move the joystick to the right to edit the data. Each data block consists of 32 bits. These are shown as four hex numbers and each nibble (4 bits) can be changed independently by moving the joystick up/down. Once the data values have been set, press ENTER to return to the block number selection. Pressing ENTER when a block number is selected, starts the write procedure. This step performs verification of the data written to the transponder and audible feedback to indicate the result. If the write was successful, the system returns a beep. If any error occurs, a buzz sounds to indicate that the data may not have been successfully written. A message window also pops up briefly showing the status of the write operation.

Write - All Blocks This menu functions much the way the Write - One Block does with the exception that all blocks are visible and can be modified. The same controls apply for selecting and editing the data. When all data blocks have been set to the desired values, pressing ENTER on any of the block labels starts the write sequence. The system then attempts to write and verify each block sequentially. This results in a string of audio feedback results equal to the number of data blocks supported by the transponder. A message window also pops up briefly showing the status of the write operation.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

18

Read - Manual This is the most basic data retrieval routine. Each time the “Enter” button is pressed, a read cycle is initiated. This attempts to demodulate the incoming data signal using the selected tag timings. A beep sounds with the data displayed on the LCD if the attempt is successful. The LCD is then latched until the next read cycle. This is very useful for checking the contents of a transponder and verifying the accuracy of the stored data. If a transponder supports more blocks than can be displayed on the LCD, scrolling up/down with the joystick changes the page number and allows the additional blocks to be seen. The selected page remains on the display for each subsequent read attempt.

Read - Auto The auto routine is designed to allow continuous checking of the transponder. This is useful for finding a hidden transponder or checking the read range of a tag form factor. In this mode, the system continuously loops through a read routine and displays the resulting data on the LCD. If there is no tag in the reader field, the display shows zeros only and an buzz sound indicates the read attempt failed. A beep confirms that a tag was read successfully. If a transponder supports more blocks than can be displayed on the LCD, the same scrolling holds true as defined in the Read Manual routine.

Read - Mfg. ID If the Atmel® transponder supports traceability data, this menu allows the system to read these blocks. These controls work the same as those described in the Read Manual routine. The data is formatted into a manufacture ID and displayed. This data can be used to uniquely identify a tag or to provide feedback to Atmel.

Additional Unique Features The Atmel ATA5558 transponder includes some additional features, making the “Read/Write” menu look different. To access the “Read/Write” menu, a unique transponder ID must be selected. An additional in-line menu allows a search routine to identify all the transponders in the field. It is then possible to select one of these tags for communication. All communication starts by selecting an ID command followed by the specific command required. This allows the reader to communicate with the selected tag while the other tags remain in the field. First, navigate to “RFID>Read/Write Menu>5558 Anti-collision”. Press ENTER to start the search routine. Once the tags currently located in the field are identified, they are listed from largest ID to smallest. Move the joystick to the left to select a transponder. Moving up/down changes the tag currently selected. Press ENTER to continue to the “Read/Write” menu. In addition, it is possible to read the tag ID and write a new tag ID.

Read - Tag ID ● This menu reads and displays the three blocks of configurable tag ID data. These blocks are used in the anti-collision process to separate the transponders occupying the RF field. Pressing ENTER starts a new read attempt.

Write - Tag ID The transponder ID used in the anti-collision process can be modified. When changing this ID, make sure that it remains unique or the system will not function correctly. After selecting the block to be changed, use the “Right/left” button to select the desired data nibble to be changed. Scrolling up/down changes the value of the selected data. Pressing ENTER anywhere on the block labels starts the write process. The new tag ID is then stored as the selected one so that continued communication with the same transponder can occur. Note that the new tag ID is initialized to the tag ID previously read.

Read - AFE Reg The Atmel ATA5577 has a configurable analog front end and the current settings can be read using this menu option. The settings are broken up into a functional description and displayed in bit values. (except for soft mod suffixed with D or A) Scroll up/down to see all of the settings.

Read - AFE Reg The Atmel ATA5577 has a configurable analog front end and the settings can be changed using this menu option. The data is shown in hex format with the default setting of 9DC00000. Please refer to the datasheet to select new settings for this block.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

19

4.2.3.3 Animal ID A subset of RFID is the animal identification application. Special formats for this feature are specified in ISO 11784/785 standards. This menu allows the evaluation of transponders using these formats. In addition, an application note describing how to use Atmel RFID products for this application is also included on the CD. The ISO standard specifies an operating frequency of 134.2kHz. This evaluation kit nominally operates at 125kHz but can be modified to work at the correct frequency by changing the capacitors in the antenna tuning circuit.

Read - Lite All transponders complying to ISO standards should facilitate being read from this menu. This works as a standard animal ID reader and continuously tries to detect a tag with the ISO 11784/785 format. Once this is found, the country code and national code is displayed. In addition, CRC checking is carried out and if valid, a check mark is placed after the national code. This runs continuously until exiting the menu by pressing F4.

Read - All All transponders complying to ISO standards should facilitate being read from this menu. Pressing ENTER starts a new read process. After the information is decoded, it is formatted and displayed on the LCD. There are two flag bits that are identified and displayed as a YES/NO. These are the animal and data flags. The country code is displayed first as a hex and then as a decimal value. A national code is shown as a hex value because of size constraints. The CRC displayed (first in hex then decimal) is the decoded value. If this matches the calculated value, a check mark appears after the decimal value. Finally, the optional data values are displayed as hex values.

Write - One This configures certain Atmel transponders in a mode compatible with the ISO animal ID standards. From this menu it is possible to edit the two flag bits as well as the national code. The country code is set to 999d for test tags. The display format is the same as in the “Read” menu.The “Up/down” buttons allow navigation between labels. Change the value of the selected label by moving the joystick right/left. Once all data values have been changed, press ENTER while any label is selected to start the write process (no verification is carried out in this step). Read the animal ID to verify that the write was successful.

Write - Batch This feature is not available yet. It is for creating a batch programmer and will be implemented in a later software release.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

20

4.3

Sample Software All of the source code used to create this evaluation kit is available on the CD-ROM and can be modified to fit the end application. The initial software modules are written in C using a Codevision compiler. All subsequent software is written in AVR Studio using the WinAVR plugin. The header (*.h) files contain all of the functions available. These are the guides that should be used when calling the functions. The different function blocks are broken out into self contained modules for easier portability. The most useful modules are the reader module (rfid_U2270.c/h) and the transponder modules (rfid_x5551.c/h, rfid_x5557.c/h, etc).

4.3.1

Code Examples The following are two examples of how to use the software modules to achieve a read tag and then write a block of data to the tag. The appropriate .c and .h files should be included to support the readers and tags referenced in the code below. ************************************************************************************ unsigned char sBlockDat[9] = “00000000”; unsigned char *sBlockDatPtr; unsigned char *cDatPtr; unsigned char *choldDatPtr; unsigned char startBlock = 1, endBlock = 31; //**** Check selected tag and configure appropriate number of Blocks ****// if(Target_Tag = = 58){startBlock = 0;} else if(Target_Tag = = 30){endBlock = 2;} else{endBlock = 7;} sBlockDatPtr = &sBlockDat[0]; strncpyf(sBlockDatPtr,resetBlock,8); ioActive = 0; if(Target_Reader = = 70) { if(Target_Tag = = 51){rError = U2270_Read555xTerm(Target_Tag, &cDatPtr, 224);} else if(Target_Tag = = 30){rError = U2270_ReadHeader(Target_Tag, &cDatPtr, 64);} else if(Target_Tag = = 57 || Target_Tag = = 67 || Target_Tag = = 70) {rError = U2270_Read5557Term(Target_Tag, &cDatPtr, 224);} else if(Target_Tag = = 58){rError = U2270_Read5558Data(&cDatPtr, 1024);} choldDatPtr = cDatPtr } ioActive = 1; ************************************************************************************ ************************************************************************************ unsigned char cBlockSel = 1; unsigned char sBlockDat[9] = “00000000”; unsigned char *sBlockDatPtr; unsigned char cBlockDat[4] = {0}; unsigned char WRbuffer[6] = {0}; unsigned char startBlock = 1, endBlock = 31; if(Target_Tag = = 58){startBlock = 0; } else{endBlock = 7;} ioActive = 0; if(Target_Tag = = 51){T5551_WriteBlock(Target_Reader, &cBlockDat[0], cBlockSel, 1);} else if(Target_Tag = = 57){T5557_WriteBlock(Target_Reader, &cBlockDat[0], cBlockSel, 1);} else if(Target_Tag = = 67){T5567_WriteBlock(Target_Reader, &cBlockDat[0], cBlockSel, 1);}

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

21

else if(Target_Tag = = 70){T5570_WriteBlock(Target_Reader, &cBlockDat[0], cBlockSel, 1);} else if(Target_Tag = = 58) { WRbuffer[0]=0x80; T5558_WriteCommand(Target_Reader, &WRbuffer[0], 6); delay_ms(2); PORTF |= 0x00; WRbuffer[0]=0x77; WRbuffer[1]=0x80; T5558_WriteCommand(Target_Reader, &WRbuffer[0], 44); delay_ms(2); PORTF |= 0x00; T5558_WriteBlock(Target_Reader, &cBlockDat[0], cBlockSel, 1); delay_ms(2); } ioActive = 1; ************************************************************************************

4.3.2

Programming Guide Atmel® encourages the use of this kit to develop a prototype platform for evaluation of the intended application. The kit accepts two very common programming interfaces—ISP and JTAG. ISP is a downloading method where only six I/O lines are needed. The supplied header works with the ATSTK500 as well as the AVR® ISP in-system programmer. Both of these are available from Atmel or distributors for very low-cost program development. To program the Flash memory and the EEPROM, first connect the programming tool to the MB using a 6-pin ribbon connector. Make sure that proper orientation is maintained by aligning pin 1. The file types accepted use Intel Hex format. To program a hex file into the target AVR device, select “Program AVR” and then “Connect...” from the “Tools” menu in AVR Studio. Once AVR Studio has been opened, connect to the STK500 or AVRISP by selecting “STK500 or AVRISP” from the platform list. Then select “Connect...”. The driver for the STK500 and AVRISP is then started, and the STK500 dialog should appear. Note that the system supports other programming platforms as well, such as the JTAGICE or the JTAGICE mkII. Then, on the “Program” tab, select the AVR target device from the pull-down menu and locate the Intel Hex file to be downloaded. Select the “Program” button. Repeat these steps for the EEPROM section. The same steps apply when using the JTAGICE MKII. The JTAG platform allows more control during software development by allowing real-time debugging of the source code. The JTAGICE MKII supports setting breakpoints and stepping through the code being executed on the target micro. This is very useful for a more complex software project such as this one.

4.3.3

Fuse Settings: Fuse bits must be set properly for the kit to function. The only fuse bits that should be set are listed below. ● JTAG interface enabled; (JTAGEN=0)

● ● ● ●

Serial program downloading (SPI) enabled; (SPIEN=0) Boot Flash section size=512 words boot start address=$FE00; (BOOTSZ=11) Brown-out detection level at VCC=2.7V; (BODLEVEL=1) Int. RC OSC. 8MHz; start-up time; 6CK + 64ms; (CKSEL=0100 SUT=10)

All others should be unchecked.

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

22

5.

Troubleshooting Problems and their solution are shown in the following troubleshooting tables. Table 5-1.

Troubleshooting the Mainboard

Problem Power LED not on

Reason

Solution

Power supply not connected

Provide 9V-16V to the MB power plug

Power switch not on

Move switch to left

LCD reset line hung

Remove power plug. Apply power. Move switch to left

Power shut off

See “Power LED not on”

LCD ribbon cable disconnected

Remove screws and check ribbon cable connector

Contrast set incorrectly

Press “Reset”. Move joystick to the left three times. Press ENTER. Move the joystick left/right and watch for change

LCD blank

Re-Flash the EEPROM with initial values

Software not executing correctly

Switch power off. Remove power supply. Apply power. Switch power on Press reset button Re-Flash Program and EEPROM with initial files

Sound not working

RTC not correct

Re-Flash of memory did not work

Fuse settings incorrect

See “Fuse Settings”

Sound turned off

Check “Display>Sound” and verify it is turned ON

I/O line disconnected

Check R8 populated with 0

Battery dead

If the battery is dead, the kit will not keep time accurately after power is removed. Replace the battery Always use the power switch before removing power supply to conserve battery life

The fuse settings are incorrect

See “Fuse Settings”

Power not connected

Power must be supplied for programming

Verify source code version

Check for the latest version on the Atmel website

The fuse settings are incorrect

See “Fuse Settings”

The AVR tools are not connected properly

Check the help files on AVR Studio

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

23

Table 5-2.

Troubleshooting Reader Board

Problem Power LEDs not on

RF field not active

Cannot read from tag

Reason

Solution

Power supply not connected

Verify the RB is correctly attached to MB

Reader is in standby

Set “Standby” to OFF in “Reader Options>Standby”

RF field turned off

Check Reader “Options>RF Field” setting

Antenna not connected

Connect included antenna

Antenna shorted

Verify that the two antenna leads are not shorted

Read range seems very short

If the range seems to be extremely short, please connect a lead from an earth ground to the ground turrets on the reader hardware. It is possible that the power supply is too noisy in that location and an earth ground connection should clean this up

Antenna not connected or tuned

Check antenna connection and verify that the antenna is transmitting the proper frequency using an oscilloscope

Antenna voltage not sufficient for attempted range

Move the tag closer to the antenna. Verify that the voltage on the antenna (cap side) is ~200V

Antenna orientation incorrect

The antenna windings of both tag and reader must be parallel to each other. For plastic transponders, this means the tag needs to be perpendicular to the plane of the reader antenna

Object or radiator causing interference

The system should not be used on or near a metal surface. In addition, any devices transmitting at 125/134.2kHz cause reading problems

Wrong tag selected in “Select Reader/Tag” menu

Select the correct tag

The tag is configured incorrectly

Multiple tags present in the field

Incorrect timing limits

Cannot write to tag

Program the correct configuration using the “Write Configurations” menu If this does not fix the problem, the tag may have been locked This system does not currently support multiple tags in the field. Verify that only one tag is within range of the reader system, unless using the Atmel ATA5558 Reset timing limits to the default value listed in Table x Re-Flash the EEPROM with initial values

Output not enabled

Turn output on in the “Reader Options” menu

Cannot access tag

Verify that the tag can be read. Use troubleshooting described above

Tag has been locked

Not possible to unlock tag

Tag is read-only

Not possible to write to tag

Atmel ATAN0083 [APPLICATION NOTE] 9321A–RFID–06/13

24

Atmel Corporation 1600 Technology Drive

Atmel Asia Limited Unit 01-5 & 16, 19F

Atmel Munich GmbH Business Campus

Atmel Japan G.K. 16F Shin-Osaki Kangyo Building

San Jose, CA 95110

BEA Tower, Millennium City 5

Parkring 4

1-6-4 Osaki

USA

418 Kwun Tong Roa

D-85748 Garching b. Munich

Shinagawa-ku, Tokyo 141-0032

Tel: (+1) (408) 441-0311

Kwun Tong, Kowloon

GERMANY

JAPAN

Fax: (+1) (408) 487-2600

HONG KONG

Tel: (+49) 89-31970-0

Tel: (+81) (3) 6417-0300

www.atmel.com

Tel: (+852) 2245-6100

Fax: (+49) 89-3194621

Fax: (+81) (3) 6417-0370

Fax: (+852) 2722-1369

© 2013 Atmel Corporation. All rights reserved. / Rev.: 9321A–RFID–06/13 Atmel®, Atmel logo and combinations thereof, Enabling Unlimited Possibilities®, and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others. Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.

Suggest Documents