Research on SIM card detection system based on ARM

Publisher:Huanle666Latest update time:2012-08-07 Source: 21ic Keywords:ARM  reader Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

With the development of science and technology in modern society, people have higher and higher requirements for the portability, convenience and efficiency of mobile products. As a special type of smart card, SIM card adopts standard contact IC card and complies with IS07816 standard specification. It follows the characteristics of smart card in security and plays a very important role in mobile commerce. Therefore, the application scope of SIM card is becoming wider and wider, and it can be applied to high-end application fields such as finance and convenient payment. However, for the cards that have been put on the market, it is difficult for operators to identify which supplier supplies the products, and it is also necessary for suppliers to conduct quality inspection on the cards they produce. In view of the high cost performance of ARM, this paper adopts a CPU STR711FR2 based on ARM7TDMI core as the processor as the system core, and designs a SIM card reading system, which can be compatible with A, B, C cards that comply with 7816 protocol, and is used to read the information solidified inside the chip, so as to confirm the manufacturer of the chip and implement quality inspection on the chip.

1 System Structure
The card reading system is mainly composed of a card reading module, a serial communication module, a USB communication module, a JTAC download and debug module, and corresponding clock and reset circuit modules and upper-level software. The main control circuit is composed of ST's STR711FR2 and its peripheral circuits, which mainly realizes the sending of commands and the transmission and processing of received data. The system adopts a contact working mode. The chip is inserted into the interface slot, and the main control chip sends instructions to complete the reading of card data. The obtained data is then transmitted to the PC through the serial communication module. The received data is processed and judged by the upper-level software, and the results are displayed on the PC. The system structure is shown in Figure 1.

a.JPG

2 Hardware Platform Design
2.1 Platform Architecture
STR711FR2 is a high-performance, low-cost, low-power microcontroller based on the ARM7TDMI core from ST. It has built-in 256+16 k Flash and 64 k RAM, and has rich peripherals: such as smart card ISO-7816-3 interface, USB 2.0 interface, UART interface and rich IO interface.
In this system, STR711FR2 is used as the main processor, and the USB interface is used to power the system and as a backup data channel; the JTAG interface is used to debug the system and download firmware; the 78 16 smart card interface is used as a card insertion port; the serial port is used to transmit the read data. The system is powered by the USB interface; the STR711FR2 is clocked by an external 4 M crystal oscillator, and the 32.768 k crystal oscillator is used as an auxiliary clock and provided to the internal real-time clock. STR711FR2 and LTC1955 send different commands through the serial port to determine the type of card inserted, so as to generate the corresponding voltage of the card, and then send a command to read the data, and then transmit the data to the PC for display through the serial communication module. The hardware platform architecture is shown in Figure 2.

b.JPG


2.2 Power supply part
The power supply voltage of the USB interface part is 5 V, and the maximum current can reach 500 mA. The MCU and Reader in the system are two major energy-consuming components. The full-load working current of STR711FR2 is 200mA, and the full-load working current of LTC1955 does not exceed 100 mA. The rated voltage of LTC1955 and STR711FR2 is 3.3 V, so it is necessary to convert 5 V into 3.3 V voltage. The conversion chip uses ASM1117S33. After the conversion, the system can be powered by USB. In addition, STR711FR2 supports USB2.0 transmission protocol, so the differential line of USB can be weakly supported with a 1.5kΩ resistor and connected to the 42nd and 43rd pins of the main MCU respectively. In order to support the high-speed transmission mode of USB, this part can also be used as a backup data transmission channel. The circuit is shown in Figure 3. [page]

c.JPG


2.3 7816 interface part
The pin definition of SIM card complies with ISO7816 integrated circuit card with electric shock specification. It is actually a chip card equipped with a microprocessor, including 5 modules and a machine-card separation interface. The communication is safe, reliable and low-cost. Among them, C1 pin is power supply VCC, C2 pin is reset RST, C3 pin is clock CLK, C4 pin is not connected, C5 pin is ground GND, C6 pin programming voltage VPP, C7 pin is data I/O port, and C8 pin is not connected. In addition to C4 and C8 pins, which have been expanded by the International Standards Organization to become a new generation of high-speed SIM card interface, C6 high-voltage programming pin has lost its function because SIM card can realize the EEPROM erase and write function internally without external VPP signal.
The 7816 interface part uses Linear's dedicated chip LTC1955. LTC1955 supports ISO7816-3 protocol, has good power management and control capabilities, and has a serial data interface, through which data control and status control can be performed, and can automatically power off when electrical errors occur. The built-in voltage collapse can generate 1.8 V, 3 V and 5 V voltages, so it is compatible with 7816 A, B, C3 cards. The card interface can automatically detect the card type through the detection channel generated by the automatic oscillation circuit. The serial port sends commands based on the detected information to select the card type. Different command status bits can select different types of cards. This system design only uses one B card slot. The 32nd and 31st pins of the chip are synchronous and asynchronous pins, respectively, and are connected to the P1.8 and P1.9 pins of the main control chip. The synchronous and asynchronous commands are sent through the central control IO to select the transmission mode. The data pin DATA is connected to the P1.15 pin of the main control chip to transmit the received data. The RIN reset pin information is sent through the P1.14 control of the main control chip. The circuit design is shown in Figure 4.

d.JPG


2.4 UART part
The communication interface is the channel and bridge for the system to exchange information with the outside world. Therefore, the design of the communication interface is indispensable in the system. Through the comparison of the current mainstream communication methods, this system adopts the UART method. The key to the UART circuit is to achieve the matching of STR711FR2 and PC level. The PC level is 12 V and the level of STR711FR2 is 3.3 V, which requires level conversion. There are many such level conversion chips, such as MAX3232 and ST3232, etc. This system uses MAX3232 chip for conversion. MAX3232 can not only meet the needs of the host, but also has a single 3.3 V power supply, which can realize the sending conversion and receiving conversion functions at the same time. The chip provides 2 UART channels, which can connect 2 RS3232. This system only uses one UART, and only the first channel needs to be selected, and the other one is not connected. Its circuit design is shown in Figure 5.

e.JPG

3 Implementation of software detection system
SIM card complies with the international standard 7816 protocol specification, so this detection system is divided into two parts, the first part is the firmware part for 7816 protocol communication, and the second part is the upper software part. The operation of the firmware part should include three processes: interface device activation circuit, cold reset to start card response, card and interface device to exchange information, and interface device release circuit card power off. [page]
After the card and interface device are physically connected, in order to start the mechanical connection of the card interoperability, the interface device needs to activate the card. Initially, all ports are in low level (L) state, with a voltage range of 0 to 0.4 V; VCC power supply voltage is powered on first (H state), and after the VCC power supply end is stable for a period of time, the IO port is set to receive mode (H state), the circuit activation sequence ends, and the card enters the reset process. At Ta time, CLK starts to provide clock signal; the card should set the IO port state to receive state within at least 200 clock cycles after the clock signal starts (delay time is Ta). At the same time, starting from Ta, RST maintains the L state for at least 400 clock cycles (delay time is Tb), that is, RST is set to H state after time Tb. In order to ensure the normal reset of the card, the card must respond within 400 to 40,000 clock cycles (delay time is Tc), that is, return ATR from the IO port. The reset process ends. The timing is shown in Figure 6.

f.JPG


After power-on, the interface device can select the working mode according to the ATR returned by the card. If TA2 is specified in the ATR, the interface device starts the information exchange mode with the card according to the new parameters; if TA2 is not specified in the ATR, the interface device and the card can perform the PPS process or the interface device can select which communication protocol to use according to the parameter (T) in TD1. If the interface device stops exchanging data with the card and the IO port remains in the H state for at least 1 860 (Tg) clocks, the interface device can stop the clock at Te, at which time VCC remains powered and RST remains at a high level. The clock stop timing is shown in Figure 7.

g.JPG


After the information exchange is completed, the card is released, RST is set to state L: CLK is set to state L (unless the clock has stopped at state L) IO is set to state L: VCC is released.
The upper-layer software is designed in C++. Since the card is just shipped and has not yet been delivered to the operator for use, the ATR is sometimes written with the manufacturer's relevant information. The chip can be detected based on this information, but once it is put on the market by the operator, the operator's cos will be downloaded. At this time, ATR also becomes the operator's, so it cannot be detected based on ATR. However, when the card leaves the factory, the card manufacturer will download its own cos to the NVR, which contains the card manufacturer's logo information, such as the card's business code, production time, lot number, and coordinates. Once these contents are downloaded, they cannot be modified, so they can be detected based on this. The detection process is shown in Figure 8.

h.JPG

4 Conclusion
This paper presents a SIM card detection system based on the ARM7 core. Through testing, the detection function can be successfully realized. This system adopts a standard contact card design and is compatible with 7816 A, B, and C cards, providing a feasible platform for contact and later upgraded contactless card reading information.

Keywords:ARM  reader Reference address:Research on SIM card detection system based on ARM

Previous article:Simple digital photo frame based on ARM9
Next article:Application of Standard Peripheral Library of STM32F10X Series Microcontrollers

Recommended ReadingLatest update time:2024-11-16 16:47

How to realize the collaborative work of dual-core processor ARM+DSP
In view of the complexity of current applications, SOC chips can better meet the needs of applications and media, integrate many interfaces, use ARM as an application processor for diversified application development and user interfaces and interfaces, and use DSP for algorithm acceleration, especially media encoding a
[Microcontroller]
An inverter power circuit design based on ARM control
  This design uses ARM as the control core, combined with a push-pull boost circuit and an SPWM inverter circuit, to achieve the conversion of 12VDC input voltage into 110VAC AC sinusoidal voltage output. Experiments show that the inverter has the characteristics of small voltage ripple, high dynamic response and full
[Microcontroller]
An inverter power circuit design based on ARM control
Design of wheat hardness detection controller
The softness and hardness of wheat grain texture is an important indicator for evaluating wheat processing quality and edible quality, and is closely related to wheat breeding and trade price. Wheat hardness is not only closely related to wheat processing technology and final product quality, but also closely related t
[Microcontroller]
Design of wheat hardness detection controller
Learn ARM easily: Play with buzzer
Today we are going to learn how to easily learn the ARM series and play with the buzzer, based on the Samsung S5PV210 development platform of the ARM cortex_a8 core. So let's see how to learn to use pwm to control the buzzer? 1. Overall Architecture Diagram Before we can solve the buzzer problem, we need to hav
[Microcontroller]
Learn ARM easily: Play with buzzer
Design of an Embedded Network Camera Based on ARM S3C2410X and Linux
introduction The video surveillance system based on coaxial cable has a complex structure, poor stability, low reliability and high price, so remote Web video surveillance systems such as embedded network cameras have emerged. This embedded network camera uses a high-performance ARM9 chip as a microprocessor, a built-
[Microcontroller]
Design of an Embedded Network Camera Based on ARM S3C2410X and Linux
ARM2440 for LCD
Change the original 3.5-inch resolution from 240x320 to 480x272 Timing settings: CLKVAL=4 (VCLK =10) 5 VCLK 12 Each dot scanning cycle         VSPW = 10-1 2 tvp - typ:10 Vertical synchronization signal VBPD=2-1 2 tvb - typ: 2 How long does it work after the vertical sync signal LINEVAL=272-1 tvd :272 272 lines VFPD
[Microcontroller]
ARM Advanced Learning (5) - ARM ISP Operation
       For ARM systems, the most convenient and commonly used operation is ISP. We are most happy to solidify the code that realizes our own programming concept into ARM and run it according to the set conditions. There are two commonly used software for ISP. The following briefly describes the operation of each. 1. L
[Microcontroller]
Introduction to three different measurement schemes for Ethernet throughput on NXP ARM microcontrollers
This article describes a method for measuring Ethernet throughput that provides a good estimate of performance and explains the various factors that affect performance. Ethernet is the most widely installed local area network (LAN) technology in the world. It has been in use since the early 1980s and is covered by I
[Microcontroller]
Introduction to three different measurement schemes for Ethernet throughput on NXP ARM microcontrollers
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号