Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
usart_iso7816 USART ISO7816 Example
\par Purpose
This example sends ISO7816 commands to a smartcard connected to the
evaluation kits on SAM.

\par Requirements
This example can be used on SAM evaluation kit. Please connect the
smartcard contacts with following pins which could be easily wired from
the board. 
SAM3N-EK, SAM3U-EK, SAM3X-EK and SAM4N-Xplained-Pro use USART0 TXD0 and SCK0, 
SAM3S-EK, SAM3S-EK2, SAM4S-EK and SAM4E-EK use USART1 TXD1 and SCK1.
SAM4C-EK uses USART2 TXD2 and SCK2.
- <b>SAM-EK -- SMARTCARD</b>
 - PA15     --    RST
 - TXD*     --    I/O
 - SCK*     --    CLK
 - VCC      --    VCC
 - GND      --    GND

\par Description
The iso7816 software provide in this examples is use to transform APDU
commands to TPDU commands for the smart card.
The iso7816 provide here is for the protocol T=0 only.
The send and the receive of a character is made under polling.
User must change these pins according to his environment.

The driver is compliant with CASE 1, 2, 3 of the ISO7816-4 specification.

\par Usage
-# Build the program and download it inside the evaluation board.
-# On the computer, open and configure a terminal application (e.g.
   HyperTerminal on Microsoft Windows) with these settings:
      - 115200 bauds
      - 8 data bits
      - No parity
      - 1 stop bit
      - No flow control
-# Connect the card reader to SAM EK board as described before:
-# Start the application. The following traces shall appear on the terminal:
-- USART ISO7816 Example --
-- xxxxxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --