SUMMERY OF THE UTILITY MODEL
The utility model discloses aim at solving one of the technical problem that exists among the prior art at least. Therefore, the utility model provides a SD card wireless communication circuit, including the clock switching unit, can provide correct reading and writing clock signal when wireless SD card lug connection read write with during wireless reading and writing, guarantee the accuracy of reading and writing data.
The utility model discloses still go out a SD card that has above-mentioned SD card wireless communication circuit.
First aspect, according to the utility model discloses a wireless SD card, include: the memory chip is used for storing data; the MCU can realize data transmission with external equipment through the wireless communication unit; the first input end of the electronic change-over switch is electrically connected with the serial interface of the MCU, the second input end of the electronic change-over switch is electrically connected with the external equipment, the output end of the electronic change-over switch is electrically connected with the serial interface of the memory chip, and the control end of the electronic change-over switch is electrically connected with the MCU; and the external clock feedback end, the shielding input end and the internal clock input end of the clock switching unit are electrically connected with the MCU and used for switching the internal clock signal and the external clock signal.
According to the utility model discloses SD card wireless communication circuit has following beneficial effect at least: the clock switching unit transmits a correct clock signal to a memory chip in the SD card according to the input signal, so that the accuracy of data information written into or read from the memory chip is ensured.
According to some embodiments of the present invention, the clock switching unit comprises: the clock switching unit includes: the input end of the monostable trigger is used as the external clock input end of the clock switching unit and is connected with the external clock signal, and the output end of the monostable trigger is used as the external clock feedback end of the clock switching unit and is connected with the first IO pin of the MCU; an AND gate; a first input end of the clock switching unit is connected with the input end of the monostable trigger, and a second input end of the clock switching unit is used as a shielding input end of the clock switching unit and is connected with the other IO pin of the MCU; or gate: the first input end of the clock switching unit is electrically connected with the first output end of the AND gate, the second input end of the clock switching unit is used as the internal clock input end of the clock switching unit and is connected with the internal clock signal of the serial interface of the MCU, and the output end of the clock switching unit is used as the output end of the clock switching unit and is connected with the clock input signal of the storage chip.
According to some embodiments of the utility model, the wireless communication unit includes Wi-Fi module and bluetooth module, Wi-Fi module and bluetooth module respectively with MCU electric connection.
According to some embodiments of the utility model, the wireless communication list still includes the antenna, the antenna is used for wireless signal's enlargies to send and receive.
According to some embodiments of the utility model, MCU has the SPI interface, be used for data transmission's pin in the SPI interface with electronic change over switch's first input electric connection, be used for clock signal output's pin in the SPI interface with clock switching unit's third input is connected.
According to some embodiments of the present invention, the memory chip is an eMMC memory chip.
In a second aspect, according to the present invention, an SD card includes: a card body; the SD card wireless communication circuit is arranged in the card body; and the golden finger is arranged on the card body, is respectively connected with the second input end of the electronic change-over switch and the external clock input end of the clock change-over unit, and is used for signal transmission between the SD card wireless communication circuit and external equipment.
According to the utility model discloses SD card has following beneficial effect at least: have the basis the utility model discloses the SD card wireless communication circuit of first aspect embodiment guarantees no matter directly to carry out the data reading and writing through the golden finger or directly carries out the accuracy of clock signal when data reading and writing through wireless communication, guarantees the accuracy of reading and writing data.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present invention, and should not be construed as limiting the present invention.
In the description of the present invention, a plurality of means are one or more, a plurality of means are two or more, and the terms greater than, less than, exceeding, etc. are understood as not including the number, and the terms greater than, less than, within, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless there is an explicit limitation, the words such as setting, installation, connection, etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above words in combination with the specific contents of the technical solution.
Referring to fig. 1, according to the present invention, an SD card wireless communication circuit includes an MCU200, a wireless communication unit 300, a memory chip 400, an electronic switch 500, and a clock switching unit 600. The wireless communication unit 300 is in communication connection with the serial interface of the MCU200, the wireless communication unit 300 is responsible for being connected with an external device in a wireless manner and performing data information interaction with the connected device, and the wireless communication unit 300 performs read-write access to the memory chip 400 through the MCU 200. The electronic switch 500 is used for switching data interaction objects of the memory chip 400, a first input end of the electronic switch 500 is connected with one path of serial interface 210 of the MCU200, a second input end of the electronic switch 500 is electrically connected with an external device, an output end of the electronic switch 500 is connected with the serial interface of the memory chip 400, and a control end of the electronic switch 500 is connected with an IO pin of the MCU 200. The MCU200 can control the output terminal of the electronic switch 500 to be conducted with which input terminal by transmitting high and low levels to the control terminal of the electronic switch 500, when the output terminal of the electronic switch 500 is connected with the first input terminal thereof, the memory chip 400 is connected with the MCU200, the SD card wireless communication circuit works in a wireless transmission mode, and the wireless SD card cooperates with the external device via the MCU200 and the wireless transmission unit to realize the writing and reading of data. When the output terminal of the electronic switch 500 is connected to the second output terminal thereof, the memory chip 400 is electrically connected to an external device, and the SD card wireless communication circuit operates in the working mode of the conventional SD card, and data reading and writing are performed by directly and physically connecting the gold finger 110 to the external device. It is understood that the wireless communication unit 300 may adopt one or more of Wi-Fi, bluetooth, ZigBee and other wireless communication means.
When the SD card wireless communication circuit operates in the wireless mode, the clock signal for reading and writing data in the memory chip 400 should be an internal clock provided by the MCU 200. When the SD card wireless communication circuit operates in the conventional SD card mode, the clock signal for reading and writing data of the memory chip 400 should be the clock signal provided by an external device. In order to provide the correct clock signal for the memory chip 400, the SD card wireless communication circuit according to the embodiment of the present invention further includes a clock switching unit 600, and the external clock input terminal of the clock switching unit 600 is connected to the external clock signal to input the clock signal of the external device. The mask input terminal, the internal clock input terminal, and the external clock feedback terminal of the clock switching unit 600 are all connected to the MCU200, wherein the mask input terminal and the internal clock input terminal are respectively used as an input terminal for masking a mask signal of the external clock and an input terminal for a clock signal provided by the MCU200, and the external clock feedback terminal is used for feeding back a condition of the first input terminal, i.e., feeding back the presence or absence of the external clock signal. When the SD card wireless communication circuit works, the clock switching unit 600 selects a correct clock signal to the memory chip 400 according to the working mode of the SD card wireless communication circuit, thereby ensuring the correctness of data writing and reading. It is understood that the clock signal circuit may be implemented using a multiplexer or a digital circuit having a multiplexing function.
According to the utility model discloses the SD card includes according to the utility model discloses the wireless communication circuit of SD card of first aspect embodiment still includes card body 100 and golden finger 110. The SD card wireless communication circuit is disposed in the card body 100, the gold finger 110 is disposed on the card body 100, the conductive contact for transmitting data in the gold finger 110 is electrically connected to the second input terminal of the electronic switch 500, and the conductive contact for transmitting an external clock signal of the gold finger 110 is electrically connected to the external clock input terminal of the electronic switch 500.
The SD card wireless communication circuit and the SD card according to the embodiment of the present invention are described in detail with reference to fig. 1 as a specific embodiment. It is to be understood that the following description is illustrative only and is not intended as a specific limitation on the invention.
Referring to fig. 1, in this embodiment, an eMMC chip is used as the memory chip 400, and the eMMC chip integrates a controller in its package, which may provide a standard interface and perform certain management on a flash memory, so as to simplify the design of the SD card wireless communication circuit. The memory chip 400 communicates with an external device or an internal MCU200 through an SPI protocol, and in this embodiment, the SPI interface has 4 data lines D0 to D3 for data reading and writing, a 1-channel chip select signal CMD, and a 1-channel clock signal CK. In the present embodiment, the output and the input of the electronic switch 500 have 5 channels. The 4 data pins D0 to D3 and the 1 chip select signal pin CMD of the SPI interface of the memory chip 400 are respectively connected to 5 channels of the output terminal, the 4 data pins D0I to D3I and the one chip select signal pin CMDI of the SPI interface of the MCU200 are respectively and correspondingly connected to 5 channels of the first input terminal of the electronic switch 500, and the 4 conductive contacts DAT0 to DAT3 for transmitting data and the conductive contact CMDO for transmitting a chip select signal in the gold finger 110 are also respectively and correspondingly connected to 5 channels (not shown in the drawing) of the second input terminal of the electronic switch 500. The control terminal SEN of the electronic switch 500 is connected to an IO interface IO3 of the MCU 200.
In this embodiment, the wireless communication unit 300 includes a bluetooth module 320, a Wi-Fi module 310 and an antenna 330 for enhancing signals. Since both Wi-Fi and bluetooth use the 2.4GHZ band, the Wi-Fi module 310 and the bluetooth module 320 may share one antenna 330. The bluetooth module 320 and the Wi-Fi are respectively connected with the MCU200, exchange data with the MCU200, and are controlled by the MCU 200.
In the present embodiment, the clock switching unit 600 is composed of a monostable flip-flop 610, an and gate 620, and an or gate 630. The input end of the monostable flip-flop 610 serves as the external clock input end of the clock switching unit 600 and is connected with the conductive contact CLK in the golden finger 110 for transmitting an external clock signal, and the output end of the monostable flip-flop 610 serves as the external clock feedback end of the clock switching unit 600 and is connected with one IO pin IO1 of the MCU 200. One input terminal of the and gate 620 is connected to the input terminal of the monostable flip-flop 610 and receives an external clock signal, and the other input terminal of the and gate 620 is connected to one IO pin IO2 of the MCU200 as a shielding input terminal of the clock switching unit 600. One input terminal of the or gate 630 is connected to the output terminal of the and gate 620, the other input terminal is connected to the clock signal pin CKI of the SPI interface of the MCU200 as the internal clock input terminal of the clock switching unit 600, and the output terminal of the or gate 630 is connected to the clock pin CK of the SPI interface of the memory chip 400 as the output terminal of the clock switching unit 600.
In operation, when the clock signal is lost at the conductive contact CLK, the monostable flip-flop 610 sends a positive pulse to the IO1 pin of the MCU200, and the duration of the pulse can be controlled by the parameters of the resistor R and the capacitor C. After the MCU200 detects the pulse signal of the IO1, the MCU200 detects whether one of the Wi-Fi module 310 and the bluetooth module 320 is connected to an external device, if not, the MCU200 does not perform any action, if so, the IO2 pin outputs a low level to shield an external clock signal through the and gate 620, so that the CKI pin outputs an SPI interface clock signal of the MCU200 to the or gate 630, and at this time, the clock signal output by the clock switching unit 600 to the memory chip 400 is the internal clock signal provided by the MCU 200. The MCU200 simultaneously controls the electronic switch 500 via the IO3 to connect the output terminal of the electronic switch 500 with the first input terminal thereof, and simultaneously reads or writes data. After the data is written or read by the MCU200, the IO3 and IO2 pins of the MCU200 are reset, the output terminal of the electronic switch 500 is connected to the second input terminal thereof, and the clock signal pin CKI outputs a low level, at this time, the IO2 outputs a high level to the and gate 620, the external clock signal may be sequentially transmitted to the CK pin of the memory chip 400 through the conductive contact CLK and the clock switching unit 600, and at this time, the external device physically connected to the SD card wireless communication circuit through the gold finger 110 may perform the data reading or writing operation.
According to the utility model discloses SD card wireless communication circuit and SD card support two kinds of wireless communication mode of Wi-Fi and bluetooth, can adapt to more equipment. The SD card wireless communication circuit is provided with a clock switching unit, and can provide correct clock signals to the storage chip according to the working mode of the wireless SD card, so that the accuracy of reading and writing data is ensured. Meanwhile, the clock switching unit can also detect whether an external device physically connected with the SD card wireless communication circuit provides a clock signal through the steady trigger, and further judge whether the external device occupies the SD card wireless communication circuit, so that the external device connected with the SD card in a wireless mode and the external device connected with the SD card in a physical mode are prevented from simultaneously performing read-write operation on the memory chip.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present invention within the knowledge of those skilled in the art.