Advanced Card Systems ACR1222LD1 User Manual

0 (0)

ACR122L-USB-ACS

Design Specification

ACR1222L-D1

Revision History

ACR122L-USB-ACS

Version

Date

Prepared By

Description

V1.00

2010-6-24

Nathan.Li, Kit Au

Initial Release

V1.01

2011-1-20

Kit Au

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table of Contents

ACR122L-USB-ACS

 

 

 

 

Table of Contents ...............................................................................................................

 

3

1.0.

Introduction .............................................................................................................

 

5

2.0.

Feature.....................................................................................................................

 

5

3.0.

Hardware Interfaces................................................................................................

 

6

3.1.

 

USB Interface.........................................................................................................................

 

6

3.2.

 

LEDs

......................................................................................................................................

 

6

3.3.

 

Buzzer ....................................................................................................................................

 

6

3.4.

 

SAM Interface ........................................................................................................................

 

6

3.5.

 

LCD ........................................................................................................................................

 

 

6

3.6.

 

PICC Interface (Contactless Smart Card)..............................................................................

 

6

4.0.

Implementation .......................................................................................................

 

7

4.1.

 

The ACR122L-USB is built based on the ST221 and PN5321 chips. ...................................

7

4.2.

 

Communication between the Host and the Contactless interface, SAM and Peripherals.....

8

5.0.

Firmware Upgrade...................................................................................................

 

9

5.1.

 

With Press FW Key ................................................................................................................

 

9

5.2.

 

Without Press FW Key .........................................................................................................

 

11

6.0.

PICC Interface Description ...................................................................................

 

13

6.1.

 

ATR Generation ...................................................................................................................

 

13

6.2.

 

Pseudo APDUs for Contactless Interface ............................................................................

 

15

6.2.1.

 

Direct Transmit via ScardTransmit.............................................................................

 

15

6.2.2.

 

Direct Transmit via ScardControl ...............................................................................

 

16

6.3.

 

Pseudo APDU for Peripherals Control.................................................................................

 

16

6.3.1.

 

Pseudo APDU for LEDs and Buzzer Control .............................................................

 

16

6.3.2.

 

Pseudo APDU for LEDs Control Enable ....................................................................

 

23

6.3.3.

 

Pseudo APDU for LEDs Control ................................................................................

 

23

6.3.4.

 

Pseduo APDU for Buzzer Control ..............................................................................

 

24

6.3.5.

 

Pseudo APDU for Clear LCD .....................................................................................

 

25

6.3.6.

 

Pseudo APDU for LCD Display (ASCII Mode) ...........................................................

 

26

6.3.7.

 

Pseudo APDU for LCD Display (GB Mode) ...............................................................

 

27

6.3.8.

 

Pseudo APDU for LCD Display (Graphic Mode)........................................................

 

28

6.3.9.

 

Pseudo APDU for Scrolling LCD Current Display......................................................

 

29

6.3.10.

Pseudo APDU for Pause LCD Scrolling.....................................................................

 

31

6.3.11.

Pseudo APDU for Stop LCD Scrolling .......................................................................

 

31

6.3.12.

Pseudo APDU for LCD Contrast Control ...................................................................

 

31

6.3.13.

Pseudo APDU for LCD Backlight Control ..................................................................

 

32

6.4.

 

Escape APDU for Peripherals Control .................................................................................

 

33

6.4.1.

 

Escape APDU for LEDs and Buzzer Control .............................................................

 

33

6.4.2.

 

Escape APDU for LEDs Control Enable ....................................................................

 

38

6.4.3.

 

Escape APDU for LEDs Control.................................................................................

 

39

6.4.4.

 

Escape APDU for Buzzer Control ..............................................................................

 

40

 

 

 

 

ACR122L-USB-ACS

6.4.5.

 

Escape APDU for Store Data one at Reader .............................................................

 

40

6.4.6.

 

Escape APDU for Store Data two at Reader .............................................................

 

41

6.4.7.

 

Escape APDU for Read Data one from Reader.........................................................

 

41

6.4.8.

 

Escape APDU for Read Data two from Reader .........................................................

 

42

6.4.9.

 

Escape APDU for Clear LCD .....................................................................................

 

42

6.4.10.

Escape APDU for LCD Display (ASCII Mode) ...........................................................

 

43

6.4.11.

Escape APDU for LCD Display (GB Mode) ...............................................................

 

45

6.4.12.

Escape APDU for LCD Display (Graphic Mode) ........................................................

 

45

6.4.13.

Escape APDU for Scrolling LCD Current Display ......................................................

 

46

6.4.14.

Escape APDU for Pause LCD Scrolling.....................................................................

 

48

6.4.15.

Escape APDU for Stop LCD Scrolling........................................................................

 

48

6.4.16.

Escape APDU for LCD Contrast Control....................................................................

 

48

6.4.17.

Escape APDU for LCD Backlight Control...................................................................

 

49

6.5.

 

Escape APDU for getting the Firmware Version..................................................................

 

50

6.6.

 

PICC Commands for General Purposes..............................................................................

 

50

6.6.1.

 

1. Get Data .................................................................................................................

 

50

6.7.

 

PICC Commands (T=CL Emulation) for MIFare 1K/4K MEMORY Cards ...........................

51

6.7.1.

 

Load Authentication Keys ..........................................................................................

 

51

6.7.2.

 

Authentication for MIFARE 1K/4K..............................................................................

 

52

6.7.3.

 

Read Binary Blocks ....................................................................................................

 

56

6.7.4.

 

Update Binary Blocks .................................................................................................

 

57

6.7.5.

 

Value Block Related Commands ...............................................................................

 

58

7.0. Basic Program Flow for Contactless Applications .............................................

 

62

7.1.

 

How to access PCSC Compliant Tags (ISO14443-4)? .......................................................

 

63

7.2.

 

How to access DESFIRE Tags (ISO14443-4)? ...................................................................

 

66

7.3.

 

How to access FeliCa Tags (ISO18092)?............................................................................

 

68

7.4.

 

How to access NFC Forum Type 1 Tags (ISO18092)? E.g. Jewel and Topaz Tags ..........

69

8.0.

Basic Program Flow for SAM Applications ........................................................

 

72

8.1.

 

How to access ACOS3 SAM Cards (ISO7816)? .................................................................

 

73

9.0.

Mechanical Design................................................................................................

 

75

1.0. Introduction

The ACR122L-USB is a module for accessing both contact and contactless cards with LCD Display. It can support 3 SAMs access and ISO14443 Part1 - 4 Type A & B, MIFARE, FeliCa and NFC tags.

2.0. Feature

ISO 7816 Parts 1-4 Compliant for SAM Socket.

ISO 14443 Parts 1-4 Compliant for Contactless Smart Card Interface.

Support ISO14443 Part 4 Type A & B, MIFARE, FeliCa and NFC tags.

Built-in Antenna for contactless tags access.

3 X SAM Interface

4 LEDs.

Buzzer.

CCID Compliant for both SAM and PICC interface.

PCSC Compliant for Contact and Contactless Interfaces.

USB V2.0 Interface. (12M bps)

Device Firmware Upgradeable through the USB Interface.

ACR122L-USB-ACS

3.0.Hardware Interfaces

3.1.USB Interface

The ACR122L-USB is connected to computer through USB as specified in the USB Specification 2.0. ACR122L-USB is working in Full speed mode, i.e. 12 Mbps.

Pin

Signal

Function

1

VBUS

+5V power supply for the reader (~ 200mA)

2

D-

Differential signal transmits data between ACR122L-USB and PC.

3

D+

Differential signal transmits data between ACR122L-USB and PC.

4GND Reference voltage level for power supply

3.2.LEDs

4 x User-controllable single color LEDs

Can select control by firmware or by User

From Left to right, the color of the LED is: Green, Blue, Yellow and Red

3.3. Buzzer

User-controllable Mono-Tone buzzer.

The default Buzzer State is OFF

3.4. SAM Interface

3 x SAMs socket is provided.

Support ISO7816 Parts 1-3 T=0 ,T=1 cards

3.5. LCD

User-controllable LCD

User-controllable Yellow-Green Backlight

2 Line x 16 Character, 5 x 8 dot matrix, STN Yellow Green LCD Type

6 O’clock view angle

3.6. PICC Interface (Contactless Smart Card)

3 turns symmetric loop antenna. Center tapped.

The estimated size = 46mm x 64mm.

The loop inductance should be around ~ 1.6uH to 2.5uH

Operating Distance for different Tags ~ up to 50mm (depend on the Tag)

Only one Tag can be accessed at any one time.

ACR122L-USB-ACS

4.0.Implementation

4.1.The ACR122L-USB is built based on the ST221 and PN5321

chips.

 

Buzzer

 

LCD

 

 

 

 

 

 

 

 

&LED1

 

 

 

 

 

&LED2

 

 

 

 

 

&LED3

 

 

 

 

 

&LED4

 

 

USB2.0

 

 

 

 

 

USB

 

 

 

 

ST2211 U

 

PC

 

PN532

 

Host Controller

USB

 

 

Windows

 

 

 

 

 

Built -In

NFC Interface

SPI

 

Firmware

operating

Antenna

 

Upgrade

Chip

 

 

system

 

 

 

 

Contactless Interface

 

ISO7816 Interface

 

Carrier =13.56MHz

 

 

 

 

 

 

PICC

 

 

 

 

 

Contactless Card

 

 

Logic switch

 

 

 

 

 

 

 

SAM1 SAM2 SAM3

4.2.Communication between the Host and ACR122Lthe Contactless-USB-ACS interface, SAM and Peripherals.

The Contactless interface & Peripherals are accessed through the use of Pseduo-APDUs.

The SAM interface are accessed through the use of standard APDUs.

 

ACR122L-USB

ACR122L-USB

ACR122L-USB

ACR122L-USB

 

PCSC

PCSC SAM1

PCSC SAM2

PCSC SAM3

PCSC PICC

 

Driver

Interface

Interface

Interface

Interface

 

 

 

 

 

 

USB

 

 

 

 

 

Interface

 

 

 

 

 

(CCID)

 

 

 

PCSC Layer

 

 

ACR122L-USB

 

 

 

T=CL &T=1

 

 

 

ISO 7816 Part1-4

 

 

 

 

 

Emulation

Peripherals

 

 

+

 

 

 

 

 

 

 

 

T=0,T=1 SAM Interfaces

 

 

 

 

 

 

 

ISO 14443 Part1-4&

 

 

 

 

 

FeliCa

 

 

SAM1

SAM2

SAM3

PICC Interface

 

 

 

 

 

(Socket)

(Socket)

(Socket)

 

 

 

 

 

 

 

RF

 

 

 

 

 

Interface

PICC

(Built-In Antenna)

ACR122L-USB-ACS

5.0.Firmware Upgrade

5.1.With Press FW Key

Step 1: Unplug the USB Cable from the PC.

Step 2: Press and Hold the FW Key

Step3: Plug the USB Cable to the PC.

Step 4: The USB Mass Storage Device can be found in Device Manager, release the FW Key

Step 5: Execute the Firmware Upgrade Program:

FW Upgrade Tool.exe

Step 6: Pressing the “Load BIN” Button.

Select the “Firmware” file for Upload to the Reader

Advanced Card Systems ACR1222LD1 User Manual

Step 7: Pressing the “Start Program” Button.

ACR122L-USB-ACS

The firmware is being uploaded to the reader

The firmware upgrade is completed.

Step 8: Close the plastic covers. After that, reconnect the USB cord. Noted:

If the upgrade firmware “fail”, please repeat do from steps 3 to 7.

5.2. Without Press FW Key

ACR122L-USB-ACS

Step 1: Plug the USB Cable from the PC.

 

Step 2: Send EscapeCommand for Enter FW upgrade mode

 

Command = {E0 00 00 E0 00}.

 

Response = {E1 00 00 00 01 “Status”}

Step 3: The USB Mass Storage Device can be found in Device Manager, release the FW Key

Step 4: Execute the Firmware Upgrade Program:

FW Upgrade Tool.exe

Step 5: Pressing the “Load BIN” Button.

Select the “Firmware” file for Upload to the Reader

Step 6: Pressing the “Start Program” Button.

The firmware is being uploaded to the reader

The firmware upgrade is completed.

ACR122L-USB-ACS

Step 7: Close the plastic covers. After that, reconnect the USB cord.

Noted:

If the upgrade firmware “fails”, please using “5.1 With Press FW Key” Steps to do the upgrade

Pseudo APDUs for Contactless Interface and PeripheralsACR122LControl-USB-ACS

6.0.PICC Interface Description

6.1.ATR Generation

If the reader detects a PICC, an ATR will be sent to the PCSC driver for identifying the PICC.

1.1 ATR format for ISO 14443 Part 3 PICCs.

Byte

Value

Designation

Description

 

(Hex)

 

 

0

3B

Initial Header

 

1

8N

T0

Higher nibble 8 means: no TA1, TB1, TC1 only

 

 

 

TD1 is following.

 

 

 

Lower nibble N is the number of historical bytes

 

 

 

(HistByte 0 to HistByte N-1)

2

80

TD1

Higher nibble 8 means: no TA2, TB2, TC2 only

 

 

 

TD2 is following.

 

 

 

Lower nibble 0 means T = 0

3

01

TD2

Higher nibble 0 means no TA3, TB3, TC3, TD3

 

 

 

following.

 

 

 

Lower nibble 1 means T = 1

 

80

T1

Category indicator byte, 80 means A status

4

 

 

indicator may be present in an optional

 

 

COMPACT-TLV data object

 

 

 

 

4F

Tk

Application identifier Presence Indicator

To

0C

 

Length

 

 

 

RID

 

Registered Application Provider Identifier (RID) #

3+N

 

 

A0 00 00 03 06

 

SS

 

Byte for standard

 

C0 .. C1

 

Bytes for card name

 

00 00 00 00

RFU

RFU # 00 00 00 00

4+N

UU

TCK

Exclusive-oring of all the bytes T0 to Tk

e.g. ATR for MIFare 1K = {3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A}

Length (YY) = 0x0C

RID = {A0 00 00 03 06} (PC/SC Workgroup)

Standard (SS) = 03 (ISO14443A, Part 3)

Card Name (C0 .. C1) = {00 01} (MIFare 1K)

ACR122L-USB-ACS

Card Name (C0 .. C1)

00 01: Mifare 1K

00 02: Mifare 4K

00 03: Mifare Ultralight

00 26: Mifare Mini

F0 04: Topaz and Jewel

F0 11: FeliCa 212K

F0 12: FeliCa 424K

FF [SAK]: undefined tags

1.2 ATR format for ISO 14443 Part 4 PICCs.

Byte

Value

Designation

Description

 

(Hex)

 

 

0

3B

Initial Header

 

1

8N

T0

Higher nibble 8 means: no TA1, TB1, TC1 only

 

 

 

TD1 is following.

 

 

 

Lower nibble N is the number of historical bytes

 

 

 

(HistByte 0 to HistByte N-1)

2

80

TD1

Higher nibble 8 means: no TA2, TB2, TC2 only

 

 

 

TD2 is following.

 

 

 

Lower nibble 0 means T = 0

3

01

TD2

Higher nibble 0 means no TA3, TB3, TC3, TD3

 

 

 

following.

 

 

 

Lower nibble 1 means T = 1

4

XX

T1

Historical Bytes:

to

XX

Tk

 

3 + N

XX

 

ISO14443A:

 

XX

 

The historical bytes from ATS response. Refer to

 

 

 

 

 

the ISO14443-4 specification.

 

 

 

ISO14443B:

 

 

 

 

 

 

The higher layer response from the ATTRIB

 

 

 

response (ATQB). Refer to the ISO14443-3

 

 

 

specification.

 

 

 

 

4+N

UU

TCK

Exclusive-oring of all the bytes T0 to Tk

E.g 1. ATR for DESFire = { 3B 81 80 01 80 80 } // 6 bytes of ATR

ACR122L-USB-ACS

Hint: Use the APDU “FF CA 01 00 00” to distinguish the ISO14443A-4 and ISO14443B-4 PICCs, and retrieve the full ATS if available. ISO14443A-3 or ISO14443B-3/4 PICCs do have ATS returned.

APDU Command = FF CA 01 00 00

APDU Response = 06 75 77 81 02 80 90 00

ATS = {06 75 77 81 02 80}

E.g 2. ATR for ST19XRC8E = { 3B 8C 80 01 50 12 23 45 56 12 53 54 4E 33 81 C3 55} // 12 bytes of ATQB, No CRC-B

ATQB = {50 12 23 45 56 12 53 54 4E 33 81 C3}

6.2. Pseudo APDUs for Contactless Interface

ACR128MiniU comes with two primitive commands for this purpose. <Class 0xFF>

6.2.1.Direct Transmit via ScardTransmit

To send a Pseudo APDU (PN532 and TAG Commands), and the Response Data will be returned.

Table 1.0A: Direct Transmit Command Format (Length of the PN532_TAG Command + 5 Bytes)

Command

Class

INS

P1

P2

Lc

Data In

 

 

 

 

 

 

 

Direct

0xFF

0x00

0x00

0x00

Number

PN532_TAG

Transmit

 

 

 

 

of Bytes

Command

 

 

 

 

 

to send

 

Lc: Number of Bytes to Send (1 Byte)

Maximum 255 bytes.

Data In: PN532_TAG Command

The data to be sent to the PN532 and Tag.

Table 1.0B: Direct Transmit Response Format (Response Length + 2 Bytes)

Response

 

Data Out

 

 

 

 

Result

PN532_TAG

 

SW1 SW2

 

Response

 

 

 

 

 

 

Data Out: PN532_TAG Response

PN532_TAG Response returned by the reader.

Data Out: SW1 SW2

Status Code returned by the reader.

Table 1.0C: Status Code

ACR122L-USB-ACS

Results

SW1

SW2

Meaning

 

 

 

 

Success

90

00

The operation is completed successfully.

Error

63

00

The operation is failed.

 

 

 

 

Checksum Error

63

27

The checksum of the Response is

 

 

 

wrong.

6.2.2.Direct Transmit via ScardControl

Command = {E0 00 00 24 XX “PN532_TAG Command”}

Response = {E1 00 00 00 YY “PN532_TAG Response”}

XX = Length of the “PN532_TAG Command”

YY= Length of the “PN532_TAG Response”

6.3. Pseudo APDU for Peripherals Control

6.3.1.Pseudo APDU for LEDs and Buzzer Control

This APDU is used to control the states of the LED_0, LED_1 and Buzzer.

Table 2.0A: LED_0, LED_1 and Buzzer Control Command Format (9 Bytes)

Command

 

Class

INS

P1

 

 

 

P2

 

 

Lc

 

Data In

 

 

 

 

 

 

 

 

 

 

 

 

 

(4 Bytes)

LEDs and

 

0xFF

0x00

0x40

 

 

LED

 

0x04

 

Blinking Duration Control

Buzzer

 

 

 

 

 

 

State

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LED Control

 

 

 

 

 

 

Control

 

 

 

 

 

 

P2: LED State Control

 

 

 

 

 

 

 

 

 

 

 

 

Table 2.0B: LED_0, LED_1 and Buzzer Control Format (1 Byte)

 

 

 

CMD

 

 

 

Item

 

 

 

 

 

 

 

Description

 

Bit 0

 

 

Final LED_1

State

 

 

 

 

1 = On; 0 = Off

 

Bit 1

 

 

Final LED_0

State

 

 

 

 

1 = On; 0 = Off

 

Bit 2

 

 

LED_1 State Mask

 

 

 

1

= Update the State

 

 

 

 

 

 

 

 

 

 

 

 

 

0 = No change

 

Bit 3

 

 

LED_0 State Mask

 

 

 

1

= Update the State

 

 

 

 

 

 

0 = No ACR122Lchange

-USB-ACS

 

 

 

 

 

 

 

 

 

 

Bit 4

 

Initial LED_1 Blinking State

1 = On; 0 = Off

 

 

 

Bit 5

 

Initial LED_0 Blinking State

1 = On; 0 = Off

 

 

 

Bit 6

 

LED_1 Blinking Mask

1 = Blink

 

 

 

 

 

 

 

 

0 = Not Blink

 

 

 

Bit 7

 

LED_0 Blinking Mask

1 = Blink

 

 

 

 

 

 

 

 

0 = Not Blink

 

 

 

Data In: Blinking Duration Control

 

 

 

 

 

Table 2.0C: LED_0, LED_1 Blinking Duration Control Format (4 Bytes)

 

 

 

Byte 0

 

Byte 1

 

Byte 2

 

 

Byte 3

 

T1 Duration

 

T2 Duration

 

Number of

 

Link to Buzzer

 

Initial Blinking State

 

Toggle Blinking State

 

repetition

 

 

 

 

 

 

 

 

 

 

 

(Unit = 100ms)

 

(Unit = 100ms)

 

 

 

 

 

 

Byte 3: Link to Buzzer. Control the buzzer state during the LED Blinking.

0x00: The buzzer will not turn on

0x01: The buzzer will turn on during the T1 Duration 0x02: The buzzer will turn on during the T2 Duration

0x03: The buzzer will turn on during the T1 and T2 Duration.

Data Out: SW1 SW2. Status Code returned by the reader.

Table 2.0D: Status Code

Results

SW1

SW2

Meaning

 

 

 

 

Success

90

Current LED State

The operation is completed successfully.

Error

63

00

The operation is failed.

 

 

 

 

Table 3.0E: Current LED State (1 Byte)

Status

Item

Description

Bit 0

Current LED_1 LED

1 = On; 0 = Off

Bit 1

Current LED_0 LED

1 = On; 0 = Off

Bits 2 – 7

Reserved

 

 

 

 

ACR122L-USB-ACS

Remark:

1.The LED State operation will be performed after the LED Blinking operation is completed.

2.The LED will not be changed if the corresponding LED Mask is not enabled.

3.The LED will not be blinking if the corresponding LED Blinking Mask is not enabled. Also, the number of repetition must be greater than zero.

4.T1 and T2 duration parameters are used for controlling the duty cycle of LED blinking and Buzzer Turn-On duration.

For example, if T1=1 and T2=1, the duty cycle = 50%. #Duty Cycle = T1 / (T1 + T2).

5.To control the buzzer only, just set the P2 “LED State Control” to zero.

6.The make the buzzer operating, the “number of repetition” must greater than zero.

7.To control the LED only, just set the parameter “Link to Buzzer” to zero.

Example 1: To read the existing LED State.

//Assume both LED_0 and LED_1 are OFF initially //

//Not link to the buzzer //

APDU = “FF 00 40 00 04 00 00 00 00”

Response = “90 00”. LED_0 and LED_1 LEDs are OFF.

Example 2: To turn on LED_0 and LED_1

//Assume both LED_0 and LED_1 are OFF initially //

//Not link to the buzzer //

APDU = “FF 00 40 0F 04 00 00 00 00” Response = “90 03”. LED_0 and LED_1 are ON,

ACR122L-USB-ACS

#To turn off both LED_0 and LED_1, APDU = “FF 00 40 0C 04 00 00 00 00”

Example 3: To turn off the LED_1 only, and left the LED_0 unchanged.

//Assume both LED_0 and LED_1 are ON initially //

//Not link to the buzzer //

APDU = “FF 00 40 04 04 00 00 00 00”

Response = “90 02”. LED_0 is not changed (ON); LED_1 is OFF,

LED_1 On

LED_1 Off

LED_0 On

LED_0 Off

ACR122L-USB-ACS

Example 4: To turn on the LED_1 for 2 sec. After that, resume to the initial state

//Assume the LED_1 is initially OFF, while the LED_0 is initially ON. //

//The LED_1 and buzzer will turn on during the T1 duration, while the LED_0 will turn off during the T1 duration. //

LED_1 On

T2 = 0ms

T1 = 2000ms

LED_1 Off

LED_0 On

LED_0 Off

Buzzer On

Buzzer Off

1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF T1 Duration = 2000ms = 0x14

T2 Duration = 0ms = 0x00

Number of repetition = 0x01

Link to Buzzer = 0x01

APDU = “FF 00 40 50 04 14 00 01 01”

Response = “90 02”

Example 5: To blink the LED_1 of 1Hz for 3 times. After that, resume to initial state

//Assume the LED_1 is initially OFF, while the LED_0 is initially ON. //

//The Initial LED_1 Blinking State is ON. Only the LED_1 will be blinking.

//The buzzer will turn on during the T1 duration, while the LED_0 will turn off during both the T1 and T2 duration.

//After the blinking, the LED_0 will turn ON. The LED_1 will resume to the initial state after the blinking //

LED_1 On

LED_1 Off

LED_0 On

T1 = 500ms T2 = 500ms

LED_0 Off

Buzzer On

Buzzer Off

ACR122L-USB-ACS

1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF T1 Duration = 500ms = 0x05

T2 Duration = 500ms = 0x05

Number of repetition = 0x03

Link to Buzzer = 0x01

APDU = “FF 00 40 50 04 05 05 03 01”

Response = “90 02”

Example 6: To blink the LED_1 and LED_0 of 1Hz for 3 times

//Assume both the LED_0 and LED_1 are initially OFF. //

//Both Initial LED_0 and LED_1 Blinking States are ON //

//The buzzer will turn on during both the T1 and T2 duration//

 

 

 

 

 

 

 

 

 

 

 

 

 

LED_1 On

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LED_1 Off

 

 

T1

= T2

=

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

500ms

 

500ms

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LED_0 On

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LED_0 Off

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Buzzer On

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Buzzer Off

 

 

 

 

 

 

 

 

 

 

 

 

 

1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF T1 Duration = 500ms = 0x05

T2 Duration = 500ms = 0x05

Number of repetition = 0x03

Link to Buzzer = 0x03

APDU = “FF 00 40 F0 04 05 05 03 03”

Response = “90 00”

Example 7: To blink the LED_1 and LED_0 in turn of 1Hz for 3 times

//Assume both LED_0 and LED_1 LEDs are initially OFF. //

//The Initial LED_1 Blinking State is ON; The Initial LED_0 Blinking States is OFF //

// The buzzer will turn on during the T1 duration//

ACR122L-USB-ACS

LED_1 On

LED_1 Off

T1

= T2

=

500ms

500ms

 

LED_0 On

LED_0 Off

Buzzer On

Buzzer Off

1Hz = 1000ms Time Interval = 500ms ON + 500 ms OFF T1 Duration = 500ms = 0x05

T2 Duration = 500ms = 0x05

Number of repetition = 0x03

Link to Buzzer = 0x01

APDU = “FF 00 40 D0 04 05 05 03 01”

Response = “90 00”

6.3.2.Pseudo APDU for LEDs Control Enable

ACR122L-USB-ACS

This APDU is used to set the LEDs Control Enable/ Disable by user.

Default “Disable”, the LED perform by the firmware

Table 3.0A: Clear LCD Command Format (5 Bytes)

Command

 

Class

INS

 

P1

 

 

P2

Lc

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LED Control

 

0xFF

0x00

 

0x43

 

bLEDCtrl

0x00

 

P2: bLEDCtrl (1 Byte)

 

 

 

 

 

 

 

 

 

 

CMD

 

 

Description

 

 

 

 

 

0x00

 

Disable LEDs Control by user

 

 

 

 

 

0xFF

 

Enable LEDs Control by user

 

 

 

 

 

Data Out: SW1 SW2.

 

 

 

 

 

 

 

 

 

 

Table 3.0B: Status Code

 

 

 

 

 

 

 

 

 

 

Results

 

SW1

 

 

 

SW2

 

 

 

Meaning

 

 

 

 

 

 

 

 

 

 

Success

 

90

 

 

00

 

 

 

The operation is completed successfully.

Error

 

63

 

 

00

 

 

 

The operation is failed.

 

 

 

 

 

 

 

 

 

 

 

 

 

6.3.3.Pseudo APDU for LEDs Control

This APDU is used to control 4 LEDs

Table 4.0A: Clear LCD Command Format (5 Bytes)

Command

 

Class

INS

 

P1

 

P2

Lc

 

 

 

 

 

 

 

 

 

 

 

 

LED Control

 

0xFF

0x00

 

0x41

 

bLEDsState

0x00

 

P2: bLEDsState

 

 

 

 

 

 

 

 

 

LED_0, LED_1, LED_2 and LED_3 Control Format (1 Byte)

 

 

CMD

 

 

 

Item

 

 

Description

Bit 0

 

LED_0 State

 

 

1 = On; 0 = Off

Bit 1

 

LED_1 State

 

 

1 = On; 0 = Off

Bit 2

 

LED_2 State

 

 

1 = On; 0 = Off

Bit 3

 

LED_3 State

 

 

1 = On; 0 = Off

Bits 4 – 7

 

 

Reserved

 

 

 

 

ACR122L-USB-ACS

Data Out: SW1 SW2.

Table 4.0B: Status Code

Results

SW1

SW2

Meaning

 

 

 

 

Success

90

00

The operation is completed successfully.

Error

63

00

The operation is failed.

 

 

 

 

6.3.4.Pseduo APDU for Buzzer Control

This APDU is used to control Buzzer

Table 5.0A: Buzzer Control Command Format (5 Bytes)

Command

Class

INS

P1

P2

Lc

Data In

 

 

 

 

 

 

(3 Bytes)

Buzzzer Control

0xFF

0x00

0x42

0x00

0x03

Buzzer Control

Data In: Buzzer Control

Table 5.0B: Buzzer On/Off Duration Control Format (4 Bytes)

 

Byte 0

 

 

 

Byte 1

 

 

Byte 2

 

 

 

T1 Duration

 

 

 

T2 Duration

 

 

Number of

 

 

 

On State

 

 

 

Off State

 

 

repetition

 

 

 

 

 

 

 

 

 

 

 

(Unit = 100ms)

 

 

 

(Unit = 100ms)

 

 

 

 

 

 

Data Out: SW1 SW2.

 

 

 

 

 

 

 

 

 

Table 5.0C: Status Code

 

 

 

 

 

 

 

 

 

Results

 

SW1

 

 

SW2

 

 

Meaning

 

 

 

 

 

 

 

 

 

 

Success

 

90

 

00

 

The operation is completed successfully.

 

Error

 

63

 

00

 

The operation is failed.

 

 

 

 

 

 

 

 

 

 

 

 

Loading...
+ 53 hidden pages