beautypg.com

E 30) – Maxim Integrated 73S12xxF Software User Manual

Page 30

background image

73S12xxF Software User Guide

UG_12xxF_016

30

Rev. 1.50

Year: Input parameter
Current year unit, e.g. 2005.

TicInterval: Input parameter
Tic interval as HALF_SEC, ONE_SEC or TWO_SEC, defined in RTC_INTERVAL.

IntInterval: Input parameter
Interrupt interval as defined in RTC_INTERVAL.

Return Codes TRUE if success. FALSE if TicInterval or Interrupt Interval value is invalid.

4.2.5 Smart Card Interface Driver API – Available with all 73S12xxF Devices

The Smart Card Interface Driver API manages all the Smart Card interfaces. Each of the smart card slots
can be individually activated, deactivated, etc. since most of the functions take the ICC identifier as an
input. This API handles the physical layer, i.e., the inter-character and inter-block timeouts. Optionally, it
can handle the LRC/CRC computation.

To switch between multiple activated cards, re-initialize the selected card (using the eIccId parameter).
ICC_1ST refers to the internal Smart Card #1. ICC_2ND or higher refers to external slot #2 with I2C
interface (8010 interface) and uses USRIO as its associated address.

When developing an application with an internal interface only (1 slot only), include libraries LAPI.LIB and
Internal-SC.LIB. When developing an application with interface to an internal interface and/or external
slot(s), include libraries LAPI.LIB and I2C-SC.LIB (replace Internal-SC.lib with I2C-SC.LIB).

For an external I2C interface, it is necessary to assign the I2C address, and I2C Card Event signal as
specified by the board design (see

ICC_InitUART()

for more details).

The Smart Card Interface API includes:

ICC_InitUART()

(page 31)

ICC_Activate()

(page 34)

ICC_Status()

(page 35)

ICC_Tx()

(page 36)

ICC_Rx()

(page 37)

ICC_RxLen()

(page 38)

ICC_RxDone()

(page 38)

ICC_Deactivate()

(page 38)

ICC_Mode()

(page 38)

ICC_Clk_Restart()

(page 39)

ICC_Clk_Stop()

(page 39)

Follow the general procedure described below to communicate with any asynchronous ICCs present:

1. Initialize the Smart Card UART parameters for each selected card.

2. Activate the card(s) that were initialized in Step 1.

3. Re-initialize the Smart Card UART parameters for each card, based on ATR analysis.

4. Negotiate the protocol and/or Fi/Di values for the selected cards. (Optional)

5. Update the Smart Card parameters based on the protocol negotiation if performed.

6. Re-initialize the selected card.

7. Transmit requests to a selected card via ICC_Tx call(s).

8. Receive responses from a selected card via ICC_Rx call(s).

9. Repeat Steps 6, 7 and 8 as needed for any activated card.

10. Deactivate active card(s).