A kind of method for multiplexing interface of SD card and SD card with expanded function
Technical field
The present invention relates to the storage card field, the SD card that is specifically related to a kind of method for multiplexing interface of SD card and has expanded function.
Background technology
SD card (Secure Digital Memory Card) translator of Chinese is a safe digital card; It is a kind of memory device of new generation of based semiconductor flash memory; It is widely used on the mancarried device, for example digital camera, personal digital assistant (PDA) and multimedia player etc.The SD card is developed in August, 1999 by PANASONIC, Toshiba and U.S. SanDisk company jointly.The connection interface that the SD cartoon is crossed 9 pins is connected with the special driving device, does not need extra power supply to keep canned data on it.The technology of SD card is based on MulltiMedia card (MMC) development, and size and MMC are similar, are of a size of 32mm * 24mm * 2.1mm.Length and width are the same with MMC, just than MMC thick 0.7mm, to hold more jumbo memory cell.The SD card has also increased by 2 needle interfaces in the storage card both sides, as data line except 7 needle interfaces that keep MMC.SD protocol definition SD card from Pin1 to Pin9 is: DAT3 (data line 3), CMD (order), GND (), VCC (power supply), CLK (clock), GND (), DAT0 (data line 0), DAT1 (data line 1) and DAT2 (data line 2), as shown in Figure 1.
USB is the abbreviation of English Universal Serial Bus, and Chinese implication is " USB ".Usb protocol is to unite proposition by many companies such as Intel, Compaq, IBM, Microsoft the end of the year 1994.After issue on November 11st, 1994 USB V0.7 version, the USB version has experienced years of development, has developed into 2.0 versions till now, and usb protocol adopts one 4 pin plug as standard interface, is defined as: VBUS (VCC), D-, D+, GND.
Smart card is claimed integrated circuit card again, i.e. IC-card, and it is embedded in an IC chip in the plastic substrate, is packaged into the form of card.IC-card divides contact and contactless two kinds.ISO/IEC 7816 is international standards that Contact Type Ic Card is followed; It has defined 8 contacts to IC-card; From C1 to C8 be: VCC (power supply), RST (reset signal), CLK (clock), RFU (remain in the future and use), GND (), Vpp (program voltage); DATA (data) and RFU (remain in the future and use), as shown in Figure 2.
Because each self-defined interface shape that meets its agreement of SD card agreement, usb protocol and ISO/IEC7816 agreement; So meeting wherein in principle, a kind of device of agreement does not meet other two kinds of agreements; Interface and communications protocol can't be compatible, also do not have function corresponding.In general, if want on a device, to have multiple functional interface, need have corresponding several kinds of different physical interface forms.So because device shape is special causes the die sinking again of product casing mould needs cause interface socket mould needs die sinking etc. be former thereby cause the production cost raising again because product interface socket shape is special.Yet in plurality of applications; Need a kind of device to have a plurality of interfaces and perhaps possess multiple function; And physical aspect and interface to device have strict definition, thus need be on the interface of the device of following a kind of agreement multiplexing multiple interfaces, to realize a plurality of host-host protocols.
Summary of the invention
The objective of the invention is to present memory card interface agreement fix, the defective of function singleness; The SD card that a kind of method for multiplexing interface of SD card is provided and uses this method with expanded function; Thereby on the basis that strengthens memory card function, can save production cost again.
Technical scheme of the present invention is following: a kind of method for multiplexing interface of SD card; This method is while multiplexing USB interface, ISO/IEC7816 interface and GPIO interface on 9 needle interfaces of SD card protocol definition; Through control, realize the function of various interface simultaneously to respective pin.
The method for multiplexing interface of aforesaid SD card; Wherein, During the multiplexing USB interface, the VCC and the GND pin of the VCC of USB interface and GND pin and SD fastening justice are shared, the CMD pin multiplexing of the D-pin of USB interface and SD fastening justice; The DATO pin multiplexing of the D+ pin of USB interface and SD fastening justice, the CLK pin multiplexing of USB interface clock CLK and SD fastening justice.
The method for multiplexing interface of aforesaid SD card, wherein, during multiplexing GPIO interface, the DAT1 pin multiplexing of GPIO input and output pin and SD fastening justice.
The method for multiplexing interface of aforesaid SD card; Wherein, During multiplexing ISO/IEC7816 interface; The VCC and the GND pin of the VCC of ISO/IEC7816 interface and GND pin and SD fastening justice are shared, the DAT3 pin multiplexing of the DATA pin of ISO/IEC 7816 interfaces and SD fastening justice, the DAT2 pin multiplexing of the interface CLK of ISO/IEC 7816 and SD definition; Simultaneously, the VCC pin of SD fastening justice is divided into two, with a part wherein as the RST pin of ISO/IEC7816 interface.
A kind of SD card of having used said method with expanded function; Comprise the storage unit and the controller that is connected with storage unit that place the card body inner; Controller is connected with 9 needle interfaces that are arranged on the card surface, wherein, comprises the SD interface control module in the controller; And comprising USB interface control module, ISO/IEC7816 interface control module, GPIO interface control module simultaneously, the various interface control module is connected with corresponding pin according to the pin multiplexing rule of setting.
Aforesaid SD card with expanded function, wherein, the USB interface control module is connected with VCC, GND, CMD, DATO and the CLK pin of SD fastening justice.
Further, in above-mentioned SD card with expanded function, the GPIO interface control module is connected with the DAT1 pin of SD fastening justice.
Further; In above-mentioned SD card with expanded function; The ISO/IEC7816 interface control module is connected with VCC, GND, DAT3, the DAT2 pin of SD fastening justice; The VCC pin of SD fastening justice is divided into two parts that area does not wait, and wherein the small size part is connected with the ISO/IEC7816 interface control module.
Beneficial effect of the present invention is following:
(1) memory storage that designs according to method of the present invention meets the standard and the function of SD card protocol definition, can conduct interviews through standard SD card slot or reader device, can be used in the various electronic equipments as the SD storage card;
(2) the multiplexing interface function of USB, ISO/IEC7816 and self-defining general input and output (GPIO) on standard SD card; And USB, ISO/IEC7816 and self-defining universal input/output interface can be worked simultaneously; Can insert and meet SD card agreement, and can carry out to accomplish corresponding expanded function through USB, ISO/IEC 7816 and/or self-defining universal input/output interface in the mutual specific card reader or slot with USB, ISO/IEC7816 and/or self-defining universal input/output interface.
Description of drawings
Fig. 1 is the interface structure synoptic diagram of SD card.
Fig. 2 is the interface structure synoptic diagram that meets the smart card of ISO/IEC7816 agreement.
Fig. 3 is the interface structure synoptic diagram of SD card behind the interface duplex.
Fig. 4 is the synoptic diagram with SD card use SD interface function of expanded function.
Fig. 5 is the synoptic diagram with SD card use usb function of expanded function.
Fig. 6 is the synoptic diagram with SD card use ISO/IEC 7816 interface functions of expanded function.
Fig. 7 is the controller logic structural representation with SD card of expanded function.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment the present invention is carried out detailed description.
The SD card is a kind of memory device of new generation of based semiconductor flash memory; Its structure can guarantee the security that digital document transmits; Also be easy to reformatting; The field so have a wide range of applications, multimedia files such as music, film, news can be saved in the SD card easily, now large-scale application in digital products such as MP3 walkman, DV, digital camera.
In general, people are used as the SD card as a memory storage easily.Yet have during some use, people hope that the SD card can realize more function, for example can carry out the input and output of data through USB interface, can carry out communication etc. with the card access means through the interface of ISO/IEC7816 agreement.Therefore the present invention has expanded USB and ISO/IEC 7816 functions on SD card basis; And the interface duplex that all these functions are required is to 9 pins of SD card; Through control to respective pin; Realize the function of various interface respectively or simultaneously, the SD jig through definition has again had the ability that satisfies above application demand like this.The SD card that Fig. 4 representes to have expanded function uses the synoptic diagram of SD interface function.
Storage card of the present invention meets SD card agreement fully, has the external physical form identical with general SD card, and can insert in general SD card slot or the card reader and use; In addition; Multiplexing USB interface on 9 needle tubing pin of SD card, the function pin of USB definition has 4: VCC, D-; D+, GND.Except VCC and GND and SD fastening justice are shared (as shown in Figure 13; 4; 6 pin); With the D-of USB interface and D+ pin can with the SD card except that VCC and any pin multiplexing the GND, in the present embodiment with the D-pin of USB interface and the CMD pin multiplexing of SD fastening justice, the D+ pin of USB interface and the adopted DAT0 pin multiplexing of SD fastening.Because the clock of the required 48MHz of USB function need be provided when using the USB function; And, the crystal oscillator of this clock or crystal can't put into the SD card because volume is too big because being provided; Therefore with USB clock CLK and SD fastening justice except that VCC and any pin multiplexing the GND, in the present embodiment with interface clock CLK and the adopted CLK pin multiplexing of SD fastening of USB.The SD card that Fig. 5 has represented to have expanded function uses the synoptic diagram of USB interface.When storage card of the present invention as storage during with the SD card; The USB function pin D-of storage card and D+ are set to import the use that high-impedance state promptly can not influence the SD function; When storage card of the present invention used usb function, the function pin of SD was set to import high-impedance state and gets final product.
The present invention is multiplexing self-defining general input and output pin (GPIO) on 9 needle tubing pin of SD card also; Accomplish self-defining input and output or state deixis; For example; An external LED (light emitting diode) on the pin of self-defining GPIO, the light on and off through LED show the executing state of storage card built-in function; Also can be through the external physical button of self-defining GPIO to level signal of storage card input.In the present embodiment, defined a GPIO interface, the GPIO interface can with the SD card except that VCC and any pin multiplexing the GND pin, the DAT1 pin multiplexing of GPIO interface and SD card in the present embodiment.
It is thus clear that through behind the above-mentioned multiplex mode to USB interface and GPIO interface, also remaining the 1st pin (DAT3) of the pin of SD card and the 9th pin (DAT2) do not have multiplexing definition.Because USB, GPIO, ISO/IEC 7816 interface functions need to use simultaneously under many circumstances, thus ISO/IEC 7816 interface pin can not with the pin multiplexing of USB and GPIO interface.ISO/IEC 7816 agreements have defined 8 contacts to IC-card; From C1 to C8; Function corresponds to: VCC (power supply), RST (reset signal), CLK (clock), RFU (remain in the future and use), GND (), Vpp (program voltage); DATA (data) and RFU (remain in the future and use), visible have having only of functional meaning: VCC, GND, CLK, DATA and RST, and the interface communication function that accomplish the ISO/IEC7816 definition needs VCC, GND, CLK and DATA pin at least; The DAT2 pin multiplexing of the CLK of definition ISO/IEC 7816 interfaces and SD fastening justice in the present embodiment, the DAT3 pin multiplexing of the DATA of ISO/IEC 7816 interfaces and SD fastening justice.When this storage card as storage during with the SD card; ISO/IEC 7816 function pin CLK and DATA are set to import the use that high-impedance state promptly can not influence SD card function; When needs used ISO/IEC 7816 interface functions of this storage card, the function pin of SD card was set to import high-impedance state and gets final product.USB, ISO/IEC 7816 and GPIO interface function can be used simultaneously like this, and all function pin multiplexings are defined in 9 pins of SD card standard definition.In addition, the RST signal pin for ISO/IEC 7816 definition can be divided into two a pin of SD card, and wherein a part is defined as RST.In the present embodiment, the VCC pin that the SD fastening is adopted is divided into two, and; In order to make when the SD card inserts socket; VCC can obtain the good metal contact, and former VCC pin is divided into a part and the part that area is big that area is little, and former VCC pin is cut apart the RST pin that the top fraction in back is defined as ISO/IEC 7816 interfaces; Following large tracts of land partly is defined as the VCC pin of SD card, and its structure is as shown in Figure 3.The SD card that Fig. 6 has represented to have expanded function uses the synoptic diagram of ISO/IEC 7816 interface functions.
The concrete condition of table 1 SD, USB, ISO/IEC7816 and GPIO interface duplex
Based on the SD card that said method proposed with expanded function; Comprise the storage unit and the controller that is connected with storage unit that place the card body inner; Controller is connected with 9 needle interfaces that are arranged on the card surface; Wherein, comprise the SD interface control module in the controller, and comprise USB interface control module, ISO/IEC7816 interface control module, GPIO interface control module; The various interface control module is connected with corresponding pin according to the pin multiplexing rule of setting, and the logical organization of controller is as shown in Figure 7.Say that in principle the annexation of each interface control module and pin can at random design, as long as meet multiplexing rule.In the present embodiment; The SD interface control module is connected with each function pin of 9 needle interfaces by standard mode; The USB interface control module is connected with VCC, GND, CMD, DAT0 and the CLK pin of SD fastening justice; The GPIO interface control module is connected with the DAT1 pin of SD fastening justice; The ISO/IEC7816 interface control module is connected with VCC, GND, DAT3, the DAT2 pin of SD fastening justice, and the VCC pin of SD fastening justice is divided into two parts that area does not wait, and wherein the small size part is connected with the ISO/IEC7816 interface control module.
Should be emphasized that, usb signal, ISO/IEC 7816 signals and GPIO arrange except power supply (VCC), (GND) and 7816 reset (RST) pin fixing, all the other pins can be arranged arbitrarily, various interface can be distinguished or realize its function simultaneously.
The function of SD interface control module, USB interface control module, ISO/IEC7816 interface control module and GPIO interface control module and several kinds of interfaces required control circuit function in independent environment for use is identical, and those skilled in the art can combine actual conditions design according to routine techniques.
Consider the description of this invention disclosed herein and special embodiment, other embodiment of the present invention are conspicuous for a person skilled in the art.These explanations and embodiment only consider as an example that they all belong to by within the indicated protection scope of the present invention and spirit of accompanying claims.