High-speed SD card read-write circuit based on bus switching

By designing a high-speed SD card read and write circuit based on bus switching in the microcontrol system, automatic hardware switching is achieved, which solves the problems of poor contact caused by plug-in and unplugging and low USB interface efficiency, and improves data transmission efficiency and system stability.

CN222167590UActive Publication Date: 2024-12-13GUANGXI LONGMA EXPRESSWAY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421960228.0
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-13
Estimated Expiration
2034-08-13

AI Technical Summary

Technical Problem

In the prior art, microcontroller systems have problems such as poor contact caused by high-speed SD card plug-in and unplugging during data storage and transmission, and the lack of high-speed USB interface leads to low data interaction efficiency.

Method used

A high-speed SD card reading and writing circuit based on bus switching is designed. Through the bus automatic switching circuit and USB interface circuit, automatic hardware switching is realized without program control and supports high-speed data transmission.

Benefits of technology

It realizes high-speed writing of SD card data and high-speed data transmission of USB interface in microcontrolling systems, solves the problems of poor contact caused by plug-in and unplugging and the problems of low USB interface efficiency, and improves the stability of the system and data interaction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222167590U_ABST
    Figure CN222167590U_ABST
Patent Text Reader

Abstract

The utility model discloses a high-speed SD (Secure Digital) card read-write circuit based on bus switching, which relates to the technical field of data storage and transmission and comprises an SD card read-write circuit, a USB (Universal Serial Bus) interface circuit, a bus automatic switch switching circuit and a micro-control interface circuit, the SD card read-write circuit and the USB interface circuit are in bus connection with the bus automatic switch switching circuit, and the switching circuit is in bus connection with the micro-control interface circuit; a control pin of a USB end bus switching chip in the bus automatic switch switching circuit is grounded, and a power supply pin of the USB end bus switching chip is connected to a power supply input pin of the USB interface circuit; a control pin of a microcontroller end bus switching chip in the bus automatic switch switching circuit is connected to a power supply input pin of the USB interface circuit, and a power supply pin is connected to a power supply input pin of the microcontroller interface circuit. According to the utility model, the high-speed data storage of the microcontroller system and the data interaction between the PC end and the micro-control system through the high-speed USB interface can be automatically switched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of data storage and transmission, and in particular to a high-speed SD card reading and writing circuit based on bus switching. Background Art

[0002] The statements herein merely provide background art related to the present invention and do not necessarily constitute prior art.

[0003] Semi-Airborne Transient Electromagnetic Method (SATEM) usually uses a high-power transmitter on the ground to transmit current, and uses a receiving system on a flying platform such as a drone to collect data, achieving a balance between detection depth and work efficiency. In recent years, this method has become a hot topic in geophysical exploration research. During the data collection process, the drone flies at a high speed, and the high sampling rate, full-waveform semi-airborne transient electromagnetic acquisition system uses a 256ksps sampling rate for data collection. Therefore, the amount of semi-airborne transient electromagnetic data collected is very large, and the storage and reading efficiency of the collected data are also very high.

[0004] At present, SD cards are often designed for data storage and reading in microcontroller-based microcontrollers. Among them, high-speed SD cards usually use SDIO interfaces. The speed of high-end microcontroller SDIO interfaces can reach 25MB / S, which can generally meet the storage speed requirements; and for general high-speed SD cards, the write speed is 10-30MB / S, which can cope with most application scenarios. The use of SD cards for data storage and reading in the above-mentioned semi-aerospace transient electromagnetic method is one of the conventional methods in the current field.

[0005] There are currently two methods for reading or storing data in an SD card, that is, for data in the SD card to interact with the PC. One is to remove the SD card and use a high-speed card reader to copy the data. The disadvantage of this method is that the card needs to be plugged in and out for each data interaction, and long-term plugging and unplugging of the card can easily lead to poor contact, which in turn affects the service life. Another method is to use the internal USB interface of the microcontroller, and use the SD card virtual U disk technology to enable the PC to recognize the SD card of the microcontroller as a drive letter, and copy data through a USB data cable. This method requires a lot of code programming and USB transplantation, and has high technical requirements for individual individuals. At the same time, most microcontrollers do not support high-speed USB interfaces (480M), and an additional external USB controller is required, which will further increase the cost of the microcontroller, and there is also a certain risk of stability. Utility Model Content

[0006] In view of the above-mentioned problems and defects existing in the prior art, the utility model provides a high-speed SD card reading and writing circuit based on bus switching. Through the circuit design, the writing of high-speed SD card data in the microcontroller system is realized, and the microcontroller end completes high-speed data transmission with the PC end through the USB interface, and realizes automatic switching between the two. The whole process does not require program control, and the switching is automatically completed by hardware, which is convenient and simple.

[0007] In order to achieve the above purpose, the utility model adopts the following technical solutions:

[0008] A high-speed SD card reading and writing circuit based on bus switching, comprising an SD card reading and writing circuit, a USB interface circuit, a bus automatic switch switching circuit and a micro-control interface circuit; wherein the SD card reading and writing circuit and the USB interface circuit are both bus-connected to the bus automatic switch switching circuit, the bus automatic switch switching circuit is bus-connected to the micro-control interface circuit, and data transmission is performed through the bus connection;

[0009] The bus automatic switch switching circuit comprises a USB-side bus switching chip and a microcontroller-side bus switching chip; the control pin of the USB-side bus switching chip is grounded, and the power pin is connected to the power input pin of the USB interface circuit; the control pin of the microcontroller-side bus switching chip is connected to the power input pin of the USB interface circuit, and the power pin is connected to the power input pin of the microcontroller interface circuit.

[0010] According to a further technical solution, the SD card reading and writing circuit includes an SD card socket; the USB interface circuit includes a TYPE-C socket USB interface and a USB card reader chip connected to each other; and the microcontroller interface circuit includes a microcontroller interface socket.

[0011] A further technical solution is that the USB card reader chip is connected to the USB-side bus switching chip through the SD card interface bus, the SD card socket is multiplexedly connected to the USB-side bus switching chip and the microcontroller-side bus switching chip through the SD data transmission bus, and the microcontroller-side bus switching chip is connected to the microcontroller interface socket through the MCU control bus.

[0012] According to a further technical solution, the power pin of the USB bus switching chip is connected to the power input pin of the TYPE-C socket USB interface in the USB interface circuit, and is also connected to the filter capacitor C1 and then grounded.

[0013] According to a further technical solution, the control pin of the USB-side bus switching chip is connected to a pull-down resistor R6 and then grounded.

[0014] As a further technical solution, the control pin of the bus switching chip on the microcontroller side is connected to the power input pin of the TYPE-C socket USB interface in the USB interface circuit, and is also connected to the pull-down resistor R12 and then grounded.

[0015] According to a further technical solution, the power pin of the bus switching chip on the microcontroller end is connected to the power input pin of the microcontroller interface socket in the microcontroller interface circuit, and is also connected to the filter capacitor C5 and then grounded.

[0016] According to a further technical solution, the USB interface circuit further includes an ESD surge protection chip, pull-down resistors R2 and R3, and current limiting resistors R4 and R5;

[0017] Among them, the PD fast charging device identification interface pin of the TYPE-C socket USB interface is connected to the pull-down resistors R2 and R3 and then grounded, the positive and negative pins of the USB differential data line of the TYPE-C socket USB interface are respectively connected to one end of the current limiting resistors R4 and R5, and the other end of the current limiting resistors R4 and R5 are connected to the USB card reader chip; the negative pin of the USB differential data line of the TYPE-C socket USB interface is also connected to the ESD surge protection chip.

[0018] According to a further technical solution, the SD card read / write circuit further includes a power filter capacitor C4, the VDD pin of the SD card socket is connected to the power filter capacitor and then grounded, and the power filter capacitor is connected to the power input pin of the microcontroller interface socket in the microcontroller interface circuit.

[0019] According to a further technical solution, the microcontroller interface circuit also includes a power filter capacitor C3, and the power input pin of the microcontroller interface socket is connected to the filter capacitor C3 and then grounded, and at the same time, the power input pin of the microcontroller interface socket is connected to the power pin of the bus switching chip on the microcontroller end.

[0020] Compared with the prior art, the utility model has the following beneficial effects:

[0021] The utility model provides a high-speed SD card reading and writing circuit based on bus switching. By switching the bus switch and cooperating with a USB card reader chip, a hardware automatic switching function of the SD card bus control right of a microcontroller system based on high-speed SD card reading and writing can be realized. The high-speed data storage of the microcontroller system and the data interaction between the PC end and the microcontroller system through a high-speed USB interface can be automatically switched. The writing of high-speed SD card data in the microcontroller system and the completion of high-speed data transmission between the microcontroller end and the PC end through the USB interface can be realized. The whole process does not require complicated USB programming or program control, and the switching is automatically completed by hardware. The process is convenient and simple, and has high stability. The problem of poor contact caused by repeated insertion and removal of the SD card in the microcontroller system and the problem that the microcontroller system cannot realize high-speed data interaction with the PC end without a high-speed USB interface are effectively solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation on the present invention.

[0023] Figure 1 It is a system block diagram of the high-speed SD card reading and writing circuit based on bus switching described in the utility model;

[0024] Figure 2 It is a schematic diagram of a USB interface circuit in a high-speed SD card reading and writing circuit based on bus switching described in the utility model;

[0025] Figure 3 It is a schematic diagram of an SD card reading and writing circuit in a high-speed SD card reading and writing circuit based on bus switching described in the utility model;

[0026] Figure 4 It is a schematic diagram of a bus automatic switch switching circuit in a high-speed SD card reading and writing circuit based on bus switching described in the utility model;

[0027] Figure 5 It is a schematic diagram of a microcontroller interface circuit in a high-speed SD card reading and writing circuit based on bus switching described in the utility model. DETAILED DESCRIPTION

[0028] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0029] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0030] In order to solve the application of SD card data storage in microcontroller system without high-speed USB transmission interface, eliminate the complex programming caused by high-speed USB transmission and replace the application of external USB controller, the utility model provides a high-speed SD card reading and writing circuit based on bus switching, such as Figure 1 As shown, it includes an SD card reading and writing circuit, a USB interface circuit, a bus automatic switching circuit and a micro-control interface circuit; wherein the SD card reading and writing circuit and the USB interface circuit are both bus-connected to the bus automatic switching circuit, the bus automatic switching circuit is bus-connected to the micro-control interface circuit, and data transmission is performed through the bus connection.

[0031] Furthermore, the SD card reading and writing circuit includes an SD card holder U5, a USB interface circuit includes a TYPE-C socket USB interface (i.e., a TYPE-C socket USB1) and a USB card reader chip U3 connected to each other, a bus automatic switch circuit includes a USB-side bus switch chip U2 and a microcontroller-side bus switch chip U1, and a microcontroller interface circuit includes a microcontroller interface holder P1. The USB card reader chip is connected to the USB-side bus switch chip via the SD card interface bus, the SD card holder is multiplexed to the USB-side bus switch chip and the microcontroller-side bus switch chip via the SD data transmission bus, and the microcontroller-side bus switch chip is connected to the microcontroller interface holder via the MCU control bus.

[0032] like Figure 2 As shown, the USB interface circuit includes a TYPE-C socket USB interface and a USB card reader chip connected to each other, and also includes an ESD surge protection chip, pull-down resistors R2 and R3, and current limiting resistors R4 and R5. Among them, the PD fast charging device identification interface pin of the TYPE-C socket USB interface is connected to the pull-down resistors R2 and R3 and then grounded, the TYPE-C socket USB interface is connected to one end of the current limiting resistors R4 and R5, and the other end of the current limiting resistors R4 and R5 is connected to the USB card reader chip; the TYPE-C socket USB interface is also connected to the ESD surge protection chip.

[0033] Specifically, pin B5 (CC2) of the TYPE-C socket USB1 is connected to the pull-down resistor R3, and pin A5 (CC1) of the TYPE-C socket USB1 is connected to the pull-down resistor R2, wherein pin B5 (CC2) and pin A5 (CC1) are PD fast charging device identification interface pins. Since the utility model does not involve charging-related content, the charging function is shielded by pull-down resistors R2 and R3. Furthermore, TYPE-C socket USB1 pins B7 and A7 are connected to current limiting resistor R5, TYPE-C socket USB1 pins B6 and A6 are connected to current limiting resistor R4, TYPE-C socket USB1 pins B7 (DN2) and A7 (DN1) are connected to ESD surge protection chip D1 pin 2, and TYPE-C socket USB1 pins B6 (DP2) and A6 (DP1) are connected to ESD surge protection chip D1 pin 1; among them, pins DP1, 2 and DN1, 2 are the two pins of the positive and negative poles of the data transmission differential line respectively, DP is the positive pole of the USB differential data line, DN is the negative pole of the USB differential data line, and surge protection pins 1 and 2 are used to eliminate static electricity during plugging and unplugging and to suppress surges in the input power supply. In the present invention, the ESD anti-static chip is ESD5302F, which is used to protect USB plug-in and unplug and external static interference; the USB card reader chip U3 pin 15 is connected to the current limiting resistor R5, and the USB card reader chip U3 pin 16 is connected to the current limiting resistor R4. The current limiting resistors R4 and R5 are used to protect against accidental overcurrent during data transmission, and can eliminate the signal ringing phenomenon during high-speed transmission, thereby improving the stability of the overall signal transmission. Furthermore, the USB card reader chip U3 pins 9, 10, and 12 are respectively connected to the TYPE-C socket USB1 pin B4A9 (USB power input pin) and pin A4B9 (USB power input pin). The USB card reader chip U3 uses GL823K, which supports high-speed USB2.0 (480Mbps) signal transmission, and supports a variety of SD card types, which can meet the daily application of microcontrollers. Moreover, pins 2, 3, 4, 5, 6, and 7 of the USB card reader chip U3 are SD card interface bus pins, which are connected to pins 18, 17, 16, 15, 14, and 13 of the bus switching circuit end U1 chip through the SD card interface bus.

[0034] like Figure 3 As shown, the SD card reading and writing circuit includes an SD card holder and a power filter capacitor C4. The VDD pin of the SD card holder is connected to the power filter capacitor and then grounded. At the same time, the power filter capacitor is connected to the power input pin of the microcontroller interface holder in the microcontroller interface circuit.

[0035] Specifically, the SD card holder U5 pin is connected to the filter capacitor C4 and then grounded, and the filter capacitor C4 is connected to the pin 10 of P1 in the microcontroller interface circuit (the pin 10 is the power input pin) as the power input for the SD card holder. Pins 1, 2, 3, 5, 7, and 8 of the SD card holder U5 are used as SD data transmission bus pins, which are connected to the U1 chip 2, 3, 4, 5, 6, and 7 pins in the bus switching circuit through SD data transmission bus multiplexing, and are also connected to the U1 chip 2, 3, 4, 5, 6, and 7 pins in the bus switching circuit.

[0036] like Figure 5 As shown, the microcontroller interface circuit includes a microcontroller interface socket P1 and a power filter capacitor C3. The power input pin of the microcontroller interface socket is connected to the filter capacitor C3 and then grounded. At the same time, the power input pin of the microcontroller interface socket is connected to the power pin of the bus switching chip at the microcontroller end.

[0037] Specifically, pin 10 of the microcontroller interface socket P1 is connected to the filter capacitor C3 and then grounded, and at the same time, pin 10 of the microcontroller interface socket P1 is connected to pin 20 of the bus switching chip U1 at the microcontroller end of the bus switching switch circuit to power it; pins 1, 2, 3, 4, 5, and 6 of the microcontroller interface socket P1 are connected to pins 18, 17, 16, 15, 14, and 13 of the bus switching switch circuit U1.

[0038] like Figure 4As shown, the bus switching circuit includes a USB-side bus switching chip U2 (model SN74CBT3244PWR), a microcontroller-side bus switching chip U1 (model SN74CBT3244PWR), pull-down resistors R6 and R12, and power filter capacitors C1 and C5. Among them, the power pin of the USB-side bus switching chip is connected to the power input pin of the TYPE-C socket USB interface in the USB interface circuit, and is also connected to the filter capacitor C1 and then grounded; the control pin of the USB-side bus switching chip is connected to the pull-down resistor R6 and then grounded; the control pin of the microcontroller-side bus switching chip is connected to the power input pin of the TYPE-C socket USB interface in the USB interface circuit, and is also connected to the pull-down resistor R12 and then grounded; the power pin of the microcontroller-side bus switching chip is connected to the power input pin of the microcontroller interface socket in the microcontroller interface circuit, and is also connected to the filter capacitor C5 and then grounded. Specifically, the control pins 1 and 19 of the bus switching chip U2 on the USB side are connected to the pull-down resistor R6 and then grounded, and the control pins 1 and 19 of the bus switching chip U1 on the microcontroller side are connected to the pull-down resistor R12 and then grounded, and the control pins 1 and 19 of U1 are also connected to the B4A9 and A4B9 power input pins of USB1 in the USB interface circuit; the power pin 20 of the bus switching chip U2 on the USB side is connected to the filter capacitor C1 and then grounded, and the power pin 20 is also connected to the B4A9 and A4B9 power input pins of the USB interface circuit USB1; the power pin 20 of the bus switching chip U1 on the microcontroller side is connected to the filter capacitor C5 and then grounded, and the power pin 20 is also connected to the microcontroller interface circuit P1 pin 10, i.e., the power input pin.

[0039] Through the above circuit design, the automatic switching of the control right of the SD card read and write bus is realized through the high-speed bus switch array: when the external high-speed USB data line is inserted, the control pins 1 and 19 of the bus switch chip U1 on the microcontroller side are in a disabled state due to the high level input of the USB power supply, and the bus switch chip U2 on the USB side is in a valid state, thereby obtaining the control right of the SD card bus, and the high-speed data reading and writing of the SD card on the PC side can be completed through the USB card reader chip; when the external high-speed USB data line is not inserted, the control pin of the bus switch chip on the microcontroller side is in a pull-down state and enters a valid state, while the bus switch chip U2 on the USB side is in a disabled state due to the use of USB power supply, and the control pins 1 and 19 of the bus switch chip U1 on the microcontroller side are in a level-valid state, at this time, the microcontroller side obtains the SD card bus read and write permission, and completes the high-speed reading and writing of the SD card. The above bus switching is completely controlled by hardware according to whether the USB cable is inserted and automatically completed, without programming.

[0040] Although the above describes the specific implementation methods of the utility model in combination with the accompanying drawings, it is not intended to limit the scope of protection of the utility model. Technical personnel in the relevant field should understand that on the basis of the technical solution of the utility model, various modifications or deformations that can be made by technical personnel in this field without creative work are still within the scope of protection of the utility model.

Claims

1. A high-speed SD card reading and writing circuit based on bus switching, characterized in that: It includes an SD card reading and writing circuit, a USB interface circuit, a bus automatic switch switching circuit and a micro-control interface circuit; wherein the SD card reading and writing circuit and the USB interface circuit are both connected to the bus automatic switch switching circuit by bus, and the bus automatic switch switching circuit is connected to the micro-control interface circuit by bus, and data is transmitted through the bus connection; The bus automatic switch switching circuit comprises a USB-side bus switching chip and a microcontroller-side bus switching chip; the control pin of the USB-side bus switching chip is grounded, and the power pin is connected to the power input pin of the USB interface circuit; the control pin of the microcontroller-side bus switching chip is connected to the power input pin of the USB interface circuit, and the power pin is connected to the power input pin of the microcontroller interface circuit.

2. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 1, characterized in that: The SD card reading and writing circuit includes an SD card seat; the USB interface circuit includes a TYPE-C socket USB interface and a USB card reader chip connected to each other; and the microcontroller interface circuit includes a microcontroller interface seat.

3. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 2, characterized in that: The USB card reader chip is connected to the USB-side bus switching chip via the SD card interface bus, the SD card socket is multiplexedly connected to the USB-side bus switching chip and the microcontroller-side bus switching chip via the SD data transmission bus, and the microcontroller-side bus switching chip is connected to the microcontroller interface socket via the MCU control bus.

4. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 1, characterized in that: The power pin of the USB bus switching chip is connected to the power input pin of the TYPE-C socket USB interface in the USB interface circuit, and is also connected to the filter capacitor C1 and then grounded.

5. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 1, characterized in that: The control pin of the USB bus switching chip is connected to the pull-down resistor R6 and then grounded.

6. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 1, characterized in that: The control pin of the bus switching chip on the microcontroller side is connected to the power input pin of the TYPE-C socket USB interface in the USB interface circuit, and is also connected to the pull-down resistor R12 and then grounded.

7. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 1, characterized in that: The power pin of the bus switching chip at the microcontroller end is connected to the power input pin of the microcontroller interface socket in the microcontroller interface circuit, and is also connected to the filter capacitor C5 and then grounded.

8. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 2, characterized in that: The USB interface circuit also includes an ESD surge protection chip, pull-down resistors R2 and R3, and current limiting resistors R4 and R5; Among them, the PD fast charging device identification interface pin of the TYPE-C socket USB interface is connected to the pull-down resistors R2 and R3 and then grounded, the positive and negative pins of the USB differential data line of the TYPE-C socket USB interface are respectively connected to one end of the current limiting resistors R4 and R5, and the other end of the current limiting resistors R4 and R5 are connected to the USB card reader chip; the negative pin of the USB differential data line of the TYPE-C socket USB interface is also connected to the ESD surge protection chip.

9. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 2, characterized in that: The SD card read-write circuit also includes a power filter capacitor C4, the VDD pin of the SD card socket is connected to the power filter capacitor and then grounded, and the power filter capacitor is connected to the power input pin of the microcontroller interface socket in the microcontroller interface circuit.

10. The high-speed SD card reading and writing circuit based on bus switching as claimed in claim 2, characterized in that: The microcontroller interface circuit also includes a power filter capacitor C3. The power input pin of the microcontroller interface is connected to the filter capacitor C3 and then grounded. At the same time, the power input pin of the microcontroller interface is connected to the power pin of the bus switching chip at the microcontroller end.