Background technology
In recent years, the high speed development of infotech is brought people into the brand-new epoch that a high speed information is propagated, multimedia technology that high-speed wideband net, picture and text sound are also luxuriant or the like.The continuous development and the application of these technology make data storage technology also improve fast with Moore's Law.Along with the needs of people, occurred a kind ofly being the portable memory apparatus of medium, i.e. USB massage storage based on flash memory (FLASH Memory) to information interchange.Be characterized in that volume is little, price is low, portable, stable performance, memory capacity big (not waiting) and can expand from tens to several gigabits, can substitute the function of floppy disk and floppy drive fully.The function of USB massage storage mainly is in order to finish the Large Volume Data exchange, and has partitions of file table function with system compatible, also have the reservoir that a power down is not lost, can bear repeatedly erasable repeatedly, it has the advantages that to be convenient for carrying simultaneously.
Card reader is a kind of standard PC peripheral hardware, specifically is exactly by computer control, can finish the device to the card image read-write operation.Card (perhaps being card) form is varied.The branch that storage card, smart card are arranged.The present application of storage card is very extensive, from digital camera to the MP3 walkman, from the PDA palm PC to popular at present multimedia handset.More common storage card has SmartMedia (SM card), Compact Flash (CF card), SONY Memory Stick (Sony's memory stick), Multi Media Card (mmc card), SD Memory (SD card), IBM Microdrive (IBM micro hard disk) at present, and up-to-date XD-Picture (XD card).Smart card claims integrated circuit card (IC) again, has stipulated concrete physical aspect, communication modes and the function of smart card in the ISO7816 standard.
Card reader in the market is more and more to adopt USB interface, and can do very small and exquisitely, is easy to carry about with one.And the USB mass memory unit itself is exactly small and exquisite portable equipment.USB interface on the computing machine is limited now, and the USB peripheral hardware is more and more.Plurality of devices is integrated to be a kind of trend and trend.At present a lot of users carry out the storage of larger capacity data when need carry the Card Reader authentication, and present card reader and USB flash disk still are mutual separate equipment, use card reader can't carry out the lot of data storage separately, and can't Card Reader when using the USB massage storage, different like this hold facilities the USB interface resource on the computing machine, simultaneously, all inconveniences are used and are carried in card reader and the discrete work of USB flash disk module.
The utility model content
The purpose of this utility model is to overcome the shortcoming of card reader and the discrete work of USB flash disk module in the prior art, provides a kind of USB of possessing mass storage function to have the equipment complex of functions of card reader again.Described technical scheme is as follows:
A kind of card reader comprises USB interface web member and card interface module, it is characterized in that, also comprises control module and mass storage module, and described USB interface web member links to each other with mass storage module with card interface module respectively by control module.
Preferably, described control module is compound control chip, and described compound control chip is used to adopt unified communications protocol by USB interface web member and main frame interaction data, and is used for control card interface module and mass storage module respectively.
Preferably, described card reader also comprises usb hub, described control module comprises card reader control module and USB massage storage control module, described usb hub one end links to each other with described USB interface, the other end links to each other with USB massage storage control module with described card reader control module respectively, described card interface module is connected with described card reader control module, to realize the function of card reader, described mass storage module is connected with described USB massage storage control module, to realize the function of USB massage storage.
Described card reader control module is the card reader control chip.
Described USB massage storage control module is a USB mass memory control chip.
Described card reader control module and described card interface module can be integrated in in the chip piece.
Described mass storage module is the mass memory chip.
Described card interface module is the radio frequency transmit and receive module or stores card interface module or logic interfacing circuit.
Described card interface module also comprises deck.
Described card reader control module and USB massage storage control module comprise usb interface module respectively, are connected with described usb hub.
The beneficial effects of the utility model are:
1. card reader described in the utility model not only has the function that card reader reads information, also has powerful memory function simultaneously, thereby greatly is user-friendly to, and increases work efficiency.
2. the user can be stored in useful data (such as card reader institute canned data) on the USB massage storage.
3. described reader device of the utility model card reader and memory storage both can be separate physically, can combine again, be about to both identical or approximate functional modules and merge, thereby the thin device module has reduced the cost of equipment and has been convenient to management.
Specific embodiments
With reference to corresponding drawings and Examples the utility model embodiment preferred is described below.
The utility model device mainly is made of two parts on hardware configuration, i.e. USB high-capacity storage and reader device.
What the USB massage storage adopted is USB interface, needs a microprocessor and a data storer (can be FLASH, E2ROM etc.) that is used for computing.Can use the USB massage storage to store various types of data files, driver and application program.Card reader is made up of a CPU processor and this two parts basic module of USB interface, by computer control, can finish the read-write operation to card image.Two products have total characteristics, all have the communication interface of a USB interface, all have a microprocessor that carries out computing.The reservoir that all needs power down not lose.The main communications protocol difference of difference at USB, the program difference of microprocessor internal operation.The peripheral circuit difference of some assurance system operations.The user can be stored in useful data (as the driver or the executable program of card reader) on the USB massage storage.As can be seen, it is possible merging to present two kinds of equipment commonly used in the product.
If use one both can satisfy the USB flash disk processing demands, can satisfy the microprocessor of card reader processing demands again, just can solve the different problem of peripheral circuit.
Also have a kind of method in addition, utilize the characteristics of usb hub (HUB).Can on a USB interface, expand a plurality of USB interface that work alone, so just can be connected respectively to USB flash disk and card reader on the downstream port of USB HUB, the upstream port of USB HUB is linked to each other with main frame.Three chips are integrated in the equipment, realize the function that USB flash disk and card reader work alone.To have USB flash disk simultaneously and card reader becomes possibility, made things convenient for the user.
Based on above-mentioned thought, the utility model device can have different embodiments, also can add the function of other equipment, but should comprise the function of above-mentioned two kinds of equipment at least.Therefore, the device that possesses these characteristics all belongs to scope of the present utility model.Below be several exemplary embodiment of the utility model device:
Embodiment 1:
Referring to Fig. 1, Fig. 5, Fig. 6 and Fig. 7, card reader arrangement described in the utility model is made of usb 1 02, USB HUB chip 103, card reader control chip 104, card interface module 105, USB massage storage control chip 106 and mass memory chip 107.Described card interface module 105 comprises the radio frequency transmit and receive module or stores card interface module or logic interfacing circuit and interface deck, described card reader control chip 104 can adopt the 68HC908JB16 of freescale company, the chips such as cy7c63723 of cypress company, described USB massage storage control chip 10 can adopt AU9382, chips such as AU9384, described card interface module 105 is connected to described USBHUB chip 103 by described card reader control chip 104, the D2+ of card reader control chip 104 wherein, the D2+ of D2-pin and described USB HUB chip 103, the D2-end links to each other, and then the D+ by described USB HUB chip 103, the D-end is connected to described USB interface (being the USB interface web member) 102, finally be connected to main frame 101, to realize the function of card reader by usb bus.Simultaneously, described mass memory chip 107 is connected to described USB HUB chip 103 by described USB massage storage control chip 106, wherein the D1-of USB massage storage control chip 106, D1+ end is connected with D1-, the D1+ end of USB HUB chip 103, and then D+, D-by described USB HUB chip 103 end is connected to described usb 1 02, finally be connected to main frame 101, to realize the function of USB massage storage by usb bus.This embodiment is bound up card reader and USB massage storage by USB HUB chip, and wherein card reader control chip and functions of card reader realize that chip is two chip blocks independently mutually.
Embodiment 2:
With reference to Fig. 2, the utility model device is made of with card interface module 204, USB massage storage control chip 205 and mass memory chip 206 USB interface 202, USB HUB chip 203, card reader control.Described card reader control is connected to described USB HUB chip 203 with card interface module 204, is connected to described USB interface 202 by described USB HUB chip 203 then, finally is connected to main frame 201 by usb bus, to realize the function of card reader.Simultaneously, described mass memory chip 206 is connected to described USB massage storage control chip 205, described USB massage storage control chip 205 is connected to described USB HUB chip 203 again, described then USB HUB chip 203 is connected to described USB interface 202 again, finally be connected to main frame 201, to realize the function of USB massage storage by usb bus.This embodiment is bound up card reader and USB massage storage by USB HUB chip, and wherein card reader control chip and card interface module have been integrated into chip piece.In the present embodiment, because the concrete annexation of each chip and interface is identical with embodiment 1, repeat no more here.
Embodiment 3:
With reference to Fig. 3, the utility model device is made of USB interface 302, composite controller chip 303, card interface module 304 and mass memory chip 305.Described composite controller chip 303 adopts the chip of AVR8515 model, described card interface module 304 is connected to the IO port of described composite controller chip 303, the D-of described composite controller chip 303, D+ end is connected to described USB interface 302 again, finally be connected to main frame 301, to realize the function of card reader by usb bus.Simultaneously, described mass memory chip 305 is connected to the data bus and the address bus end of described composite controller chip 303, described composite controller chip 303D-, D+ end is connected to described USB interface 302 again, finally be connected to main frame 301, to realize the function of USB massage storage by usb bus.In this embodiment, a compound chip has been born original card reader control chip and mass memory control chip.Promptly finish the control function of card reader and USB mass memory, thereby card reader and USB massage storage are bound up with a compound chip.Wherein the composite controller chip is the compound chip with card reader control and the dual control function of USB massage storage.The characteristics of this embodiment are that card reader directly is connected with USB interface with the USB massage storage, thereby have improved execution speed.On the other hand, owing to do not use USB HUB, also saved cost.
Compound control chip in the present embodiment adopts unified communications protocol to carry out with the main frame interaction data, utilizes microprocessor internal to carry out protocal analysis then, judges that the duty of agreement is the duty of USB flash disk, or the work of card reader.Carry out corresponding program then, respond the request of main frame simultaneously.Return the result after the execution.Its control flow is referring to Fig. 4, and described controlled step is as follows:
Step 402: when at first equipment inserts main frame for the first time, equipment is enumerated, equipment is by the communication protocol of USB, and this is an equipment complex to report to main frame, comprises a read write line and a USB massage storage.After system discerns equipment, in normal use, can carry out read-write operation to equipment;
Step 403: receive the data that main frame issues;
Step 404: the content of the usb data that issues according to main frame, determine that this subcommand is to issue read write line, or the USB massage storage, if the USB massage storage, execution in step 405; If judging this subcommand is the order of read write line, execution in step 408;
Step 405: judge whether this subcommand is to enumerate file allocation table, if need to carry out 407 (enumerating file allocation table), if not, need to carry out 406 (transfer files orders),, pass main frame back by usb protocol by 411 data that need to transmit back main frame;
Step 406: transfer files order;
Step 407: enumerate file allocation table, the report main frame;
Step 408: judge that main frame is the state that needs the inquiry read write line, still need to connect on the read write line to stick into line data mutual, if the status command of inquiry read write line, execution in step 410; If not the status command of inquiry read write line, execution in step 409;
Step 409: carry out data interaction, data interaction comprises that main frame need read the data of card, and main frame need be inquired about the state of card, and main frame need write data to card, and main frame need carry out initialization or the like to card.According to the application difference of card, concrete operating process is also inequality;
Step 410: the state of read write line is turned back to main frame;
Step 411: read write line executes after the request of main frame, and needs are returned to the data of main frame, converts usb protocol to, sends to main frame.
More than just preferred implementation of the present utility model is described, those skilled in the art is in the scheme scope of the utility model technology, and common variation and the replacement carried out all should be included in the protection domain of the present utility model.