Timing Matching between ARM Processor and IC Card Interface

Publisher:ZhenxiangLatest update time:2013-11-11 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

 1 Hardware Interface

1.1 Introduction to TDA8007
  TDA8007 is an IC card reader chip launched by NXP. It provides two IC card read/write interfaces that can meet ISO7816, EMV and GSM1111 standards at the same time. The processor only needs to control parallel communication through its interface to manage TDA8007, so as to realize the power-on, power-off and read/write data processing of IC cards. The chip select signal and external interrupt signal line of TDA8007 can facilitate the reader to handle multiple IC card heads; special hardware ESD processing, interface short circuit processing, power supply error processing, etc. provide relatively high security protection for IC cards and IC card readers; the internal integrated power management function enables its power supply range to reach 2.7~6.0 V, and through power management, it can provide 5.0 V, 3.0 V and 1.8 V power supplies to IC cards to suit IC card applications with different working voltages.
1.2 Comparison between TDA8007 working timing and ARM bus timing
  In embedded systems based on the ARM core, most programs are stored in external NAND Flash. When TDA8007 is also connected to the bus, if bus multiplexing is used, the program needs to be called into the memory to run, and 11 GPIOs are required to control the read and write of TDA8007. This article adopts a non-bus multiplexing method, and the ARM processor is selected as LPC2220. The LPC2220 microcontroller is based on a 32/16-bit ARM7TDMIS CPU that supports real-time simulation and embedded tracking. Since TDA8007 was originally designed for a 51-core microcontroller, the read and write timing is different from the ARM bus. The read and write timing of TDA8007 and LPC2220 are shown in Figures 1 and 2. 
 
Figure 1 TDA8007 read and write timing
Figure 2 LPC2220 read and write timing
  Comparing Figure 1 and Figure 2, we can find that the read and write timings of TDA8007 and LPC2220 are different, so they cannot be directly connected. It is especially important to study the chip data sheet in depth before use, as incorrect timing matching may lead to secondary layout.
1.3 Solution
  TDA8007 cannot be directly connected to LPC2220, and unless a dedicated GPIO interface is used, it is also impossible to operate TDA8007 using bus multiplexing. Currently, most designs use a 51 microcontroller to control TDA8007, which then communicates with LPC2220. This article proposes a new solution that can easily connect TDA8007 to the LPC2220 processor, and the operation method is the same as operating the memory.
  By comparison, it can be clearly seen that the main difference between the two timings lies in the different timings of the read and write signals, as listed in Table 1.
Table 1 Comparison of read and write timing between TDA8007 and LPC2220
  In view of the unique timing of TDA8007, the OE and WE signals of LPC2220 are operated as the WR enable signal of TDA8007, and a GPIO port is used for read and write control. The CS signal remains unchanged. Such a timing diagram meets the requirements of read and write. Figure 3 is a circuit diagram of the connection between TDA8007 and LPC2220. Among them, TDA_RD/WR is GPIO.
Figure 3 TDA8007 design circuit
2 Software Interface
  Since TDA8007 uses GPIO to control read and write operations when connected to the ARM bus, the program also needs to be modified accordingly. The modified read and write functions are as follows:
#define TdaCS 0x83000040 //TDA8007 address
unsigned char *volatile TDA=(unsigned char *)TdaCS;
uchar read_register(uchar address) {
 fly shaft;
 IO3DIR=(IO3DIR |(0x01<<29));
 IO3SET=(0x01 << 29); //RD control, RD=1
 val=TDA[address];
 return val;
}
void write_register(uchar address, uchar _data){
 IO3DIR=(IO3DIR |(0x01<<29));
 IO3CLR=(0x01 << 29); //RD control, RD=0
 TDA[address]=_data;
 IO3SET=(0x01 << 29);
}
3 Conclusion
  When using TDA8007, you need to pay attention to the following issues:
  ① Configuration of peripheral circuits. The matching of the three capacitors SAP and SAM, SBP and SBM, VUP and GND is very important. If the capacitors are selected incorrectly, power-on failure may occur. According to experience, 0.01 μF capacitors are used between SAP and SAM, SBP and SBM, and 220 nF capacitors are used between VUP and GND. The actual use effect of this configuration is better than the capacitor configuration according to the demo circuit.
  ② In most usage environments, the crystal oscillator used by TDA8007 is 14.745 6 MHz. If the CPU frequency is relatively low, it is best to divide the frequency.
  ③ Before powering on, it is best to make sure that the card 9 has been inserted to avoid burning the chip due to multiple power-ons.
  The solution in this article has been put into practical use in a company’s financial POS series products. From the current usage, it can pass the international EMV L1 and L2 certification.
Reference address:Timing Matching between ARM Processor and IC Card Interface

Previous article:Construction and coordination analysis of underlying software structure model of embedded system
Next article:Design of ARM secondary development interface based on interrupt call mode

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号