[embodiment]
Below in conjunction with accompanying drawing most preferred embodiment of the present invention is done step detailed description.
A kind of full electronic flash outer storage method comprises and uses dc power supply and use storage medium, it is characterized in that:
Described storage medium is a flash memory, and:
1. used whole devices and circuit board all consist of a single part;
2. use software-driven to realize external memory function (replacement phisical drive);
3. all parts are fully static in storing process.
Described full electronic flash outer storage method comprises the information exchanging channel of setting up between data handling system main frame and the external memory device, the access approach of power supply, set up external memory physical medium and interior data method for organizing, the method of on outer storage medium, reading and writing, explanation and manner of execution to the reading and writing command format, the method that information transmits between data handling system main frame and the external memory device, the installation of external memory device driver (Driver), and the information exchange method between described host operating system and this driver.
Described full electronic flash outer storage method also is included in direct control electronic storage medium that is provided with in the described full electronic quickflashing external memory device and the solidification software of realizing the interface standard function.This solidification software is arranged in the microprocessor, software flow work according to solidification software, when inserting described full electronic quickflashing external memory device, cooperate driver to finish the initialization of this device, and, carry out the operation of interface standard operation or external memory special instruction by the requirement of operating system or driver.
Described driver is according to the software flow work of driver, when inserting described full electronic quickflashing external memory device, cooperate solidification software to finish the initialization of this device, and the notifying operation system produces and show the device symbol of external memory device.The operation requests that this driver also wants the complete operation system to send to external memory device; Now, this operation requests mainly is the disk operating form, need convert the special operational instruction of full electronic quickflashing external memory device through driver to, and packs according to the form of general channels standard code, is sent to described solidification software and carries out.Driver also will be finished plug and play and operate with system coordination.In case external memory device is pulled out, driver meeting notifying operation system cancels the device symbol of this external memory device.
Described full electronic flash outer storage method is applicable to that the data of all support general channels are in system and wrap following content:
Information exchanging channel between described data handling system main frame and the described external memory device is a general channels, need not establish interface card in addition, and not have huge driver, does not have the mechanical rotation part, and is in light weight, start soon, but plug and play.Described external memory device working power inserts from described general channels; Dispense with outer connecting power, easy to use.
What adopt at present is general channels USB (USB (universal serial bus)); USB is the international standard of new computer peripheral equipment interface, can be used for replacing traditional parallel port, serial ports, keyboard and mouse mouth etc., and its objective is to all computer peripheral equipments provides unified interface, improve transmission speed, increase attachable number of devices, add longer transmission distance, with the Portable computer user.Have at present many peripheral hardwares as: scanner, printer, digital camera and keyboard, mouse etc. have adopted USB interface.
The storage medium of described external memory device is a flash memory, and this flash memory is a kind of jumbo electronic type storage chip, and volume is little, speed is fast, and data can be read and write at random or in proper order, and can wipe; Wiping with piece (BLOCK) is unit operation, and erasing times can reach more than 1,000,000 times.The data retention of flash memory is good, write the back do not adding under the power supply situation, can preserve 10 years or more than.And this flash memory also has characteristics, if comprise valid data in the memory block of operation, then must wipe this memory block in advance, just can write new data then.The complexity that this becomes write operation, but are advantages to the preservation of valid data.With the external memory device that flash memory design becomes, generally be more than 5-6 times of floppy disk capacity, this flash memory devices internal data is by single block mode tissue; Adopting effective storage capacity 8K Byte, 16K Byte even effective storage capacity 128KByte at present is a piece.Along with the progress of flash memory technology, can adopt bigger piece to constitute external storage for the basis.
The described method of reading to this external memory device may further comprise the steps:
A. upper strata operating system is accepted user's read command; Its command format is the disk commands of being familiar with now;
B. operating system sends to driver with described read command;
C. driver read operation command conversion that disk operating is used becomes solidification software can understand the special read operation that also can carry out to instruct, and sends underlying operating system to;
D. the read operation instruction after underlying operating system will be changed sends described solidification software to through the general channels control circuit;
E. this solidification software is carried out read operation, and result and state are sent back driver through operating system.The described method of writing to this external memory device may further comprise the steps:
A. operating system is accepted user's write order; Its command format is the disk commands of being familiar with now;
B. operating system sends to driver with described write order;
C. driver judges whether full electronic quickflashing external memory device has write-protect; No write-protect is then down carried out;
D. driver is converted to a plurality of special operationals instructions that solidification software can be understood and carry out with the write order of disk operating use, and sends underlying operating system one by one to;
E. the operational order after underlying operating system will be changed sends described solidification software to through the general channels control circuit;
F. solidification software carries out read operation by the read operation instruction to the storage area of desiring to write, and sends the data of reading to driver through operating system;
G. solidification software carries out erase operation by erase operation instruction to this storage area again, and will wipe the result and send back driver through operating system;
H. driver is integrated the data of reading with the data of desiring to write, and data after will integrating then and write operation instruction send to described solidification software, and the data after will being integrated by solidification software write back described storage area again;
I. result and state after solidification software will write send back driver through operating system.
Information transferring method between described data handling system and this external memory device, do not adopt the inner self-defining information transferring method of special purpose interface, and the method for normalizing of employing general channels prescribed by standard, after the information package of tendency to develop being readed aloud according to communications protocol respectively by the driver at general-purpose interface two ends and solidification software, be sent to the other side again.
The working power of described external memory device inserts from usb bus, rather than from the system power supply access via telephone line.Save socket space, make things convenient for plug and play.
In other embodiments, can select general channels IEEE1394 bus switch information between data handling system main frame and the described external memory device for use.At this moment described external memory working power inserts from the IEEE1394 bus.Information transferring method between data handling system main frame and the described external memory device adopts IEEE1394 standard code method.
The present invention adopts unique design, on the full electronic flash memory, adds a switch, makes the unsettled or ground connection of its write-protect pin WP end, cooperates the judgement of solidification software again, makes full electronic quickflashing external memory device have the write-protect function.Write-protect switch has the function of hard protection, promptly can protect the content of flash memory physically and can not rewritten and wipe.And cooperating for whole external memory device of solidification software and driver provides soft protection; i.e. when write-protect switch is in guard mode (WP holds ground connection); solidification software can be by driver write-protect state notifying operating system; thereby cannot rewrite and wipe the content in the flash memory; user's canned data is protected, and particularly virus can't be invaded the quickflashing external memory device in this case.
The common hardware structured flowchart of full electronic quickflashing external memory device of the present invention as shown in Figure 1; Fig. 2 is for using the full electronic quickflashing external memory device partial sectional perspective view of USB interface.Described full electronic flash memory devices is contained in the single housing 5 fully, on the circuit board 51 of each circuit elements device arrangements in described housing 5, relies on software-driven to realize memory function; Because storage medium 1 and storage control circuit 2 all are made up of electronic devices and components, do not have the rotary machine part, thus full electronic quickflashing external memory device can do very little, its volume only has as the thumb big or small, portably uses very convenient.And when work, described full electronic quickflashing external memory device and all circuit elements devices thereof mechanically are in full stationary state.
See also Fig. 1 again, on the described circuit board 51 of full electronic external memory device, flash memory 1, direct current supply source converter 3 and storage control circuit 2 are installed.Described storage control circuit 2 comprises again: microprocessor 21, USB (universal serial bus) controller 22, general channels socket 23 and dormancy and wake-up circuit 24; Described microprocessor 21 is connected with flash memory 1 with USB (universal serial bus) controller 22, dormancy and wake-up circuit 24 respectively, the unidirectional or two-way flow of signal; General channels interface controller 22 is connected with flash memory 1 with this bus hub 23, dormancy and wake-up circuit 24 respectively, the unidirectional or two-way flow of signal; General channels socket 23 is connected with the data handling system main frame by this bus cable.In addition, this full electronic external memory device also is provided with write-protect switch 4, this write-protect switch 4 and flash memory 1 and little 21 unidirectional connections of processing.Certainly in today of semiconductor integrated technology development, general channels interface controller 22 can be integrated as a whole with microprocessor 21, thereby just have only microprocessor 21 to be single chip on external presentation.
Described DC power convertor 3 is to insert from usb bus socket 23, and output terminal connects microprocessor 21, general channels interface controller 22, dormancy and wake-up circuit 24 and, the power end of flash memory 1 respectively.
See also the common hardware structured flowchart of Fig. 3 and full electronic quickflashing external memory device shown in Figure 4, wherein 1 general channels interface controller 22 adopts USB (universal serial bus) (USB) interface controller 22 and IEEE1394 interface controller 22, corresponding general channels socket 23 adopts USB (universal serial bus) (USB) socket 23 and IEEE1394 socket 23 respectively, and the general channels cable adopts USB cable and IEEE1394 cable respectively.
Fig. 6 is the circuit theory diagrams of the full electronic quickflashing external memory device corresponding with Fig. 3.Described microprocessor 21 is used to control USB (universal serial bus) controller 22, flash memory 1 and dormancy and wake-up circuit 24.It contains little process chip D4 and two models is 4053 multiway analog switch chip D5, D6, connects 12 pin of chip D4 behind 12,1,3 pin of chip D5, the 12 pin short circuits of D6, connects 13 pin of chip D4 behind 13,2,5 pin of chip D5, the 13 pin short circuits of D6; 11,10,9 pin of chip D5 and 11 pin of D6 connect 44,1,2,3 pin of chip D4 respectively; The DATA0 of chip D4 ~ DATA7 pin is that the corresponding leg of chip D1 connects with the chip D2 of USB (universal serial bus) controller 22 and flash memory 1 respectively; No. 4 pin of chip D5 connect No. 4 pin of flash memory D1, and 14 pin of chip D6 connect 42 pin of flash memory D1; 14,15 pin of chip D5 connect 15,16 pin of D2.
Described USB (universal serial bus) controller 22 contains chip D2, crystal oscillator Y1, capacitor C 1 ~ C2, C7 ~ C8, resistance R 1 ~ R3, R10, the light emitting diode V3 that model is PDIUSBD12; Crystal oscillator Y1, capacitor C 1 ~ C2 are connected in series mutually and form the closed-loop path, connect 22 and 23 pin of chip D2 respectively at the two ends of crystal oscillator Y1, and 25,26 pin of chip D2 are connected 2, No. 3 pin with universal serial bus socket 23 through resistance R 2, R1 respectively.The input and output that this interface controller 22 is responsible for usb data stream are extremely controlled, and meet USB1.0 and 1.1 standards, have 8 quick and simple parallel interfaces of joining with most of single-chip microcomputers, and can realize the function of DMA.
Described flash memory 1 is used to store data.It can adopt model is the flash memory chip D1 of TCV64FT/128FT/256FT/512FT or KM29V64000T/128T/256T/512T, and 5 pin of this chip D1 are connected with 5 pin of write-protect switch 4.
The effect of described dormancy and wake-up circuit 24 is in order to reduce power consumption, can to wake and enter the full electronic flash memory devices up normal mode of operation from dormant state when needing work making the full electronic flash memory devices enter dormant state at ordinary times.It contains triode V1, capacitor C 4, diode V2, resistance R 5 ~ R9; The base stage of triode V1 is connected 12 pin with the chip D2 of serial bus interface controller 22 after resistance R 9, capacitor C 4 and resistance R 8, the emitter of triode V1 connects No. 4 pin of microprocessor chip D4.
Full electronic quickflashing external memory device of the present invention need not driver and external power supply, but is driven by software fully, is promptly driven by driver and solidification software.Solidification software be cured in the described microprocessor 21 and with the underlying operating system interaction, driver is loaded between bottom and the upper strata operating system, this driver and underlying operating system and upper strata operating system interaction, its software principle block scheme as shown in Figure 5.The software flow pattern of described driver and solidification software is seen Fig. 7 and Fig. 8.
When the user was inserted into the USB interface of computer to full electronic quickflashing external memory device, microprocessor 21 began to carry out the solidification software that is solidificated in wherein immediately, and solidification software at first carries out initialization, and initialization finishes and promptly enters waiting status, waited for operation requests.
Initialized procedure code all is stored in the solidification software of microprocessor D4.After full electronic quickflashing external memory goes out device and powers on, operating system can be inquired about USB interface chip D2, D2 can produce interrupt request and send microprocessor D4 at this moment, D4 is by to the response of D2 interrupt request and get in touch with operating system then, operating system is according to the various characteristics state or the sign that D2 and D4 fed back of full electronic quickflashing external memory device, notice D2 carries out relevant initial setting up with D4, for next step exchange of preparing normal data is got ready.
When inserting a full electronic quickflashing external memory device, operating system all can detect the insertion of this memory storage automatically by USB interface.At this moment, upper strata operating system will activate driver immediately, after driver is activated, promptly carry out initialization operation, and indication operating system produces a mobile storage means (or being called the active storage device), after operating system was received this indication, the memory storage that is each insertion produced a mobile storage means and distributes the corresponding device thereof symbol.In the aforesaid operations process, solidification software can receive and handle the operation requests from driver and operating system.After driver is finished the insertion processing, promptly enter the waiting status of waiting for operation requests.
When the user full electronic quickflashing external memory device when the USB interface of computer is extracted, solidification software stops carrying out immediately.Operating system then can detect this device automatically and extract from computer, and immediately this event notice driver; Driver is carried out relevant the processing immediately after receiving this notice, and indication operating system is eliminated the mobile storage means corresponding with this memory storage; After operating system is received indication, corresponding mobile storage means of immediate cancel and device symbol.
When upper strata operating system is received read operation, can send to driver to this read operation.Because this operation belongs to the disk read operation of standard, and is different with the mode of operation of USB and flash memory, so driver can convert it to the particular manner of operation of full electronic flash memory devices.Afterwards, driver further carries out the USB packing to the operation after the conversion, and underlying operating system is issued in the read operation after the packing, by underlying operating system read request is sent to the solidification software that operates in the full electronic flash memory devices microprocessor by USB, carry out this read operation by solidification software, and the data and the status information that read are returned to driver through underlying operating system.By driver these data that read and status information are sent to upper strata operating system then.So far, read operation is finished.
When data handling system requires reading of data, general channels interface D2 notice microprocessor D4, microprocessor D4 then reads relevant data according to the requirement of operating system from flash memory D1 and sends into D2, returns relevant data by D2 and gives data handling system.
When upper strata operating system is received write operation, can send to driver to this write operation.Because this operation belongs to the disk write operation of standard, and is different with the mode of operation of USB and flash memory, so driver can convert it to the particular manner of operation of full electronic flash memory devices.When write operation arrived flash memory 1, if writing position has comprised valid data, then new data can't write, and have only after effective data are wiped free of, and just can write new data.Based on this reason, driver converts write operation to three different built-in functions according to the order of carrying out: read operation, internal erase and data recombination and write back operations.At first, driver is carried out an inner read operation, and the former meaningful of writing position read out and preserve; Then, carry out an internal erase operation, to remove all data of writing position; At last, new data and legacy data that needs are write combine, and the data after the combination are carried out an inner write operation.After above-mentioned three operations were all finished, driver returned to upper strata operating system to the status information of write operation.So far, write operation is finished.
When data handling system requires to write data when flash memory 1 is D1, general channels interface D2 notice microprocessor D4, microprocessor D4 then sends into flash memory D1 according to requirement reading corresponding data from D2 of operating system.
When data handling system notice full electronic flash memory devices will carry out when erasable flash memory, the general channels interface circuit D2 can notify microprocessor D4, and D4 can send a string command to give flash memory D1 then, thereby wipes the content of respective regions in the D1.
In the practicality, driver can carry out the USB packing to above-mentioned three built-in functions, and underlying operating system is issued in the operation after the packing respectively, send to solidification software in the microprocessor by underlying operating system by USB, carry out this operation by solidification software, and the operation after data and status information return to underlying operating system by USB, by underlying operating system data and status information are returned to driver then.
The application of full electronic quickflashing external memory device of the present invention, comprise general channels interface controller and attachment plug, the flash electronic type storage medium, dormancy and wake-up circuit are from general channels power supply source of obtaining and the microprocessor that contains direct control flash electronic type storage medium access and realization standard feature solidification software; Cooperate the driver that is installed in the system, and under the support of system hardware connector, it is characterized in that:
Described full electronic quickflashing external memory device is as the external memory device of data handling system.
Described full electronic quickflashing external memory device can also be as the external memory device of miniature digital machine.Is the microcomputer of CPU at present with Intel P II or compatible chip, with USB as standard configuration, popularizing of full electronic quickflashing external memory device, within sight.
Described full electronic quickflashing external memory device can also be as the external memory device of hand-held data handling system.This is the product of the PDA of international popular hand-held data processors such as (personal digital assistants) expectation just.
In addition, described full electronic quickflashing external memory device can also be as the external memory device of hand-held data handling system.This also is that part portable data disposal system is the laptop computer user right that forfeiture is fallen because the floppy drive volume is big, and expectation for many years can be realized by the full electronic external memory device.
Compared with prior art, outer storage method of full electronic quickflashing and device thereof that the present invention is used for data handling system have following advantage: use full electronic flash medium and general channels interface, realize the movable external memory of no driver, no external power supply, and hot-pluggable, plug and play need not be shut down; Access speed is fast, and capacity can be several times, tens times of floppy disk, hundred times, several thousand times or bigger; Volume is little, carry very convenient, not fragile, data can preserve 10 years or more than; Erasable 1,000,000 times or more than; Simultaneously can connect more than 20 full electronic flash memory devices at most to computer.This method and device thereof are applicable to the data handling system of any support general channels.
The used main unit of apparatus of the present invention embodiment, device model, parameter are as follows:
Circuit symbol title specifications and models supplier
D1 flash memory TC58V64FT/128FT/256FT/512FT TOSHIBA
Or KM29U64000T/128T/256T/512T SAMSUNG
D2 USB (universal serial bus) controller PDIUSBD12
D3 three end power supply X62FP3302
D4 microprocessor chip 8051/ serial INTEL
D5, D6 multiway analog switch CD4053
Y1 crystal oscillator 6MHz
J1 USB (universal serial bus) socket
C1-C8 electric capacity
R1-R10 resistance
The V1 triode
The V2 light emitting diode
V3 utmost point pipe