Maxim Integrated DS8005 Скачать руководство пользователя страница 21

The example application performs transactions involving two ACOS3 smart cards (a SAM and SIM card), and
demonstrates the DS8005’s ability to communicate with two cards in a mutually exclusive fashion. The
application simulates a situation where a SIM card remains in place once inserted, while it waits for a SAM
card to be inserted.

Initially, the application waits until either pushbutton SW4 is pressed (for communication with the SIM card) or
a SAM card is inserted into the smart-card socket. The first time SW4 is pressed, the application will power up
the card and issue an Answer to Reset (ATR) to the SIM card. If this is successful, the application will perform
basic credit and debit transactions, along with a smart card initialization function based on user input from the
pushbuttons. When a SAM card is inserted, the application halts communication with the SIM card (but retains
power to the card) and performs an ATR on the SAM card. Again, if the ATR is successful, it performs basic
credit and debit transactions and a smart-card initialization function until the SAM card is removed. Once the
SAM card is removed, the application goes back to waiting until either SW4 is pressed or another SAM card is
inserted. If SW4 is not pressed for the first time (i.e., the application has already performed an ATR on the
SIM card), it will assume the SIM card is still present and resume communication with it, bypassing the ATR
step as it is only necessary at card power-up. If the SIM card is removed after it has already been properly
powered up, the next time the application tries to communicate with it, an error will occur, and it will power
down the SIM card and return to waiting for SW4 or SAM card insertion. Now, if SW4 is pressed, and the SIM
card is properly inserted back into the SIM card socket, the application will power-up the SIM card and issue
another ATR.

The LCD screen acts as the main user interface, providing instructions on how to proceed and perform basic
functions on the two smart cards, while the serial port gives additional information as to what is going on
behind the scenes.

The three LEDs act as visual indicators of what is going on in the application as well. The green LED indicates
that the application is running. The orange (top) LED indicates that the application is currently communicating
with the inserted SAM card. The red (middle) LED indicates that the application is currently communicating
with the SIM card.

Smart Card Transactions

The smart card reader (

MAXQ622

) properly manages the sending and receiving of application protocol data

units (APDUs), as defined in the EMV specifications, to the ACOS3 smart cards supplied in the DS8005-KIT.
This is used to demonstrate typical payment transactions. The four transactions implemented in the example
code are:

1.  A debit transaction, where $10 is deducted from the card’s balance

2.  A credit transaction, where $10 is added to the card’s balance

3.  A card-initialization transaction, where the card’s balance and transaction count are set to $100 and 0,

respectively

4.  A check-balance transaction, where the card’s balance and transaction count are read from the card

EMV is a registered certification mark owned by EMVCo, LLC. (See 

EMVCo Disclaimer

.)

IAR Embedded Workbench is a registered trademark of IAR Systems AB.
Windows is a registered trademark and registered service mark of Microsoft Corporation.
Windows Vista is a registered trademark and registered service mark of Microsoft Corporation.
Windows XP is a registered trademark and registered service mark of Microsoft Corporation.

Page 21 of 22

Содержание DS8005

Страница 1: ...red on either card interface The DS8005 is designed to be used with microcontrollers that contain an ISO 7816 UART or have the bandwidth to run this protocol in software by bit banging IO ports In the...

Страница 2: ...Figure 1 The DS8005 evaluation kit Page 2 of 22...

Страница 3: ...to the DS8005 allows for current testing Closed 3 3V is supplied to the DS8005 JU5 Open Breaks the smart card interface power supply connection VDDA See JU3 setting Closed Closes the smart card inter...

Страница 4: ...run this executable navigate to the install FTDI_Drivers directory of the CD and run the executable CDM20814_Setup exe Once this setup executable has been run you will be able to connect the USB to J...

Страница 5: ...DI Drivers If you have connected a large number of different FTDI based USB to serial adapter devices to your system or if you simply have many USB to serial based devices installed you may find that...

Страница 6: ...AG adapter there is an optional change you can make to the FTDI driver settings Generally this setting s change should improve the overall communications speed of the USB to JTAG interface which is us...

Страница 7: ...ar instance of the FTDI driver installation Installing and Using the Microcontroller Tool Kit MTK The CD provides a sample transaction application The binary hex file DS8005_EK hex is located under th...

Страница 8: ...it directly in the Port field and click Ok Figure 6 Configuring the serial port to load code in MTK2 Now connect the USB to serial adapter to the DS8005 evaluation kit board with the provided 10 pin...

Страница 9: ...select File Load Code and locate and open the DS8005_EK hex file This will take several seconds as the code size is relatively large Once MTK is done it will output a message showing that the load com...

Страница 10: ...t edition s 4kB limit IAR provides documentation on how to install the compiler and how to use the tools This section describes how to compile run and debug the example code with IAR assuming IAR is a...

Страница 11: ...Figure 10 Opening an existing workspace on IAR startup Page 11 of 22...

Страница 12: ...code workspace in IAR All the project options should be correctly set However the COM port will need to be changed to match the VCP of the USB to serial adapter Right click on the project and select...

Страница 13: ...ns in IAR In the Options dialog box select the Debugger tab Figure 13 Select JTAG from the Driver drop down menu Now select the JTAG subtab just below the Debugger tab Figure 14 Change the COM port ac...

Страница 14: ...Figure 13 Selecting the JTAG driver in IAR Page 14 of 22...

Страница 15: ...code is being loaded onto the MAXQ622 Once done the window will disappear and a green arrow will point to the start of code since IAR automatically sets a break point at the start of main To debug the...

Страница 16: ...er to avoid problems while trying to connect to the device Start CrossStudio for MAXQ 2 1 and select File Open from the menu Locate and open the example code s project file DS8005_EK hzp Figure 16 Fig...

Страница 17: ...ow to view the targets and target properties These windows will appear on the right Inside the Targets window select Maxim Serial JTAG Adapter Figure 18 The target s properties will appear in the Prop...

Страница 18: ...e window will confirm the connection and a status indicator at the bottom right of the window will show a yellow circle and Maxim Serial JTAG adapter Figure 21 Figure 20 Connecting to the Serial JTAG...

Страница 19: ...on the far right corner of the main toolbar Figure 22b a b Figure 22 Shortcut buttons for debugging in Rowley The top shows the buttons available in the Disassembly window The bottom shows the button...

Страница 20: ...5200 for the Speed setting This is the baud rate used in the example code Figure 24 Configuring the serial port for terminal emulation in MTK2 Lastly select Target Open COMx at 115200 baud from the me...

Страница 21: ...4 or SAM card insertion Now if SW4 is pressed and the SIM card is properly inserted back into the SIM card socket the application will power up the SIM card and issue another ATR The LCD screen acts a...

Страница 22: ...hnical Support http www maximintegrated com support For Samples http www maximintegrated com samples Other Questions and Comments http www maximintegrated com contact Application Note 5388 http www ma...

Отзывы: