A kind of SD equipment complex and reading/writing method thereof
Technical field
The present invention relates to electronic applications, in particular a kind of SD equipment complex and reading/writing method thereof.
Background technology
The SD card is a kind of memory device of new generation of based semiconductor fast-flash memory device, and it is used on mancarried device widely, and the SD jig has high memory capacity, rapid data transmission rate, greatly mobile dirigibility and well security.
At present, SD is stuck in and is mainly used in storing map software and related data in navigation product.In whole navigational system because will often receive the inquiry of information point and correlation behavior, in the WINCE of car machine MCU the control program can be continually with the SD card in map software carry out data interaction.Therefore, the capacity of SD card, the versatility of access speed and SD card I/O interface all can have influence on the communication quality of whole system.And traditional SD the core of the card sheet can only be realized the data communication function between SD card I/O interface.Realize the exchanges data between SD card I/O interface and distinct interface, also need to carry out corresponding protocol conversion or the driving of standard is changed (above-mentioned map software is namely navigation software).
Therefore, prior art has yet to be improved and developed.
Summary of the invention
The object of the present invention is to provide a kind of SD equipment complex and reading/writing method thereof, be intended to solve traditional SD card and can only realize data communication function between SD card I/O interface, can not and distinct interface between the problem of exchanges data.
Technical scheme of the present invention is as follows:
A kind of SD equipment complex, wherein, comprise SD protocol conversion chip, storage medium and serial ports peripheral hardware, described SD protocol conversion chip connects storage medium by the SDIO interface protocol, connect the serial ports peripheral hardware by the RS232 serial port protocol, be provided with the middle control module of ground module and charge map module and SD protocol conversion chip interaction data in described storage medium, SD protocol conversion chip is used for realizing the conversion of SDIO interface and RS232 interface.
Described SD equipment complex, wherein, the SD equipment complex is packaged into the structure of common SD card, is provided with golden finger on shell, and described SD protocol conversion chip connects golden finger by the SDIO interface.
Described SD equipment complex, wherein, described SD protocol conversion chip is the chip with RS232, SPI, IIC, USB or ether net interface.
Described SD equipment complex, wherein, described serial ports is made as the 2.4G wireless chip outward.
Described SD equipment complex, wherein, described middle control module is the operating system that drives with the SD card.
Described SD equipment complex, wherein, described storage medium is the TF card.
Described SD equipment complex, wherein, SD protocol conversion chip and serial ports peripheral hardware are actually and integrate.
A kind of reading/writing method of SD equipment complex, wherein, when in WINCE, the control program is read the serial ports peripheral data, the serial ports peripheral hardware writes data the buffer zone of SD protocol conversion chip by the RS232 interface of standard, then in WINCE, the control program reads the corresponding buffer zone of SD protocol conversion chip by the SDIO interface, acquires corresponding data; When in WINCE, the control program need to be write the serial ports peripheral hardware, first write data in the buffer zone of SD protocol conversion chip by the SDIO interface, then the serial ports peripheral hardware reads the buffer data of SD protocol conversion chip by the RS232 interface.
The reading/writing method of described SD equipment complex, wherein, SD protocol conversion chip realizes that the method for the conversion of SDIO interface and RS232 interface is: SD protocol conversion chip carries out protocol conversion to the read-write of specific two sectors of storer, a sector is data sector, and the data of data sectors read-write all are transformed on corresponding IO equipment; Another sector configures baud rate and the data layout of IO equipment for controlling the sector by controlling the sector.
Beneficial effect of the present invention: the present invention is by the function above interpolation 2.4G wireless communication module and interface modular converter can be realized in the SD equipment complex, and can reduce to a certain extent the complexity of whole system, also can improve the communication quality of system.
Description of drawings
Fig. 1 is SD the core of the card chip architecture schematic diagram provided by the invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, clear and definite, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for embodiment.
Referring to Fig. 1, SD equipment complex provided by the invention is packaged into the structure of common SD card, it comprises golden finger, SD protocol conversion chip, TF card and serial ports peripheral hardware, described SD protocol conversion chip connects golden finger by the SDIO interface, described SD protocol conversion chip connects the TF card by the SDIO interface protocol, connects the 2.4G wireless chip by the RS232 serial port protocol.Be provided with the middle control module of ground module and charge map module and SD protocol conversion chip interaction data in described TF card, in described in the present invention, the control module is the wince embedded system, but and in being limited to the wince system, so long as can use (as windows, linux, unix, android) with the operating system of SD card driving.Serial ports described in the present invention is made as the 2.4G wireless chip outward, but is not limited to this.Described SD protocol conversion chip is the chip with IO interfaces such as RS232, SPI, IIC, USB or ether net, and the equipment that can dock with these interfaces is all passable.Described TF card can be also other storage mediums.
Described SD equipment complex is inserted in car machine ARM, is connected with car machine ARM by golden finger, communicates by the SDIO interface protocol, and the SDIO interface protocol is SD specification 2.0 agreements of standard.The serial ports peripheral hardware of described SD equipment complex connects serial ports peripheral hardware Miniature Terminal by the 2.4G network, and described Miniature Terminal is connected with mobile phone by bluetooth, then connects the backstage by mobile phone.
This equipment has realized that mainly the WINCE application program of middle control module by the access of SD protocol conversion chip to the serial ports peripheral hardware, realizes the data interaction function between the distinct interface standard.
In Fig. 1, in application, SD protocol conversion chip and serial ports peripheral hardware are actually and integrate, for convenient understand with the later stage use widely, therefore with this two modules separately.
In WINCE in described middle control module, the control program mainly is responsible for processing data interaction and the parsing between ground module and serial ports peripheral hardware.SD protocol conversion chip is mainly used to realize the conversion of SDIO interface and RS232 interface.
Described serial ports peripheral hardware is mainly realized the transmitting-receiving work with back-end data, then with WINCE in the control program communicate by SD protocol conversion chip.
Being the SDIO interface of standard between control program and SD protocol conversion chip in described WINCE, is the RS232 serial communication interface between SD protocol conversion chip and serial ports peripheral hardware.
When in WINCE, the control program need to be read the serial ports peripheral hardware, the serial ports peripheral hardware write data the buffer zone of SD protocol conversion chip by the RS232 interface of standard.Then in WINCE, the control program reads the corresponding buffer zone of SD protocol conversion chip by the SDIO interface, thereby obtains corresponding data.When in WINCE, the control program need to be write the serial ports peripheral hardware, first write data in the buffer zone of SD protocol conversion chip by the SDIO interface, then the serial ports peripheral hardware reads the buffer data of SD protocol conversion chip by the RS232 interface.So just completed the data interaction between distinct interface.
SD protocol conversion chip realizes that the method for conversion is: SD protocol conversion chip need to carry out protocol conversion to the read-write of specific two sectors, the present invention be directed to the TF card memory area.A sector is data sector.Data to this data sector read-write all are transformed on corresponding IO equipment.Another sector is for controlling the sector.Can control the sector by this and configure IO equipment, such as the baud rate of equipment, data layout.
Because serial ports peripheral hardware and WINCE application program playing the part of alternately an indispensable part in whole navigational system, so with the serial ports peripheral hardware, SD protocol conversion chip and TF card integrate and form the structure that a profile is similar to the SD card, help to reduce the complexity of whole system, also can improve Systems balanth and reliability.Therefore, above design can be satisfied the actual demand in navigation product.
Should be understood that, application of the present invention is not limited to above-mentioned giving an example, and for those of ordinary skills, can be improved according to the above description or conversion, and all these improve and conversion all should belong to the protection domain of claims of the present invention.