Maxim Integrated DS8005 User Manual

Maxim > Design Support > Technical Documents > Application Notes > Interface Circuits > APP 5388
Page 1 of 22
Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 5388
Keywords: uC, evaluation kit, AFE, smart card, microcontroller, Rowley, IAR embedded workbench
APPLICATION NOTE 5388
Getting Started with the DS8005 Evaluation Kit
Apr 01, 2013
Abstract: microcontroller to interface with the DS8005 dual smart card interface. This is demonstrated in both IAR Embedded Workbench and the Rowley CrossWorks IDE, using sample code provided with the kit.
This application
Introduction
The DS8005 dual smart card interface is a low -cost, dual analog front -end (AFE) for an IC card reader interface that needs to communicate with two smart cards in a mutually exclusive fashion. The analog interface
is designed for use in ISO 7816, EMV applications where the C4/C8 (AUX1/AUX2) contacts are not required 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 DS8005 evaluation kit (DS8005-KIT), the DS8005 is provided in a 28 -pin SOIC package. A smaller 28 ­pin TSSOP package is also available.
®
, and B - CAS applications. Additionally, the device is designed for
Setting Up the DS8005 Evaluation Kit
A photo of the DS8005 evaluation kit board is provided in Figure 1. The following hardware components are contained in the evaluation kit and are used for implementing and verifying the demonstrated program:
1. DS8005 evaluation kit board
2. On-board MAXQ622 microcontroller for developing smart card applications
3. USB- to-JTAG dongle for programming the MAXQ622
4. One ACOS3 smart card
5. Two card sockets (one smart card and one SIM/SAM card)
6. 2-line liquid -crystal display (LCD) screen for the user interface
7. Level-shifted RS-232 interface for debugging and the user interface
8. Pushbuttons for reset and user input
9. Regulated power supply (5V, ±5%, 300mA, center positive)
Table 1 shows all the jumpers and includes a description of what each setting does. Settings highlighted in blue indicate the default settings. See Figure 2 for jumper locations.
Figure 1. The DS8005 evaluation kit.
Page 2 of 22
Table 1. Jumper Settings for the DS8005 Evaluation Kit (JU1–JU7)
Page 3 of 22
Jumper Setting Description
JU1
JU2
JU3
JU4
JU5
JU6
Open
Closed
Closed (V50)
Closed (VBUS)
Closed (V33)
Closed (V50)
JTAG dongle is able to supply power to the board; an external power source (i.e., power jack) is needed to program the MAXQ622.
JTAG dongle supplies power to the board and no external power source (i.e., power jack) is needed.
Ties the 5.0V supply directly to the VBUS pin on the MAXQ622
Ties VBUS to the VBUS pin on the MAXQ622
3.3V is supplied to the smart card interface supply (VDDA).
5.0V is supplied to the smart card interface supply (VDDA).
Open Disconnects power to the DS8005; allows for current testing
Closed 3.3V is supplied to the DS8005.
Open
Closed
Open
Closed
Breaks the smart card interface power supply connection (VDDA). See JU3 setting.
Closes the smart card interface power supply connection (VDDA). See JU3 setting.
The interface A card presence indicator (SIM/SAM card) is pulled up to 3.3V. This pin is active high.
The interface A card presence indicator (SIM/SAM card) is connected to ground. This pin is active high.
JU7
Open
Closed
The MAXQ622 is not able to supply a clock signal to the DS8005; an external clock is needed in socket XY1.
Either the MAXQ622 or external clock can supply a clock signal to the DS8005. If the MAXQ622 is used, pin 6 of port 0 (TBB0) needs to be used to provide the clock signal. Otherwise, an external clock is needed in socket XY1.
Figure 2. The location of all the jumpers on the DS8005 evaluation kit.
www.ftdichip.com/Support/Documents/InstallGuides.htm
Page 4 of 22
Setting Up the FTDI Drivers
The USB-to-JTAG dongle is designed to connect to the host PC over a USB interface, which allows software running on the host (such as a program loading utility or application debugger) to communicate with the JTAG loader/debug interface on the MAXQ622 microcontroller. It uses the FTDI USB- to - serial IC to communicate with the USB interface on the PC. Before the FTDI interface can be used, the proper drivers must first be installed.
Note: The most up -to-date versions of all FTDI drivers and utilities can always be downloaded directly from FTDI's website at: www.ftdichip.com. The DS8005 evaluation kit CD contains the latest versions of these utilities and drivers at the time the CD was last updated.
Installing FTDI Drivers for the FT232RL
All required drivers for the FTDI USB- to-serial IC can be installed by running the FTDI driver setup executable. To 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 - JTAG dongle to the PC using the USB interface cable.
When the USB cable is connected with USB- to-JTAG dongle, you will see notices in the Windows notification area that new hardware has been found, followed by a notice that the hardware installed correctly.
If you have difficulty installing the FTDI drivers correctly using the driver setup executable provided on the DS8005 evaluation kit CD, you can download and unpack the standard driver package, available on FTDI's website at www.ftdichip.com/Drivers/VCP.htm. The driver package can be downloaded from this page and will be named similar to “CDM20814_WHQL_Certified.zip”, where the five- digit number depends on the exact version of the driver that is currently available.
There are detailed instructions for installing the drivers provided by FTDI for Windows XP and Windows
®
7; these are available in application note form:
®
, Windows Vista®,
See also www.ftdichip.com/Support/Documents/AppNotes.htm for additional information from FTDI.
the following step: After running the CDM Uninstaller, but before running the CDM20814_Setup.exe
Page 5 of 22
Determining the COM Port Location of the USB-to-Serial Interface
The USB-to-serial interface provided by the FT232RL chip on the USB- to-JTAG dongle uses the virtual COM port (VCP) device model on Windows. This means that the USB-to-serial bridge appears as a standard COM port and can be used by any Windows application that has the ability to communicate over a COM port.
®
However, for an application (such as MAX-IDE or IAR Embedded Workbench the application must be configured by the user to use the correct COM port that has been assigned to the USB- to-serial interface. This COM port number may vary depending on previous devices that have been used and previous USB -to-serial drivers that have been installed.
To determine the current COM port number that has been assigned to the VCP, open the Device Manager utility in Windows.
) to communicate with the VCP,
Opening Device Manager in Windows 7
Method 1: Click the Windows Start menu, followed by Control Panel. Next, click System and Security, followed by Device Manager .
Method 2: Click the Windows Start menu. In the search box, type “devmgmt.msc”, and hit Enter. In the Device Manager window, open the section of the tree display labeled Ports (COM & LPT) . You will see
a listing for USB Serial Port (COMX), where X is the number of the COM port that has been assigned.
Removing and Reinstalling the FTDI 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 the VCP assigned to the USB- to-JTAG dongle has a very high COM port number (such as COM23). Some tools (such as the IAR Embedded Workbench) may have difficulty working properly if the VCP number you are using is too high.
FTDI provides a graphical utility that can be used to remove all installations of the FTDI driver set automatically. This should allow future installations of the FTDI driver to start at a more reasonable VCP number (usually COM3, depending on the configuration of your system).
The FTDI uninstallation utility is located in the install/FTDI_Uninstall directory on the CD. In this directory, run the CDMuninstallerGUI.exe program. Note: Before proceeding, disconnect all USB-to-serial devices from your PC.
In the CDM Uninstaller window, the Vendor ID field should read 0403, and the Product ID field should read
6001. Click Add, and these values will be copied into the center window. At this point, you can click the Remove Devices button, and the utility will uninstall all instances of the FTDI driver set.
After running the CDM Uninstaller tool, you will have to reinstall the FTDI driver set by rerunning the CDM20814_Setup.exe executable in the install/FTDI_Drivers directory, as described above.
If you have difficulty getting the drivers to reinstall correctly after running the CDM Uninstaller tool, try adding
executable, check the DRVSTORE directory, usually found in the Windows directory under the System32
subdirectory. If you see directories named ftdibus_<xxxxx> or ftdiport_<xxxxx>, where <xxxxx> is a random-
Page 6 of 22
appearing string of hex digits, delete these directories before running the CDM20814_Setup.exe executable. This will remove the preinstalled copies of the drivers and allow the drivers to reinstall cleanly.
Configuring the FTDI Driver Settings
After installing the FTDI drivers and connecting the USB- to-JTAG 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 used to load and debug code on the MAXQ622.
To make this change, open Device Manager as described above. Find the entry USB Serial Port (COMx), which represents the VCP for the USB - to -JTAG dongle you have connected. Double-click on this entry, or right-click it and select Properties from the pop-up menu ( Figure 3).
Figure 3. VCP driver Properties window.
In the Properties window, select the Port Settings tab, and click Advanced. This will display a secondary dialog box with advanced settings (Figure 4).
Figure 4. Advanced settings for the VCP driver.
Page 7 of 22
In this dialog box, find the Latency Timer field shown above in the BM Options section. Change this field from its existing value (likely 16 or something similar) to 1 (which is the lowest possible value). Click OK, and then click OK again in the previous Properties window to complete the change.
Note that this is a change specific to one instance of the VCP, not a global settings change. If you uninstall and reinstall drivers, you must make this change again the first time a new kit board is connected. However, the change is made, it will be retained even if the kit is disconnected and reconnected; the setting stays with a particular 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 the QuickStart_Demo folder. To load the code directly with a .hex file, the Maxim- provided Microcontroller Tool Kit 2 (MTK2) utility can be used. It is included in the CD, but can also be downloaded for free under “Loader Software.” Additionally, MTK2 can act as a terminal emulator, which can be used to view the example code’s data output through the RS -232 connector.
To install MTK2, run MTK2_Install_2.4.14.exe, which can be found in the install/MTK folder on the install CD, or on Maxim’s website.
After installing MTK2, run it from the Start menu. In the initial Select device dialog box, select the MaxQ option and click OK to communicate with the MAXQ622 loader (Figure 5 ).
Loading...
+ 15 hidden pages