CN100426278C - Multi-function small memory card communication protocol - Google Patents

Multi-function small memory card communication protocol Download PDF

Info

Publication number
CN100426278C
CN100426278C CNB021429375A CN02142937A CN100426278C CN 100426278 C CN100426278 C CN 100426278C CN B021429375 A CNB021429375 A CN B021429375A CN 02142937 A CN02142937 A CN 02142937A CN 100426278 C CN100426278 C CN 100426278C
Authority
CN
China
Prior art keywords
data
communication
end points
memory card
card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB021429375A
Other languages
Chinese (zh)
Other versions
CN1484161A (en
Inventor
陈加立
谢祥安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WANGUO COMPUTER CO Ltd
Original Assignee
WANGUO COMPUTER CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WANGUO COMPUTER CO Ltd filed Critical WANGUO COMPUTER CO Ltd
Priority to CNB021429375A priority Critical patent/CN100426278C/en
Publication of CN1484161A publication Critical patent/CN1484161A/en
Application granted granted Critical
Publication of CN100426278C publication Critical patent/CN100426278C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Credit Cards Or The Like (AREA)

Abstract

The present invention relates to a multifunctional small memory card communication protocol which adopts a half-duplex and 4-bit serial flow mode and is based on time pulse signals as reference. Each time pulse can transmit 4-bit information, interface transmission uses a data packet as a unit, and the communication protocol uses analog communication endpoints in a memory card as the source or the sink of information transmission, wherein the data packet contains starting bits, packet identifying codes, communication endpoints, data length, payload data, packet state codes, data formats and finishing bits. The interface data of the multifunctional small memory card is easily compatible with a USB interface with 4 foot bits and can be used in small electronic application devices.

Description

The means of communication between electronic installation and the multifunctional mini memory card
Technical field
The invention relates to the means of communication between electronic installation and the storage card, refer in particular to a kind of electronic installation and can receive the means of communication between the multifunctional mini memory card of multifunctional mini memory card interface and USB interface, can make industry avoid using traditionally breakout box with the inconvenience between Jie's connection small electronic installation and the computer apparatus.
Background technology
Mini memory card (Small-Form-Factor Memory Card) is to adopt to possess a large amount of storage areas, and can repeat erasable silicium wafer as Storage Media, an and built-in microcontroller, read and erasable operation as the control silicium wafer, and connect the electronic application device interface of using mini memory card, accept its instruction and carry out purposes such as corresponding read-write operation.
Adopt the mini memory card of silicium wafer as Storage Media, advantages such as volume is little, in light weight because of possessing, read or write speed is fast, power saving are widely used in digitized IT industry and information electrical appliance industry, as storing and the usefulness that exchanges digital information.Common in the market mini memory card can be divided into Compact Flash card (CF card), Smart Media card (SM card), Multi Media card (mmc card), Memory Stick card (MS card), Secure Digital card variety classeses such as (SD cards).Various mini memory cards, its apparent size, mechanical structure dress, electric contact position, communications protocol, software instruction code, control flow etc. are had nothing in common with each other, and its good and bad point is also respectively arranged.
Mini memory card is widely used in various portable digital devices, contains mobile phone, digital camera, digital music walkman, the carry-on assistant of portable digital (PDA) etc.For expanding its application, except that memory function, also there is the product of other applications of developing to occur.For example: the data machine card of CF interface, network card; The digital camera card of Memory Stick interface, Blue Tooth address card; The Blue Tooth address card of SD interface etc.Only have a storage card of memory function for being different from, generally all the application of above-mentioned other functions is loosely referred to as the IO card.
Above-mentioned various mini memory card interface, though applicable to various portable digital device, with different application, yet because of its disappearance is respectively arranged, and the regret of lost pearl is arranged.With regard to the disappearance of its specification, the present slightly lifts numerical example and is illustrated respectively:
With regard to Compact Flash card, its interface needs 50 windings point, contact pin, jack convolution are adopted by mechanism, and electric interfaces is adopted the address bus of 8 bits, 16 bits and the block form data bus of depositing, 11 groups of signals of tool, and the control signal wires of the various different purposes of many groups.
The shortcoming of Compact Flash interface is: one, must possess 50 groups of splicing ears in the mechanism, quantity is maximum, causes the connector cost higher, also takes up space.Two, visit with contact pin, jack convolution connection design, cause insertion, withdraw from the higher dynamics that needs.Three, contact pin coupling jack is located when inaccurate, causes easily that contact pin is crooked to depart from damage.Four, adopt the block form bus design, when connecting block, the electronic application device must provide respectively to start selects signal, can't the capable and Lian Duoka of Jing more.Five, do not possess the Write-protection prevention design, can't guarantee that remembering content is not damaged.
With regard to Smart Media card, its interface needs 22 windings point, and reed and plane contact termination contact formula are adopted by mechanism.Need two groups of reeds whether to insert the location as the detecting storage card respectively in addition, and whether paste the anti-usefulness of writing the conduction paster.
The shortcoming of Smart Media interface is: one, must possess 22 groups of splicing ears in the mechanism, must possess the detecting location in addition and cause the connector cost higher with the anti-reed of writing the conduction paster, also take up space.Two, double setting before and after splicing ear is adopted, when planting or withdrawing from, first row's contact position can connect second row's splicing ear earlier, causes unsettled phenomenon when planting.Three, power supply connects signal VCC and GND all between two row's splicing ears, cross-section whole group of link position, wild effect such as short circuit between also easy terminal.Four, adopt the mode of labelling to distinguish whether anti-writing of storage card, need the anti-writing labels of the special conduction of Extra Supply, and its write-protection function is not direct protection memory card contents, and need be dependent on the anti-state of writing of electronic application device detecting identification.Five, adopt the entity addressing mode, can not directly support the linear logic addressing mode that General System adopts, increase the cost and exploitation degree of difficulty of electronic application device.Six, because of adopting the entity addressing mode, whenever Storage Media amplification capacity, promptly need the form in response to silicium wafer planning, revision new edition specification is with the bigger erasable formula silicium wafer of support capacity.
With regard to mmc card, its interface needs 7 windings point, and reed and plane contact termination contact formula are adopted by mechanism.Need one group of reed whether to insert the location in addition as the detecting storage card.
The shortcoming of MMC interface is: one, adopt tandem communication transmission mode, each clock pulse cycle is only transmitted 1 bit, and transfer rate is low.Two, adopt software Write-protection prevention pattern, need special software control, the safeguard function practicality is relatively poor.
With regard to the SD card, its interface needs 9 windings point, and reed and plane contact termination contact formula are adopted by mechanism.Need two groups of reeds whether to insert the location in addition as the detecting storage card, and the purposes of detecting Write-protection prevention slide position.
The shortcoming of SD card is: the Write-protection prevention slide block needs the electronic application device to detect its position, and supports write-protection function.
With regard to the MS card, its interface needs 10 windings point altogether, and reed and plane contact termination contact formula are adopted by mechanism.Connecting interface possesses the plug-in card detection signal, and storage card itself possesses anti-write switch, and storage card itself can be supported write-protection function and is its advantage.
The shortcoming of MS card is: one, adopt tandem communication transmission mode, each clock pulse cycle only can be transmitted 1 bit, and transfer rate is low.Two, adopt the entity addressing mode, can not support the linear logic addressing mode that General System adopts, increase the cost and the exploitation degree of difficulty of electronic application device.Three, because of adopting the entity addressing mode, whenever Storage Media amplification capacity, promptly need the form in response to silicium wafer planning, revision new edition specification is with the bigger erasable formula silicium wafer of support capacity.
Because numerous memory card standards are different separately, also each tool relative merits, and PC need expand the storage card electronic application device that is equipped with extra USB interface, pcmcia interface or ide interface, can reach the purpose of linking up the digital information of exchange with storage card, the inventor has the standard that proposes a more advanced novelty, overcomes above-mentioned many disappearances at one stroke, and concurrent exhibition: one, volume is littler, speed is faster, is more suitable for the portable digital device and uses; Two, the electronic application device need not be additionally expanded and personal computer system can be connected easily; Three, take into account the novel standard interface that IO uses advantage such as extendibility, and be referred to as multifunctional mini memory card interface.
Summary of the invention
Purpose of the present invention is for providing the means of communication between a kind of electronic installation and the multifunctional mini memory card, wherein this multifunctional mini memory card has the design of 4 pin positions and 8 pin positions simultaneously, can support traditional USB interface simultaneously, and defined communications protocol among the present invention, therefore applicable to computer equipment and multiple electronic application device.
The invention provides the means of communication between a kind of electronic installation and the multifunctional mini memory card for achieving the above object, electronic installation sees through the detailed description that the control end points is obtained storage card or IO card, understand the function of storage card and the setting of other communication end points, start the function of storage card, assign transfer instruction and transmission length, the control multifunctional mini memory card interface, adopt half-duplex, 4 bits are spreaded mode, one clock pulse signal is a benchmark, each clock pulse can transmit 4 bit information, with the Datagram is unit, is information transmission source or purpose with the communication end points of simulating in the storage card, carries out the transmission of data, wherein said control end points is the storage card of supporting multifunctional mini memory card interface or one group of communication end points that the IO card is supported at least, and its end points address is 0.
The present invention also provides a kind of multifunctional mini memory card slot, design with 4 pin positions and 8 pin positions, wherein the design of 4 pin positions is the USB interface that are used in basic, 8 pin positions be designed for the SFMI interface, the SFMI interface of 8 pin positions has four pins to be same as 4 pin positions of USB interface, and four pins then are distributed between the four pin positions of this USB interface in addition.This slot is divided into male plug groove and female plug groove.
It is that data-switching is become the multifunctional mini memory card communications protocol that the present invention also provides a kind of formatter (formatter), after wherein data are exported by storer, promptly be formatted into the communication Datagram that meets the multifunctional mini memory card communications protocol, this Datagram comprises initial bit, the package identification code, the communication end points, data length, useful data, package status code, data formats finishes bit.
The present invention also provides a kind of format converter (format converter) to convert the USB Datagram to the multifunctional mini memory card communications protocol, the USB Datagram separated seal, data layout with gained changes into the communication Datagram that meets the multifunctional mini memory card communications protocol then, and the Datagram of this multifunctional mini memory card communications protocol comprises initial bit, the package identification code, the communication end points, data length, useful data, package status code, data formats, and finish bit.
Description of drawings
Fig. 1 is the basic framework of the read-write equipment of multifunctional mini memory card interface of the present invention and butt joint;
Fig. 2 is the definition and the function of each pin of SDM interface among the present invention;
Fig. 3 is the basic structure of master controller among the present invention;
Fig. 4 A is the arrangements of components figure of circuit for detecting of the present invention for the state of butt joint SDM interface;
Fig. 4 B is the arrangements of components figure of circuit for detecting of the present invention for the state of butt joint USB interface;
Fig. 5 is the content of package identification code among the present invention;
Fig. 6 is the data structure of package identification code among the present invention and the graph of a relation of this data structure and clock pulse;
Fig. 7 is the data structure of communication end point among the present invention and the graph of a relation of this data structure and clock pulse;
Fig. 8 is the data structure of data length among the present invention and the graph of a relation of this data structure and clock pulse;
Fig. 9 is the data structure of data transmission sequence among the present invention and the graph of a relation of this data structure and clock pulse;
Figure 10 is the data structure of bug check sign indicating number among the present invention and the graph of a relation of this data structure and clock pulse;
Figure 11 is the data structure of package status code among the present invention and the graph of a relation of this data structure and clock pulse.
Embodiment
Multifunctional mini memory card of the present invention is mainly divided into two kinds, and first kind based on store digital information function, and second kind to support other IO functions.Two kinds of functions must possess: one, support the master controller 220 of multifunctional mini memory card interface, store digital information function is provided, its master controller 220 must possess the control interface that can repeat erasable formula non-volatility memorizer in addition; IO is provided function, and its master controller 220 must possess the control interface that can support the IO functional module group in addition.Two, provide store digital information function, must possess a high capacity and repeat erasable formula non-volatility memorizer storage module, with the store digital information; IO is provided function, must possesses the IO functional module group of a support IO function.
Multifunctional mini memory card of the present invention as shown in fig. 1, wherein this multifunctional mini memory card 200 comprises a storage card I/O functional module group 210, one master controllers 220, and a storer 230.Through integrating apparatus after on the printed circuit board (PCB), on printed circuit board (PCB) and the multifunctional mini memory card interface terminal is provided, outside being exposed to, with coupling arrangement electronics 100.Last and add the shell of plastic rubber ejaculate molding in the circuit board of the complete electric function of this own tool, assembling becomes complete multifunctional storage card or IO card.
The electronic application device 100 inclusion device modules 110 that dock with this multifunctional mini memory card.Format converter 120, device I/O 130.
This storage card I/O functional module group 210 is data input and the functional module group of output and the circuit structures that comprise the binding terminal and be correlated with thereof that are used for storage card.Multifunctional mini memory card of the present invention can be supported the SFMI interface of USB interface and the present invention's definition simultaneously.Wherein this terminal has the design of 4 pin positions and 8 pin positions.
The design of 4 pin positions is the USB interface that are used in basic; it comprises a VCC pin position is the pin position that provides direct supply to give multifunctional mini memory card of the present invention by the device end that docks; so that multifunctional mini memory card is energized; one GND (grounding leg position); be the usefulness that ground protection and reference potential are provided for design of the present invention; two pin positions are respectively D+ and D-pin position in addition, are data transmission pin position.
Multifunctional mini memory card interface of the present invention is the design of one 8 pin positions, by the two-way instruction/data of 4-bit/status bus (D0-D3), clock pulse synchronizing signal (CLK), system interface and storage card plant detection signal (CD), and power supply pin (VCC) and grounding leg position (GND) form, altogether need 8 windings point only.The Write-protection prevention function is selected by the built-in Write-protection prevention switch switching position of multifunctional mini memory card, and by interface communication notice electronic application device 100.Wherein this VCC is a DC power supply contact, is to be used to provide the DC electric current to give multifunctional mini memory card, with this multifunctional mini memory card of energizing; GND is a ground contact, is to be used to provide contact protection and reference potential; The synchronous clock signal of CLK, provide synchronous clock pulse for output and input data, so that the sequential of data-signal is rebuild and the usefulness of signal alignment, BD_CD is system interface and storage card plant detection signal, be to be used for detecting input and output data is to be the USB interface signal, also or the SFMI interface signal.D0 is two-way instruction/data/status bus signal bit0, in the work of USB pattern, is the D-signal wire; D1 is two-way instruction/data/status bus signal bit1, in the work of USB pattern, is the D+ signal wire; D2 is two-way instruction/data/status bus signal bit2, in the work of USB pattern, does not have this signal wire; And D3 is two-way instruction/data/status bus signal bit3, in the work of USB pattern, does not have this signal wire.
Can understand SFMI interface of the present invention and shared four contacts of USB interface basically by explanation above.Be VCC, GND, D-(D0) and D+ (D1).The present invention also comprises CLK in addition, BD_CD, four contacts of D2 and D3.So in the connected structure design of (comprise and insert terminal and slot), can between four contacts of original USB interface, arrange four contacts in addition, and make that the connected structure of SFMI interface of the present invention can be shared with the connected structure of USB interface, and need not dispose different connected structures separately.
Another characteristics of this interface then are D0 and two groups of signal wires of D1 in the 4 bit bidirectional buses, when electronic application device 100 adopts USB interface to connect storage card, change and adopt the USB interface pattern.And become required D+ of USB interface and D-signal wire.And support the communication mode of standard USB interface, being able to need not any extra electron application apparatus 100, can be installed on PC or support the digital device of USB system interface.
The present invention also provides a kind of multifunctional mini memory card slot, design with 4 pin positions and 8 pin positions, wherein the design of 4 pin positions is to be used for basic USB interface, 8 pin positions be designed for the SFMI interface, the SFMI interface of 8 pin positions has four pins to be same as 4 pin positions of USB interface, and four pins then are distributed between the four pin positions of this USB interface in addition.This slot is divided into male plug groove and female plug groove.
See also Fig. 3, master controller 220 of the present invention comprises four assemblies, and an I/O controller 221, one Memory Controllers 222, one formatters 223 reach one and separate formatter 224.Wherein this I/O controller 221 is to be used for control store card I/O functional module group 210, and comprising this storage card of decision I/O functional module group 210 is with the input pattern operation or with the output mode operation, or with SFMI interface or the operation of USB interface pattern etc.222 of this Memory Controllers are used for control store 230, and formatter 223 reaches one and separates the format conversion that 224 of formatters carry out USB interface signal and SFMI interface signal, to cooperate the operator scheme of storage card I/O functional module group 210.Relevant for formatter 223, and separate formatter 224 action this will be in hereinafter being illustrated.
System interface and storage card plant detection signal:
Storage card plant detection signal, control signal is gone in the multi-functional output that is connected internally to control wafer in storage card, then is connected to power supply through a resistance in electronic application device 100 ends of supporting multifunctional mini memory card interface.Then do not connect this signal in the interface of supporting the USB system end, reaching the system interface that multifunctional storage card can adopt by this signal detection electronic application device 100, and electronic application device 100 also can utilize this signal to reach whether the plant function of location of detecting mini memory card.
The interface circuit for detecting of this storage card I/0 functional module group comprises a power supply 310, one BD input sense terminal 320, one CD output sense terminal 330, one first diodes 360, one second diodes 370, one first resistance 340, and one second resistance 350.
Via the appearance of detecting system interface and storage card plant detection signal (BD_CD) whether and the decision insertion end is USB interface or SFMI interface the function of this storage card I/O functional module group be.
Mini memory card is inserted in the electronic application device 100 of supporting mini memory card interface, no matter all continue power supply because whether electronic application device 100 mini memory cards are planted, mini memory card is when starting, should at first keep the CD signal is high impedance status, in order to avoid influence BD_CD signal detection inspection action.Check the state of BD_CD signal then immediately.If the BD_CD signal condition is noble potential, promptly the representative system end is supported mini memory card interface, and enters the mini memory card interface pattern, and to drive output CD signal immediately be electronegative potential, the notice electronic application device 100 mini memory cards location of having planted; Otherwise, if the BD_CD signal is low electric married couple, represent that then system end does not see through resistance with the BD_CD signal and is connected to power supply, USB interface is supported in representative, and enters the USB interface pattern.
In the circuit shown in Fig. 4 A, Fig. 4 B, the VCC contact links power supply 310, system interface and storage card plant detection signal BD_CD first diode 360 through forward linking links BD input sense terminal 320, and link this CD output sense terminal through contrary second diode 370 that links, and system interface and storage card plant detection signal BD_CD link earth terminal GND with one second resistance, link this first resistance between this VCC and system interface and the storage card plant detection signal.First resistance is that the 10K Ω and second resistance are 100K Ω in the drawings, and it is a preferred embodiment of the present invention, and other suitable numerical value also can be used in the present invention, and is not subject to the preferred embodiment in graphic.The function of this first resistance and second resistance is BD_CD and VCC are boosted so that the circuitry needed action to be provided.
When USB interface was inserted this multifunctional mini memory card, with reference to figure 4A, then first diode 360 was conducting, and made 320 conductings of BD input end, therefore can know that the interface of insertion is the SFMI interface.Otherwise when system interface and storage card plant detection signal BD_CD did not import, the 360 not conductings of first diode were the USB interface signal so learn the signal of input.
Otherwise under output mode, when the signal of output is the SFMI interface signal, 370 conductings of second diode, the signal of output is the SFMI interface signal, otherwise is the USB interface signal.
The explanation of multifunctional mini memory card communications protocol:
Multifunctional mini memory card interface adopts half-duplex, and 4 bit crossfire modes are benchmark with the CLK signal, and each clock pulse can transmit 4 bit information.The information transmission mode is by the master control of electronic application device, and after assigning transfer instruction and transmitting length, the decision data stage is transmitted length.For improving the application of this interface, reach and simplify overal system design, the interface transmission is a unit with Datagram (packet).And its communications protocol is the source (source) or the target (sink) of information transmission with the communication end points (endpoint) of simulating in the storage card.
The storage card or the IO card of all supports " function mini memory card interface " all need be supported one group of communication end points at least, are called " control end points " (Control Endpoint), and its end points address is 0.The electronic application device is seen through the detailed description that this control end points is obtained storage card or IO card, knows the setting of its function and other communication terminal points.And after carrying out suitable the setting, start its function, and carry out the transmission of data.
(1) initial bit/end bit-Start bit/End bit
When electronic application device and storage are stuck in the transmission of startup data, must produce a clock pulse cycle D0-D3 foremost in Datagram and be 0 initial bit, additional two clock pulse cycle D0-D3 are 1 end bit in the Datagram least significant end.
(2) package identification code-Packet Identifier (PID)
Please refer to Fig. 5, the self-styled packet identifier of communication package (PID) beginning, and look identification code kind difference, must be applied to different occasions.Each group Datagram contains: 1. package identification code: indicate the direction of package transmission data, Transport endpoint address, and data length; 2. useful data includes one group of CRC data error detection code; 3. whether package status code receives a side of useful data, pass accepting state affirmation data back and correctly receive.Package identification code 0001 indicates the transmission that the electronic application device will carry out data output.Package identification code 1001 indicates the electronic application device will carry out the transmission of data input.Package identification code 1101 indicates the electronic application device will be provided with or obtain relevent information at the control end points.Package identification code 0010 indicates the information receiving terminal and confirms that the Datagram receipts are appropriate.Package identification code 1010 indicates the information receiving terminals temporarily can't receive information, or spreads out of end and temporarily can't spread out of information.Package identification code 1110 indicates the communication end points and quits work, or the control end points is not supported this steering order.
The PID identification code adds up to 4 bits, for anti-communication error, gives retroactive addition 4 bits, forms to add up to 8 bits to arrange in the ascending power mode, finishes transmission at twice in two groups of clock pulses.As shown in Figure 6.Receiving end is received correct complete PID and PID ', and PID=(PID ') ' confirm that promptly the PID that receives of institute is correct.
(3) communication end points-EndDoint
The communication end points is that the mini memory card or the IO card of supporting mini memory card interface carry out the base unit that data is transmitted with the electronic application device.Corresponding indivedual communication end points in mini memory card or IO card, possesses the data buffer zone of specified vol size, as the usefulness of communication package institute useful data between temporary transient store electrons application apparatus and the mini memory card.
Support the mini memory card or the IO card of mini memory card interface, the highest 16 groups of communication end points, the object that transmits with the communication end points address specified packet in the communication package respectively of supporting.
Support the mini memory card or the IO card of mini memory card interface, must possess one group of communication end points at least, its address is set at 0.The electronic application device can see through the relevent informations such as identification code, functional form, support communication terminal number of spots, each communication end points address and communication end points form that communication end points 0 be obtained relevant mini memory card after detecting the mini memory card plant through mini memory card interface.
The communication end points is divided into following four kinds, is applicable to the data transmission of carrying out different kenels between electronic application device and mini memory card or the IO card respectively.
It is 0 control end points that control end points-mini memory card and IO card must possess one group of end points address.The function of control end points is to allow that electronic application is installed on when starting mini memory card, obtains the relevent informations such as identification code, functional form, support communication terminal number of spots, each communication end points address and communication end points form of mini memory card.
Data input end points-be used to allow that the electronic application device is from small-sized storage card or IO card input great mass of data.
Data exit point-be used to allow that the electronic application device exports great mass of data to mini memory card.
State interrupt input endpoint-be used to allow that mini memory card or the setting of IO card require the gap periods of electronic application device to set repeats to interrupt the input information from small-sized storage card or IO card input state.
As shown in Figure 7, transmission indicates package by indicating the communication end points, specifies the communication end points of follow-up Datagram or state package correspondence.The communication end points indicates in the package in transmission, and with 4 bits, and then PID back Maitong in the time of is interim finishes transmission.
(4) data length-Data Length
As shown in Figure 8, behind ENDP, transmit the DATL that 12 bits are represented DATA length in the cycle with 3 clock pulses.DATL is a unit with 1 bit group, and 0x000 represents 4096 bit groups, and minimum value is that 0x001 represents 1 bit group.
(5) useful data-Payload Data
The data of package actual bearer (PDAT), and transfer to the information of communication end points.DATL sets useful data length.During transmission, each tuple is respectively at 2 clock pulses end of transmission in the cycle.Transmission direction is installed in the package identification code by electronic application and specifies.As shown in Figure 9, useful data adds the CRC16 bug check sign indicating number in 16 clock pulse cycles at last.Wherein, the algorithm of CRC16 further can be the deconv 2 complementation divisions with G (X)=X16+X15+X2+1 form for removing 2 complementation divisions.The data transmission sequence as shown in Figure 10.
(6) package status code-Packet Status Acknowledge
By a side of the data of reception, after useful data receives, confirm whether check code meets, confirm according to reception result whether the reception data is correct then.If correctly finish reception, then pass ACK back, if temporarily can't finish reception, or the check code display data is wrong, then passes NAK back and requires to retransmit, if storage card inside makes a mistake, or the execution command result makes a mistake, and then passes STALL back.As shown in Figure 11.
(7) data formats
All communication packages start to transmit by electronic application device 100 (system end), and the order of Datagram is initial bit in regular turn, the package identification code, and the communication end points, data length, useful data, the package status code, data formats finishes bit.Produce package identification code, designated communication end points and data length by the transmission of system end startup data.
If package belongs to the IN package, after device end is received above-mentioned information,, can respond unit state sign indicating number NAK if fail to produce immediately required data, system end is ended subsequent transmission immediately, and can restart the data transmission immediately, and trial once again obtains Datagram.If device end can be responded required information, then device end produces initial bit, and and then begins to pass back shared information of depositing in the device internal communication end points, after waiting to satisfy the data length of system end requirement, adds the crc check sign indicating number of 16 bits immediately.After system end is received check code, confirm errorlessly on inspection, can pass ACK back.If data is wrong, then passes NAK back, and can restart package, to obtain correct data.
If package belongs to OUT or SETUP package, system end begins to import into the data imported into intended immediately after finishing package identification code, communication end points address, data length, wait to reach the data length that the system end requirement imports into after, the crc check sign indicating number of additional 16 bits immediately.After device end is received check code, confirm errorlessly on inspection, can pass ACK back.If data is wrong, then passes NAK back, and whether restart package, to obtain correct data by system end master control decision.
(8) control transmission pattern
Electronic application device 100 can see through the control transmission pattern, and Yu She Transport endpoint 0 is obtained the information relevant with multifunctional storage card certainly, or sets its correlation function.The control transmission pattern is divided into SETUP stage, DATA stage, STATUS stage, and its form is as follows:
In the SETUP stage, system end is sent the SETUP package, comprise SETUP package identification code, communication end points address is 0, data length is 8 bit groups, then send SETUP instruction code and the parameter and the 2 bit group CRC16 of 8 bit groups, pass status code back by device end at last and confirm whether package receives normally by system and device.
In the instruction and parameter of 8 bit groups, begin from the first bit group, respectively representative: bmRequestType, bRequest, wValue, wIndex, wLength etc., its definition and purposes see also the USB standard.Wherein the meaning of each parameter can be referring to the control transmission data formats table in the table one:
The skew address The field title (bit group) takes up room Setting value Explanation
0 bmRequestType 1 Bit value Instruction type: D7: data transmission direction 0=read-write equipment exports mini memory card 1=mini memory card to and exports read-write equipment D6...5 to: instruction type
The exclusive special instruction 3=of the exclusive instruction of 0=stereotyped command 1=device classification 2=manufacturer keeps D4...0: other 4...31=of the 1=interface of instruction destination object 0=device 2=communication end points 3=own keep
1 bRequest 1 Setting value Setting command code (code is consulted table two)
2 wValue 2 Setting value Possess the setting value of different meanings according to the different instruction code, length is two bit groups
4 wIndex 2 Setting value Possess the setting value of different meanings according to the different instruction code, be used to specify index value or off-set value
6 wLength 2 Numerical value Set data length
Table one control transmission data formats table
Except that the stereotyped command sign indicating number, device exclusive instruction of classification and the exclusive special instruction of manufacturer are looked it by individual device and are used, or formulate voluntarily by manufacturer.Support the mini memory card or the IO card of mini memory card standard interface and all must support the stereotyped command sign indicating number.The definition of stereotyped command sign indicating number sees also following table:
bmRequest Type bRequest wValue wIndex wLength Data
00000000B 00000001B 00000010B CLEAR_FEATURE Feature Selector 0 0 Do not have
1000000B GET_ CONFIGURATION 0 0 1 Configuration setting
1000000B GET_DESCRIPTOR First kind and index value are described 0 or language codes First length is described First data is described
10000001B GET_STATUS 0 0 interface code end points sign indicating number 2 Acquisition device, interface or transmission ends point-like
Attitude
0000000B SET_ADDRESS The device address 0 0 Do not have
0000000B SET_ CONFIGURATION Configuration setting 0 0 Do not have
0000000B SET_ DESCRIPTOR First kind and index code are described 0 or language codes First length is described Unit is described
00000000B 00000001B 00000010B SET_FEATURE Feature Selector 0 interface code end points sign indicating number 0 Do not have
00000001B SET_INTERFACE Alternate Setting Interface code 0 Do not have
Table two stereotyped command code table
In the data stage, look bRequest code and wLength, determine the direction and the length of follow-up data stage transmission.And start according to physical data transmission operation by system end and to carry out, transmission length is set according to wLength.
In state phase, after the data stage finished, whether the direction of looking the data stage to transmit the result correct if being passed status code affirmation data back by a side of the data of reception.
(9) application of multifunctional mini memory card interface
Multifunctional mini memory card interface is applicable to the application of different purposes, and the aforementioned definition of only containing physical layer does not limit its application.Formulate instruction set and the communications protocol that is suitable in replenishing, promptly can be applicable to storage device, communication device, or other applications that are suitable for.

Claims (45)

1. the means of communication between electronic installation and the multifunctional mini memory card: wherein, this multifunctional mini memory card has the design of 4 pin positions and 8 pin positions simultaneously, wherein 4 pin positions is designed for basic USB interface, another interface of multifunctional mini memory card is the design of one 8 pin positions, be called the SFMI interface, by the two-way instruction/data of 4 bits/state bus-bar, the clock pulse synchronizing signal, system interface and storage card plant detection signal, and power ground is formed, wherein power pin and ground connection pin are same as power pin and the ground connection pin in the USB interface, and this method comprises:
Electronic installation sees through the detailed description that the control end points is obtained storage card or IO card, understand the function of storage card and the setting of other communication end points, start the function of storage card, assign transfer instruction and transmission length, the control multifunctional mini memory card interface, adopt half-duplex, 4 bits are spreaded mode, with the clock signal is benchmark, and each clock pulse can transmit 4 bit datas, is unit with the Datagram, with the communication end points of simulating in the storage card is data transmission source or purpose, carry out the transmission of data, wherein said control end points is for supporting one group of communication end points of storage card or IO card, and described storage card or IO card are supported multifunctional mini memory card interface;
When the appearance of detecting system structure and storage card plant detection signal, conclude that then insertion end is the SFMI interface, otherwise be USB interface.
2. the means of communication according to claim 1 is characterized in that: the order of Datagram is initial bit in regular turn, the package identification code, and the communication end points, data length, useful data, the package status code, data formats, and finish bit.
3. the means of communication according to claim 1 and 2 is characterized in that: Datagram produce foremost one a clock pulse in the cycle 4 bits be 0 initial bit.
4. the means of communication according to claim 1 is characterized in that: additional long two clock pulse cycles of Datagram least significant end and D0-D3 are 1 end bit.
5. the means of communication according to claim 1 is characterized in that: the self-styled packet identifier of Datagram begins, and according to identification code kind difference, must be applied to different occasions, and each group Datagram contains:
Package identification code: indicate the direction of package transmission data, Transport endpoint address, and data length;
Useful data includes one group of CRC data error detection code, and the package status code, receives a side of useful data, passes accepting state back and confirms whether data is correctly received.
6. the means of communication according to claim 1, it is characterized in that: the package identification code adds up to 4 bits, is anti-communication error, is added 4 reverse bits of bit ordering, form total 8 bits and arrange, in two groups of clock pulses, finish transmission at twice in the ascending power mode.
7. the means of communication according to claim 5 is characterized in that: the package identification code indicates the transmission that the electronic application device will carry out data output.
8. the means of communication according to claim 7 is characterized in that: the package identification code is 0001.
9. the means of communication according to claim 5 is characterized in that: the package identification code indicates the electronic application device will carry out the transmission of data input.
10. the means of communication according to claim 9 is characterized in that: the package identification code is 1001.
11. the means of communication according to claim 5 is characterized in that: the package identification code indicates the electronic application device will be provided with or obtain related data at the control end points.
12. the means of communication according to claim 11 is characterized in that: the package identification code is 1101.
13. the means of communication according to claim 5 is characterized in that: the package identification code indicates the data receiving terminal and confirms that the Datagram receipts are appropriate.
14. the means of communication according to claim 13 is characterized in that: the package identification code is 0010.
15. the means of communication according to claim 5 is characterized in that: package identification code sign data receiving terminal temporarily can't receive data or spread out of end and temporarily can't spread out of data.
16. the means of communication according to claim 15 is characterized in that: the package identification code is 1010.
17. the means of communication according to claim 5 is characterized in that: the package identification code indicates the communication end points and quits work, or the control end points is not supported this steering order.
18. the means of communication according to claim 17 is characterized in that: the package identification code is 1110.
19. the means of communication according to claim 5, it is characterized in that: transmission indicates package and indicates the communication end points, specifies the communication end points of Datagram or state package correspondence, and the communication end points indicates in the package in transmission, with 4 bits, and then the PID back is finished transmission at a clock pulse in the cycle.
20. the means of communication according to claim 5, it is characterized in that: corresponding indivedual communication end points, the data buffer zone that possesses the specified vol size in small-sized note storage card or IO card is as the usefulness of communication package institute useful data between temporary transient store electrons application apparatus and the mini memory card.
21. the means of communication according to claim 5 is characterized in that: support the mini memory card or the IO card of mini memory card interface, the highest 16 groups of communication end points, the object that transmits with the communication end points address specified packet in the communication package respectively of supporting.
22. the means of communication according to claim 5, it is characterized in that: the mini memory card or the IO card of supporting mini memory card interface, at least must possess one group of communication end points, its address is set at 0, the electronic application device can see through identification code, functional form, support communication terminal number of spots, each communication end points address and the communication end points form related data that communication end points 0 be obtained relevant mini memory card after detecting the mini memory card plant through mini memory card interface.
23. the means of communication according to claim 5, it is characterized in that: the communication end points comprises the control end points, be that mini memory card and IO card must possess one group of control end points, the function of control end points is to allow that electronic application is installed on when starting mini memory card, obtains identification code, functional form, support communication terminal number of spots, each communication end points address and the communication end points form related data of mini memory card.
24. the means of communication according to claim 5 is characterized in that: the communication end points comprises the data input end points, is to be used to allow that the electronic application device is from small-sized storage card or IO card input great mass of data.
25. the means of communication according to claim 5 is characterized in that: the communication end points comprises the data exit point, is to be used to allow that the electronic application device exports great mass of data to mini memory card.
26. the means of communication according to claim 5, it is characterized in that: the communication end points comprises the state interrupt input endpoint, be to be used to allow that mini memory card or the setting of IO card require the gap periods of electronic application device to set, repeat to interrupt input data from small-sized storage card or IO card input state.
27. the means of communication according to claim 1 is characterized in that: transmit 12 bit representative transmission data lengths in the cycle with 3 clock pulses.
28. the means of communication according to claim 27 is characterized in that: the transmission data length is a unit with 1 bit group, and maximum length is 4096 bit groups, and minimum length is 1 bit group.
29. the means of communication according to claim 1 is characterized in that: package actual bearer data, and transfer to the communication end points, each tuple is respectively at 2 clock pulses end of transmission in the cycle, and transmission direction is installed in the package identification code by electronic application and specifies.
30. the means of communication according to claim 29 is characterized in that: the last additional error check code of useful data.
31. the means of communication according to claim 30 is characterized in that: the bug check code length is 16 clock pulse cycles.
32. the means of communication according to claim 31 is characterized in that: mistake is picked up the algorithm of looking into sign indicating number and is adopted except that 2 complementation divisions, and it comprises deconv 2 complementation divisions.
33. the means of communication according to claim 1 is characterized in that: by a side of the data of reception, after useful data receives, confirm whether check code meets, confirm according to reception result whether the reception data is correct then,, then pass back and receive no error signal if correctly finish reception.
34. the means of communication according to claim 1 is characterized in that: receive a side of data if temporarily can't finish reception, or the check code display data is wrong, then passing back to receive has problem signals, requires to retransmit.
35. the means of communication according to claim 1 is characterized in that: receive a side of data, if storage card inside makes a mistake, or the result that executes instruction makes a mistake, and then passes the instruction errors signal back.
36. the means of communication according to claim 1 is characterized in that: also comprise a control transmission pattern, be to obtain the data relevant, or set its correlation function with multifunctional storage card from default Transport endpoint.
37. the means of communication according to claim 36 is characterized in that: the control transmission pattern is divided into setting stage, data phase, state phase.
38. according to the described means of communication of claim 37, it is characterized in that: in the setting stage, system end is sent the SETUP package, comprise SETUP package identification code, communication end points address, and data transmission are then sent the SETUP instruction code by system and device, parameter and CRC pass status code back by device end at last and confirm whether package receives normally.
39. according to the described means of communication of claim 38, it is characterized in that: data length is 8 bit groups, and SETUP instruction code and parameter are 8 bit groups, and CRC is 2 bit group CRC16.
40., it is characterized in that: in instruction and parameter, comprise instruction type, also comprise according to the described means of communication of claim 39:
The data transmission direction has the electronic application device and exports mini memory card and mini memory card to electronic application device two directions;
Instruction type contains stereotyped command, the exclusive instruction of device classification, and the exclusive special instruction of manufacturer, and keep;
The instruction destination object contains device itself, interface, and the communication end points, and other; And keep.
41., it is characterized in that: in instruction and parameter, comprise the setting command code according to the described means of communication of claim 39.
42., it is characterized in that: in instruction and parameter, comprise the parameter that possesses the setting value of different meanings according to the different instruction code according to the described means of communication of claim 39.
43. according to the described means of communication of claim 39, it is characterized in that: in instruction and parameter, comprising the parameter that possesses the setting value of different meanings according to the different instruction code, is to be used to specify index value or off-set value.
44., it is characterized in that: in instruction and parameter, comprise the parameter of set data length according to the described means of communication of claim 39.
45. according to the described means of communication of claim 37, it is characterized in that: in state phase, after the data stage finishes, look the direction in data stage, whether passing status code affirmation data back by a side of the data of reception, to transmit the result correct.
CNB021429375A 2002-09-16 2002-09-16 Multi-function small memory card communication protocol Expired - Fee Related CN100426278C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021429375A CN100426278C (en) 2002-09-16 2002-09-16 Multi-function small memory card communication protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021429375A CN100426278C (en) 2002-09-16 2002-09-16 Multi-function small memory card communication protocol

Publications (2)

Publication Number Publication Date
CN1484161A CN1484161A (en) 2004-03-24
CN100426278C true CN100426278C (en) 2008-10-15

Family

ID=34148138

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021429375A Expired - Fee Related CN100426278C (en) 2002-09-16 2002-09-16 Multi-function small memory card communication protocol

Country Status (1)

Country Link
CN (1) CN100426278C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1831851A (en) * 2004-09-07 2006-09-13 瑞程科技股份有限公司 Interface for a removable electronic device
TWI553488B (en) * 2015-01-27 2016-10-11 Richtek Technology Corp USB-C type cable and method for reading and writing the same

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6247078B1 (en) * 1997-10-14 2001-06-12 International Business Machines Corporation Computer interface for integrating a first computer into a second computer
US6385677B1 (en) * 1999-11-22 2002-05-07 Li-Ho Yao Dual interface memory card and adapter module for the same
US6418501B1 (en) * 1998-07-29 2002-07-09 Fujitsu Limited Memory card

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6247078B1 (en) * 1997-10-14 2001-06-12 International Business Machines Corporation Computer interface for integrating a first computer into a second computer
US6418501B1 (en) * 1998-07-29 2002-07-09 Fujitsu Limited Memory card
US6385677B1 (en) * 1999-11-22 2002-05-07 Li-Ho Yao Dual interface memory card and adapter module for the same

Also Published As

Publication number Publication date
CN1484161A (en) 2004-03-24

Similar Documents

Publication Publication Date Title
US6745267B2 (en) Multi-functional mini-memory card suitable for SFMI and USB interfaces
CN101046855B (en) Interface for removable electrical card
US7219846B2 (en) Circuit module and memory card kit compliant with various access protocols
CN100421093C (en) External storage device
US7809866B2 (en) Double interface SD flash memory card
US7209995B2 (en) Efficient connection between modules of removable electronic circuit cards
US20110320713A1 (en) Smartconnect Flash Card Adapter
US7171502B2 (en) USB system having card-type USB interface connector
EP1403814B1 (en) Electronic apparatus, information processing apparatus, adapter apparatus, and information exchange system
US20040029407A1 (en) Combined flash memory card driver
CN100426278C (en) Multi-function small memory card communication protocol
CN1198196C (en) Multifunctional mini memory card interface adaptable for USB port
CN2590061Y (en) Multifunctional small-sized storing card and slot
US20070174516A1 (en) Adaptor
CN101968723A (en) Storage control system and method
US7137564B2 (en) Communication protocol for multi-functional mini-memory card suitable for small form memory interface and usb interfaces
CN1212558C (en) Double-interface SD memory card
CN212229622U (en) Navigation module testing device and system
CN2567638Y (en) Multifunction read-write apparatus of computer
KR100882207B1 (en) Memory card including connector for other memory card independently interfacing host using MMC protocol
CN202217266U (en) Memory control system
WO1991007753A1 (en) In-circuit programming of integrated circuits
CN113849444B (en) PCI bus system for industrial control system
KR20010095787A (en) Multi-interface memory card and adapter module for the same
CN106713521B (en) method for searching I2C equipment address based on broadcasting mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081015

Termination date: 20130916