Summary of the invention:
In order to solve the defective in the above-mentioned prior art, the utility model provides a kind of SD card of supporting two kinds of digital input-output interfaces.The utility model mainly comprises the monolithic controller, USB interface, the SDIO interface, it is characterized in that: on the SD card, be provided with two kinds of interfaces of USB interface and SDIO interface, these two kinds of interfaces are composite structure or stand-alone configuration, composite structure is that the contact of USB interface and SDIO interface contact is compound, and this compound interface is converted to the USB interface of standard by line adapter, its use, stand-alone configuration is for drawing the contact of USB interface separately on the SD card, directly input and output or by the indirect input and output of a line adapter, composite structure is that the monolithic controller is as system master system device, master controller U4 device is by the 2nd, 3,4,5,8,9 pin are connected with SDIO interface U6 corresponding contacts respectively, master controller U4 the 20th, two pins of 21 pin and crystal oscillator Y1 connect to form oscillator, Sheffer stroke gate element U8 the 12nd is connected the common port of resistance R 11 and capacitor C 9 with 13 pin, and be connected with master controller U4 the 10th pin by the 11st pin, SDIO interface U6 by contact VCC respectively with storage chip U2 the 12nd, 37 pin and master controller U4 the 7th, 14,44 pin and Sheffer stroke gate element U8 the 14th pin connect, master controller U4 the 16th, 17 pin are respectively by resistance R 61, R63 and SDIO interface U6 the 8th, 9 pin connect, SDIO interface U6 the 8th pin is connected with 3.3V direct current pressure side by resistance R 62, storage chip U2, the the 7th to 9,16 to 19,29 to 32 are connected with 36 to 43 pin with the flash data management interface the 24th to 30 of master controller U4 respectively with 41 to 44 pin, USB interface U5 the 1st pin is connected with electric pressure converter U7 the 1st pin, the 2nd, 3 pin respectively with SDIO interface U6 the 9th, 8 pin connect, electric pressure converter U7 the 2nd, 3 pin ground connection, the 5th pin is connected with SDIO interface U6 the 4th pin, U6 provides 3.3V direct supply to the SDIO interface, SDIO interface U6 the 5th pin is by resistance R 1 ground connection, absolute construction is for drawing the usb bus contact separately in the card surface, on circuit, be provided with a singlechip chip U9, singlechip chip U9 the 4th pin is connected with Sheffer stroke gate element U8 the 11st pin, and with UART interface signal circuit the 16th, 17 pin and master controller U4 the 13rd, 11 pin connect, USB interface U5, its the 1st pin and voltage transitions chip U7 the 1st, 3 pin connect, provide 3.3V direct-current working volts through the 5th pin from electric pressure converter U7 after the voltage transitions to total system, USB interface U5 the 2nd, 3 pin are respectively by resistance R 63, R61 and master controller U4 the 17th, 16 pin connect, the 3rd pin is connected with 3.3V direct current pressure side by resistance R 62 simultaneously, SDIO interface U6 by the 4th pin contact VCC respectively with master controller U4 the 7th, 14,44 pin and Sheffer stroke gate element U8 the 14th pin and singlechip chip U9 the 3rd pin connect, and provide 3.3V direct-current working volts to these chips.
Advantage of the present utility model: the same card can either be used to possess the equipment of SD/SDIO interface, also can directly or by a circuit conversion equipment simple, with low cost insert the equipment that possesses the usb host end interface indirectly, reduced the difficulty of software transplanting, can between different soft and hard part platform, keep the application data consistance, enlarge the range of application of existing device.
Further specify embodiment of the present utility model below in conjunction with accompanying drawing:
Embodiment 1, the hardware using of composite structure possesses the monolithic controller of USB and SDIO active/standby devices end interface as system master system device U4, manage the data storage among the flash chip U2, and the respective electric contact among the SDIO interface U6 is multiplexed with the contact of USB interface U5.
The physical dimension of the SD card among the embodiment 1 is identical with standard SD card or miniSD card, and as shown in Figure 1, because it adopts the contact multiplex mode, so physical dimension is identical with standard SD card profile, and can realize on the miniSD card equally.
Embodiment 1 circuit theory diagrams as shown in Figure 5, master controller U4 adopts single chip microcontroller, it is connected with SDIO interface U6 corresponding function contact respectively by the 2nd, 3,4,5,8,9 pin, the signal transmission and the consultative management of realization SDIO data communication interface.Two pins of master controller U4 the 20th, 21 pin and crystal oscillator Y1 are connected, and form oscillator to obtain the work clock signal.Sheffer stroke gate element U8 (74HC00 Sheffer stroke gate) the 12nd is connected with the common port of resistance R 11 with capacitor C 9 with 13 pin, utilize the input threshold of TTL Sheffer stroke gate to obtain waveform power-on reset signal preferably, and be connected with master controller U4 the 10th pin by Sheffer stroke gate element U8 the 11st pin, provide this signal to master controller U4, to guarantee the normal electrification reset work of chip.
SDIO interface U6 is except digital signal contact 1,2,5,7,8,9 with outside the respective pin of U4 is connected, also provide work required power supply to total system, its the 4th contact VCC respectively with flash chip U2 the 12nd, 37 pin, master controller U4 the 7th, 14,44 pin, Sheffer stroke gate element U8 the 14th pin connects, provide 3.3V direct-current working volts to these chips, master controller U4 the 16th, 17 pin are respectively by resistance R 61, R63 and SDIO interface U6 the 8th, 9 pin connect, SDIO interface U6 the 8th pin is connected with 3.3V direct current pressure side by resistance R 62, inserts SIGNALS MANAGEMENT to realize USB interface.
Data storage adopts high capacity NAND type flash chip U2, it the 7th to 9,16 to 19,29 to 32 is connected with 36 to 43 pin with the flash data management interface the 24th to 30 of master controller U4 respectively with 41 to 44 pin, realize data write Access Management Access in the flash memory by master controller U4, thereby make system have the mass data storage function.
Also need an interface convertor among this embodiment, standard usb bus interface circuit is transferred on the SDIO interface by simple wires, and the 5V direct supply that usb bus provides is converted to the 3.3V direct supply.Its circuit as shown in Figure 6, USB interface U5 the 1st pin is connected with electric pressure converter U7 the 1st pin, provide 5V direct supply to it, 2nd, 3 pin are connected with SDIO interface U6 the 9th, 8 pin respectively, realize of the switching of usb data circuit to SDIO interface U6, electric pressure converter U7 the 2nd, 3 pin ground connection, the 5th pin is connected with SDIO interface U6 the 4th pin, and U6 provides 3.3V direct supply to the SDIO interface.SDIO interface U6 the 5th pin can not be subjected to the noise signal interference by resistance R 1 ground connection to guarantee the CLK signal on the 5th pin.
Therefore the Composite Double interface mode needs to consider to avoid two kinds of agreements to conflict mutually on software design because USB and SDIO communication interface electrical contact are multiplexing.
Because usb bus and SDIO bus all are bus-powered modes, both sides' power supply contact overlaps with earthing contact, and any time has only the use that is activated of a bus interface, therefore can confirm employed bus interface by the corresponding initialization information of agreement in system's power-up initializing stage.
The software initialization flow process of its program as shown in Figure 4, except that the controller kernel, all peripheral control units all were in closed condition when system powered on, the external control pin is in high-impedance state.Carry out initialization to SDIO bus controller and usb bus controller this moment respectively, and CMD, the CLK of SDIO bus and D+, the D-external terminal of usb bus are opened.Therefore do not need use DAT0-DAT3 pin because the SDIO bus still is in initial phase this moment, if what insert is usb bus, can not be subjected to the influence of other signals respectively with D+, the D-of the multiplexing external electrical of DAT1, DAT2 contact; And if insert this moment is the SDIO bus,, therefore can not influence SDIO bus initialization process because this moment, the SDIO agreement can not transmitted valid data on the DAT0-3 pin yet.System can be respectively accepts corresponding initialization information and can not influence each other from two buses this moment.Deng to system from after wherein some buses are received corresponding initialization information, another bus controller and external terminal can be closed, and adopt all the time in the communication process afterwards and finish initialized bus and carry out data transfer, cut off the electricity supply until system.
Embodiment 2, the hardware using of stand-alone configuration simply links to each other by serial line interface a single-chip microcomputer with the serial port conversion chip of supporting the SDIO interface, single-chip microcomputer can be communicated by letter, to reach the purpose of expansion host data transmittability by this conversion chip and the main frame that directly is connected the SDIO interface (as equipment such as PDA, smart mobile phones).
For composite structure, stand-alone configuration need be drawn the usb bus contact separately in SD card surface.Embodiment 2 physical dimension can be according to the configuration design of standard SD card, and the card surface draw the usb bus contact, insert the usb host end interface by line converter then, as shown in Figure 2, also can on SD card standard size, be cut out, and the usb bus contact arranged separately, make the usb bus interface end can directly insert the usb host end interface, as shown in Figure 3.
The most of circuit of present embodiment is identical with the Composite Double interface mode, the key distinction is in the difference of usb bus access way, as shown in Figure 7, master controller U4 adopts single chip microcontroller, it is connected with SDIO interface U6 corresponding function contact respectively by the 2nd, 3,4,5,8,9 pin, realizes the signal transmission and the consultative management of SDIO data communication interface.Two pins of master controller U4 the 20th, 21 pin and crystal oscillator Y1 are connected, and form oscillator to obtain the work clock signal.Sheffer stroke gate element U8 (74HC00 Sheffer stroke gate) the 12nd is connected the common port of R11 and C9 with 13 pin, utilize the input threshold of TTL Sheffer stroke gate to obtain waveform power-on reset signal preferably, and be connected with master controller U4 the 10th pin by the 11st pin, provide this signal to master controller U4, to guarantee the normal electrification reset work of chip.
SDIO interface U6 except digital signal contact 1,2,5,7,8,9 with the respective pin of master controller U4 is connected, also provide work required power supply to total system, its the 4th contact VCC respectively with master controller U4 the 7th, 14,44 pin, U8 the 14th pin, singlechip chip U9 the 3rd pin of 8051 kernels connects, and provides 3.3V direct-current working volts to these chips.
On circuit, be provided with the singlechip chip U9 of one 8051 kernels, singlechip chip U9 the 4th pin that has 8051 kernels is connected the acquisition power-on reset signal with U8 the 11st pin, and UART interface signal circuit the 16th, 17 pin are connected with master controller U4 the 13rd, 11 pin, communicate by letter with the main equipment end that has the SDIO interface with controller U4 by the UART interface to realize single-chip microcomputer.The 1st pin of USB interface U5 is connected with voltage transitions chip U7 the 1st, 3 pin, provides 3.3V direct-current working volts through the 5th pin from U7 after the voltage transitions to total system.Because USB interface and SDIO interface can not be used simultaneously, therefore power supply each other is for conflicting.In addition, USB interface U5 the 2nd, 3 pin are connected with U4 the 17th, 16 pin by resistance R 63, R61 respectively, and the 3rd pin is connected with 3.3V direct current pressure side by resistance R 62 simultaneously, insert SIGNALS MANAGEMENT to realize USB interface.
Stand-alone configuration so system software is distinguished initialization bus corresponding controller and external terminal at initial phase, and waits for that initializing signal gets final product because USB and SDIO communication interface keep physically independent.
Composite structure and stand-alone configuration all meet the requirement of SD card standard to card body profile and contact arrangement.Comparatively speaking, composite structure need insert the usb host end interface by a line converter, and software initialization is complicated; Stand-alone configuration can directly insert the usb host end interface, uses comparatively easy.Stand-alone configuration need be drawn the USB contact separately in the card surface, and need necessarily revise the card profile, make useful volume minimizing in the card, this proposes high requirement to circuit design in blocking, and can't on the miniSD card, realize directly inserting the usb host end interface, so these two kinds of implementations there is respectively it to have value.