поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

AN2646 датащи(PDF) 32 Page - STMicroelectronics

номер детали AN2646
подробное описание детали  Smartcard interface with the STM8S microcontroller
PDF  43 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2646 датащи(HTML) 32 Page - STMicroelectronics

Back Button AN2646 Datasheet HTML 28Page - STMicroelectronics AN2646 Datasheet HTML 29Page - STMicroelectronics AN2646 Datasheet HTML 30Page - STMicroelectronics AN2646 Datasheet HTML 31Page - STMicroelectronics AN2646 Datasheet HTML 32Page - STMicroelectronics AN2646 Datasheet HTML 33Page - STMicroelectronics AN2646 Datasheet HTML 34Page - STMicroelectronics AN2646 Datasheet HTML 35Page - STMicroelectronics AN2646 Datasheet HTML 36Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 32 / 43 page
background image
Smartcard interface library: description
AN2646 - Application note
32/43
6.3
How to send APDU commands to the smartcard
A detailed description on how to use the SC_Handler( ) function to send the ADPU
command to the smartcard and retrieve the card response is described below. The user has
to update the SC_CLA and the smartcard instruction values according to the smartcard
specifications.
6.3.1
SC_GET_A2R
SC_ADPU.Header.CLA = 0x00;
SC_ADPU.Header.INS = SC_GET_A2R;
SC_ADPU.Header.P1 = 0x00;
SC_ADPU.Header.P2 = 0x00;
SC_ADPU.Body.LC = 0x00;
while(SCState != SC_ACTIVE_ON_T0)
{
SC_Handler(&SCState, &SC_ADPU, &SC_Responce);
}
SCState: It stores the current smartcard state.
SC_ATR_Table: Pointer to an array (filled in by the SC_Handler function) that
contains the smartcard ATR frame.
6.3.2
SELECT_FILE
SC_ADPU.Header.CLA = SC_CLA;
SC_ADPU.Header.INS = SC_SELECT_FILE;
SC_ADPU.Header.P1 = 0x00;
SC_ADPU.Header.P2 = 0x00;
SC_ADPU.Body.LC = 0x02;
for(i = 0; i < SC_ADPU.Body.LC; i++)
{
SC_ADPU.Body.Data[i] = FileName[i];
}
while(i < LCmax)
{
SC_ADPU.Body.Data[i++] = 0;
}
SC_ADPU.Body.LE = 0;
SC_Handler(&SCState, &SC_ADPU, &SC_Responce);
FileName: It contains the 16 bit file identifier.
SCState: It stores the current smartcard state.
SC_Response->SW1 and SC_Response->SW2: they return the smartcard response
to the SC_SELECT_FILE command.
6.3.3
SC_GET_RESPONSE
SC_ADPU.Header.CLA = SC_CLA;
SC_ADPU.Header.INS = SC_GETRESPONSE;
SC_ADPU.Header.P1 = 0x00;
SC_ADPU.Header.P2 = 0x00;
SC_ADPU.Body.LC = 0x00;
i = 0;
while(i < LCmax)
{



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com