Female, male, electronic device and communication system
By using female and male connectors and different pin connection methods, the communication and programming functions between the host computer and the microcontroller are realized, which solves the problem of PCB design difficulty caused by the large number of pins of the Type-C interface, and improves the ease of operation and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- BYD CO LTD
- Filing Date
- 2025-06-30
- Publication Date
- 2026-08-04
AI Technical Summary
The large number of pins in existing Type-C interfaces increases the difficulty of PCB design and makes it difficult to achieve communication and programming functions between the host computer and the microcontroller without adding more pins.
Design a female and male connector. By using different pin connections when the male connector is inserted into the female connector in the correct or reverse direction, a communication or programming connection between the host computer and the microcontroller can be achieved. Multiple first pins of the female connector correspond to the second pins of the male connector. The connections are different when the male connector is inserted in the correct or reverse direction to realize programming and communication functions.
It enables the programming and communication functions of the host computer and microcontroller without increasing the number of pins, improving ease of operation, shortening the production cycle, reducing costs, and increasing the usable space on the circuit board.
Smart Images

Figure CN224595989U_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more particularly to a female connector, a male connector, an electronic device, and a communication system. Background Technology
[0002] With users demanding thinner, more convenient, smarter, and more standardized electronic devices, the Type-C interface is widely used. Currently, the 24-pin Type-C interface is mainly used to achieve communication and programming functions between host computers and microcontrollers.
[0003] However, since the Type-C interface is located on the PCB (Printed Circuit Board), and the Type-C interface has a large number of pins, it increases the design difficulty of the PCB.
[0004] Therefore, it is quite difficult to reduce the number of pins on the Type-C interface while still enabling communication and programming functions between the host computer and the microcontroller. Utility Model Content
[0005] This application provides a female connector, a male connector, an electronic device, and a communication system to achieve communication and programming functions between a host computer and a microcontroller while reducing the number of pins on the Type-C interface.
[0006] In a first aspect, embodiments of this application provide a female connector, comprising:
[0007] Multiple first pins correspond to multiple second pins of the male connector;
[0008] Wherein, the second pins connected to each of the first pins when the male connector is inserted into the female connector are different from the second pins connected to each of the first pins when the male connector is inserted into the female connector, so as to enable the host computer connected to the male connector to communicate or program with the microcontroller connected to the female connector.
[0009] In one possible implementation, the plurality of first pins include: a first positive differential signal pin and a first negative differential signal pin;
[0010] When the male connector is inserted into the female connector, the first positive differential signal pin and the first negative differential signal pin are respectively connected to the second positive differential signal pin and the second negative differential signal pin among the plurality of second pins, so as to enable the host computer to communicate with the microcontroller.
[0011] In one possible implementation, the first positive differential signal pin is also connected to the microcontroller's data receiving pin, and the first negative differential signal pin is also connected to the microcontroller's data transmitting pin.
[0012] In one possible implementation, the plurality of first pins includes: a third positive differential signal pin and a third negative differential signal pin;
[0013] When the male connector is inserted into the female connector in reverse, the third positive differential signal pin and the third negative differential signal pin are respectively connected to the second positive differential signal pin and the second negative differential signal pin.
[0014] In one possible implementation, the third positive differential signal pin is also connected to the microcontroller's programming input / output pin, and the third negative differential signal pin is also connected to the microcontroller's programming clock pin.
[0015] In one possible implementation, the female connector is a 16-pin Type-C interface.
[0016] Secondly, this application provides a male head, comprising:
[0017] Multiple second pins correspond to multiple first pins of the female connector;
[0018] The first pins connected to the second pins when the male connector is inserted into the female connector are different from the first pins connected to the second pins when the male connector is inserted into the female connector, so as to enable the host computer connected to the male connector to communicate or program with the microcontroller connected to the female connector.
[0019] In one possible implementation, the plurality of second pins includes a second positive differential signal pin and a second negative differential signal pin;
[0020] When the male connector is inserted into the female connector, the second positive differential signal pin and the second negative differential signal pin are respectively connected to the first positive differential signal pin and the first negative differential signal pin among the plurality of first pins;
[0021] When the male connector is inserted into the female connector in reverse, the second positive differential signal pin and the second negative differential signal pin are respectively connected to the third positive differential signal pin and the third negative differential signal pin among the plurality of first pins.
[0022] In one possible implementation, when the male connector is inserted into the female connector, the second positive differential signal pin is also connected to the data transmission pin of the host computer, and the second negative differential signal is also connected to the data reception pin of the host computer.
[0023] When the male connector is inserted into the female connector in reverse, the second positive differential signal pin is also connected to the programming input / output pin of the host computer, and the second negative differential signal pin is also connected to the programming clock pin of the host computer.
[0024] In one possible implementation, the male connector is at least one of a 16-pin Type-C interface and a 24-pin Type-C interface.
[0025] Thirdly, this application provides an electronic device including the female connector described in the first aspect and the male connector described in the second aspect.
[0026] In one possible implementation, it further includes a microcontroller connected to the female connector.
[0027] Fourthly, this application provides a communication system, including the electronic device described in the third aspect, and a host computer;
[0028] The electronic device and the host computer are connected via communication or programming.
[0029] The female connector, male connector, electronic device, and communication system provided in this application embodiment include a female connector with multiple pins, and multiple first pins correspond to the second pins of the male connector. When the male connector is inserted into the female connector in the correct position, the second pins connected to each of the first pins are different from the second pins connected to each of the first pins when the male connector is inserted into the female connector in the reverse position. This enables the host computer connected to the male connector and the microcontroller connected to the female connector to communicate or program, thereby realizing programming and communication functions without adding pins. Attached Figure Description
[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0031] Figure 1 This is a schematic diagram of the pins of a female connector;
[0032] Figure 2 This is a pin diagram for another type of female connector;
[0033] Figure 3 A schematic diagram of the structure of a female head provided in this application;
[0034] Figure 4 A pin diagram of a male connector provided for this application;
[0035] Figure 5 A schematic diagram of the structure of an electronic device provided in this application;
[0036] Figure 6 A schematic diagram of the structure of a single-chip microcomputer is provided in this application;
[0037] Figure 7 A schematic diagram of the structure of a single-chip microcomputer is provided in this application;
[0038] Figure 8This is a schematic diagram of the structure of a communication system provided in this application.
[0039] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0041] With users demanding thinner, more convenient, smarter, and more standardized interfaces for mobile phones, tablets, and other electronic devices, the Type-C interface has become widely used. The Type-C interface supports multiple protocols (such as DisplayPort Alt Mode and HDMI Alt Mode), allowing for direct transmission of video and data signals. Therefore, users can directly connect monitors, mice, keyboards, and other devices via the Type-C interface for office work, reducing reliance on traditional computers or laptops.
[0042] In the development of electronic devices, the programming and debugging of microcontrollers typically require a dedicated Type-C interface. Currently, a 24-pin Type-C interface is mainly used to achieve communication and programming between the microcontroller and an external host computer. For example... Figure 1 As shown, pins A6 and A7 are connected to the microcontroller's RX pin, and pins A7 and B7 are connected to the microcontroller's TX pin, enabling communication between the microcontroller and the host computer. Pins A2 and B2 are connected to the microcontroller's SWDIO pin, and pins B11 and A11 are connected to the microcontroller's SWCLK pin, enabling the microcontroller's programming function.
[0043] However, since the Type-C interface is located on the PCB (Printed Circuit Board), and has a relatively large number of pins, it increases the design complexity of the PCB. Furthermore, some devices in existing electrical products, such as FPGAs (Field Programmable Gate Arrays) and MCUs (Microcontroller Units), require independent debugging sockets on the circuit board, and serial communication also requires a separate interface. Therefore, the number of pins on the interface should be minimized.
[0044] For example, a 16-pin Type-C interface can be used, but the 16-pin Type-C interface omits pins A2, B2, A3, B3, A10, B10, A11, and B11. If we follow... Figure 1 The circuit connection method allows only one of the two functions: programming and communication. In other words, the electronic device can only perform programming or communication functions, which affects the performance of the electronic device.
[0045] Furthermore, since the PCB is located inside the electronic device, if programming and debugging are required, the external structure of the entire device must be opened, which wastes time, increases the work cycle, and is inconvenient to operate.
[0046] Therefore, this application proposes a female connector, in which multiple first pins of the female connector correspond to the second pins of the male connector. When the male connector is inserted into the female connector in the correct position, the second pins connected to each of the first pins are different from the second pins connected to each of the first pins when the male connector is inserted into the female connector in the reverse position. This enables the host computer connected to the male connector and the microcontroller connected to the female connector to communicate or program, thereby achieving programming and communication functions without the need to add pins.
[0047] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0048] Figure 3 The structural diagram of the female head provided in this application is as follows: Figure 3 As shown, the female connector provided in this application includes:
[0049] Multiple first pins correspond to multiple second pins of the male connector;
[0050] The second pins connected to the first pins when the male connector is inserted into the female connector are different from the second pins connected to the first pins when the male connector is inserted into the female connector, so as to enable the host computer connected to the male connector to communicate or program with the microcontroller connected to the female connector.
[0051] In this embodiment, since the female connector connects to the microcontroller and the male connector connects to the host computer, when the male connector is plugged into the female connector, the connection between the microcontroller and the host computer can be achieved. Furthermore, combined with... Figure 2 and Figure 4 As shown, where, Figure 4 (a) in the text indicates positive interpolation. Figure 4 (b) indicates reverse insertion. By inserting the male connector into the female connector in either the correct or reverse direction, different pins of the male and female connectors can be connected, enabling different functional connections between the microcontroller and the host computer. Specifically, this enables communication or programming connections, thus achieving programming and communication functions without increasing the number of pins.
[0052] Furthermore, by using an external male connector, it is possible to perform tasks such as debugging, burning, firmware updates, and serial port control communication of product chips without disassembling the device. Especially when mass-produced products encounter problems and require repair, it can greatly improve upgrade efficiency, make operation more convenient and faster, significantly reduce product costs, increase the usable space of the circuit board, and shorten the product production cycle.
[0053] When the microcontroller and the host computer are connected, they can exchange data, such as sensor data transmission, user command interaction, and remote control. When the microcontroller and host computer are connected for programming, the host computer can perform functions such as programming, firmware updates, and debugging. Programming refers to the host computer writing the compiled program into the microcontroller; firmware updates refer to the host computer pushing new firmware to the microcontroller; and debugging refers to the host computer monitoring the microcontroller's operating status.
[0054] It should be noted that a female connector can also be called a Type-C socket, and a male connector can also be called a Type-C plug. The male connector is usually the part that the user inserts into the device, while the female connector is usually the interface part of the device. Whether the male connector is plugged into the female connector correctly or the female connector is plugged into the female connector in reverse, it is only a difference in physical state, not a difference in the interface.
[0055] In some embodiments, such as Figure 3 As shown, the plurality of first pins include a first positive differential signal pin (e.g., Figure 3 Pin numbered B6) and the first negative differential signal pin (e.g.) Figure 3 The pin numbered B7 in the middle, that is, the female connector includes the first positive differential signal pin and the first negative differential signal pin. For example... Figure 4 As shown, the plurality of second pins include a second positive differential signal pin (e.g., Figure 4The pin numbered A6 in the middle) and the second negative differential signal pin (e.g. Figure 4 The male connector (pin A7) includes a second positive differential signal pin and a second negative differential signal pin. When the male connector is inserted into the female connector, the first positive differential signal pin and the first negative differential signal pin are connected to the second positive differential signal pin and the second negative differential signal pin, respectively. In other words, the first positive differential signal pin is connected to the second positive differential signal pin, and the first negative differential signal pin is connected to the second negative differential signal pin. Based on this, communication between the host computer and the microcontroller can be achieved.
[0056] For example, the female connector is also connected to the data receive and data transmit pins of the microcontroller, and when the male connector is inserted into the female connector, it is also connected to the data receive and data transmit pins of the host computer. Correspondingly, when the first positive differential signal pin and the first negative differential signal pin of the female connector are connected to the second positive differential signal pin and the second negative differential signal pin of the male connector, it is possible to connect the data receive pin of the microcontroller to the data transmit pin of the host computer, and vice versa, thereby achieving a communication connection between the host computer and the microcontroller.
[0057] In one possible implementation, such as Figure 3 As shown, the first positive differential signal pin is also connected to the microcontroller's data receive pin UART_TX, and the first negative differential signal pin is also connected to the microcontroller's data transmit pin UART_RX. Correspondingly, when the male connector is inserted into the female connector, the first positive differential signal pin is connected to the microcontroller's data receive pin and the male connector's second positive differential signal pin, and the first negative differential signal pin is connected to the microcontroller's data transmit pin UART_RX and the male connector's second positive differential signal pin, thereby establishing a communication connection between the microcontroller and the host computer.
[0058] For example, when the male connector is inserted into the female connector, the second positive differential signal pin is also connected to the data transmission pin of the host computer, and the second negative differential signal is also connected to the data reception pin of the host computer, so that the communication connection between the microcontroller and the host computer can be realized.
[0059] In some embodiments, the plurality of first pins include a third positive differential signal pin (e.g. Figure 3 The pin numbered A6 in the middle) and the third negative differential signal pin (e.g. Figure 3 The pin numbered A7 in the diagram represents the female connector, which includes a third positive differential signal pin and a third negative differential signal pin. When the male connector is reversed and inserted into the female connector, the third positive differential signal pin and the third negative differential signal pin are respectively connected to the second positive differential signal pin and the second negative differential signal pin. In other words, the third positive differential signal pin is connected to the second positive differential signal pin, and the third negative differential signal pin is connected to the second negative differential signal pin. Based on this, the programming connection between the host computer and the microcontroller can be achieved.
[0060] For example, the female connector is also connected to the microcontroller's programming input / output pins and programming clock pins. When the male connector is reversed and inserted into the female connector, it is also connected to the host computer's programming input / output pins and programming clock pins. Correspondingly, when the third positive differential signal pin and the third negative differential signal pin of the female connector are connected to the second positive differential signal pin and the second negative differential signal pin of the male connector, the programming input / output pins of the microcontroller and the host computer can be connected, as well as the programming clock pins of the microcontroller and the host computer can be connected, thereby realizing the programming connection between the host computer and the microcontroller.
[0061] In one possible implementation, such as Figure 3 As shown, the third positive differential signal pin is also connected to the microcontroller's programming input / output pin SWDIO, and the third negative differential signal pin is also connected to the microcontroller's programming clock pin SWCLK. Correspondingly, when the male connector is reversed and inserted into the female connector, the third positive differential signal pin is connected to the microcontroller's programming input / output pin SWDIO and the male connector's second positive differential signal pin, and the third negative differential signal pin is connected to the microcontroller's programming clock pin SWCLK and the male connector's second negative differential signal pin, thus achieving the programming connection between the microcontroller and the host computer.
[0062] For example, when the male connector is inserted into the female connector in reverse, the second positive differential signal pin is also connected to the programming input / output pin of the host computer, and the second negative differential signal pin is also connected to the programming clock pin of the host computer, so that the programming connection between the microcontroller and the host computer can be realized.
[0063] It should be noted that the first positive differential signal pin, first negative differential signal pin, third positive differential signal pin, and third negative differential signal pin of the female connector can be collectively referred to as the female connector's communication interface. The second positive differential signal pin and second negative differential signal pin of the male connector are connected to the host computer's communication interface or programming interface, and therefore can be referred to as the male connector's communication interface or programming interface. The microcontroller's data transmit and receive pins can be collectively referred to as the microcontroller's communication interface; the microcontroller's programming input / output interface and programming clock pin can be collectively referred to as the microcontroller's programming interface. Similarly, the host computer's data transmit and receive pins can be collectively referred to as the host computer's communication interface; the host computer's programming input / output pins and programming clock pin can be collectively referred to as the host computer's programming interface.
[0064] In a microcontroller, the programming input / output pin is used to receive and send debug data. It's a bidirectional data line used to exchange debug commands, status information, and data with the host computer. The microcontroller receives debug commands from the host computer through the programming input / output pin and sends responses and data back to the host computer through the same pin. The programming clock pin receives a clock signal from the host computer, which is used to synchronize data transmission on the programming clock pin. The microcontroller uses the clock signal on the programming clock pin to coordinate data transmission and reception, ensuring data transmission synchronization.
[0065] In the host computer, the programming input / output pins are used to send debug commands and receive responses from the microcontroller; they are bidirectional data lines. The host computer sends debug commands to the microcontroller through the programming input / output pins and receives status information and data from the microcontroller. The programming clock pin is used to generate and send a clock signal to the microcontroller; the clock signal is used to synchronize data transmission. The host computer provides a clock signal through the programming clock pin to ensure that data transmission between the host computer and the microcontroller is synchronized.
[0066] In a microcontroller, the data transmit pin is used to send data. The microcontroller sends data to the host computer through the data transmit pin. This data may include sensor data, status information, or other information that needs to be transmitted. The data receive pin is used to receive data. The microcontroller receives data from the host computer through the data receive pin. This data may include commands, configuration data, or other control information.
[0067] In the host computer, the data transmit pin is used to send data. The host computer sends data to the microcontroller through the data transmit pin. This data may include control commands, configuration instructions, or other information that needs to be transmitted. The data receive pin is used to receive data. The host computer receives data from the microcontroller through the data receive pin. This data may include sensor data, status information, or other feedback information.
[0068] In serial communication, the microcontroller's data transmit pin is connected to the host computer's data receive pin, and vice versa. This cross-connection ensures correct data transmission between the two devices. Through the data transmit pin UART_RX and the data receive pin UART_TX, the microcontroller and host computer can communicate bidirectionally, supporting both data transmission and reception.
[0069] In practical applications, such as Figure 1 and Figure 3As shown, each first pin in the female connector has a corresponding function. For example, multiple first pins in the female connector may include a positive differential signal pin DP+, a negative differential signal pin DM-, a power ground pin GND, a power supply voltage pin VBUS, a configuration channel pin, and an auxiliary signal transmission pin. The positive differential signal pin DP+ may include a first positive differential signal pin DP+ and a third positive differential signal pin DP+, and the negative differential signal pin DM- may include a first negative differential signal pin DM- and a third negative differential signal pin DM-.
[0070] The power ground pin (GND) provides the reference voltage for the circuit; the power supply voltage pin (VBUS) provides power to the device; the configuration channel pin detects the insertion direction, device type, and negotiates the power role and current capability; the first positive differential signal pin (DP+) and the first negative differential signal pin (DM-) form a differential pair signal pin for USB 2.0 differential data transmission; the third positive differential signal pin (DP+) and the third negative differential signal pin (DM-) also form a differential pair signal pin for USB 2.0 differential data transmission. Auxiliary signal pins are primarily used in audio adapter mode or other specific modes. The number of power ground pins (GND) and power supply voltage pins (VBUS) can both be four, reducing the current density of each pin, minimizing resistance loss and heat generation, thereby improving the overall power transmission capability of the interface. Furthermore, the USB Type-C interface supports the USB Power Delivery (USB PD) protocol, which can transmit up to 100 watts of power (20 volts, 5 amps). Multiple power and ground pins contribute to the safe and efficient transmission of high power.
[0071] For example, such as Figure 2 and Figure 3 As shown, each pin has a corresponding number, making it easy to identify the location and function of each pin on the female connector. For example, the first positive differential signal pin is numbered B6, the first negative differential signal pin is numbered B7, the third positive differential signal pin is numbered A6, the third negative differential signal pin is numbered A7, the four power ground pins are numbered A1, A12, B1, and B12, the four power voltage pins are numbered A4, A9, B4, and B9, and the two configuration channel pins (e.g.) Figure 3 The CC1 and CC2 pins are numbered A5 and B5 respectively, and the two auxiliary signal pins (e.g.) Figure 3 The SBU1 and SBU2 in the data are numbered A8 and B8 respectively.
[0072] For example, the eight pins numbered A1-A12 can be located on the first side of the female connector, and the eight pins numbered B1-B12 can be located on the second side of the female connector. The first and second sides of the female connector are two opposite sides.
[0073] For example, such as Figure 3 As shown, configuration channel pins C1 and CC2 can be connected to resistors R39 and R40 respectively, pulled down to ground, or externally connected to the PD (Power Delivery) protocol circuit to realize PD fast charging communication function. Resistors R39 and R40 can be 5.1kΩ, 5%, and R0201 resistors, respectively.
[0074] For example, such as Figure 3 As shown, the power supply voltage pin numbered B9 can also be connected to a preset circuit. The preset circuit includes a resistor R60, a first capacitor C35, a second capacitor C34, a bidirectional trigger diode D2, and a unidirectional diode D1. The first end of the resistor R60 is connected to the power supply voltage pin. The second end of the resistor R60 is connected to the first end of the bidirectional trigger diode D2, the first end of the first capacitor C35, and the first end of the second capacitor C34, and is connected to the input voltage VIN1. The second ends of the bidirectional trigger diode D2, the first end of the first capacitor C35, and the second end of the second capacitor C34 are grounded. The anode of the unidirectional diode D1 is connected to the first end of the bidirectional trigger diode D2, the first end of the first capacitor C35, and the first end of the second capacitor C34. The cathode of the unidirectional diode D1 receives the boost voltage V_BOOST. The input voltage VIN provides power to the system; resistor R60 limits the current flowing through the circuit, providing basic current protection; the first capacitor C35 and the second capacitor C34 smooth voltage fluctuations and filter out high-frequency noise; the bidirectional trigger diode D2 provides overvoltage protection to prevent voltage spikes from damaging the circuit; and the unidirectional diode D2 prevents reverse power supply from damaging the circuit.
[0075] For example, the first capacitor C35 can be a 10uV, 16V, C0603 capacitor, and the second capacitor can be a 100nF, 16V, C0201 capacitor.
[0076] In one possible implementation, the female connector is a 16-pin Type-C interface, which allows programming and communication functions to be achieved by replacing the 24-pin Type-C with a 16-pin Type-C connector.
[0077] The female connector provided in this application has multiple first pins corresponding to the second pins of the male connector. When the male connector is inserted into the female connector in the correct position, the second pins connected to each of the first pins are different from the second pins connected to each of the first pins when the male connector is inserted into the female connector in the reverse position. This enables the host computer connected to the male connector and the microcontroller connected to the female connector to communicate or program, thereby achieving programming and communication functions without the need to add pins.
[0078] Figure 4 The structural diagram of the male connector provided in this application is as follows: Figure 4 As shown, the male connector provided in this application includes:
[0079] Multiple second pins correspond to multiple first pins of the female connector;
[0080] When the male connector is inserted into the female connector, the first pin connected to each of the second pins is different from the first pin connected to each of the second pins when the male connector is inserted into the female connector, so as to enable the host computer connected to the male connector to communicate or program with the microcontroller connected to the female connector.
[0081] In this embodiment, since the female connector connects to the microcontroller and the male connector connects to the host computer, the connection between the microcontroller and the host computer can be achieved when the male connector is plugged into the female connector. Furthermore, by inserting the male connector either correctly or incorrectly into the female connector, different pins of the male and female connectors can be connected, enabling different functional connections between the microcontroller and the host computer. Specifically, this allows for communication or programming connections, thus achieving programming and communication functions without increasing the number of pins.
[0082] In some embodiments, the plurality of second pins include a second positive differential signal pin and a second negative differential signal pin, that is, the male connector includes a second positive differential signal pin and a second negative differential signal pin. The plurality of first pins of the female connector include a first positive differential signal pin and a first negative differential signal pin, as well as a third positive differential signal pin and a third negative differential signal pin. When the male connector is inserted correctly into the female connector, the second positive differential signal pin and the second negative differential signal pin are connected to the first positive differential signal pin and the first negative differential signal pin, respectively; that is, the first positive differential signal pin and the second positive differential signal pin are connected, and the first negative differential signal pin and the second negative differential signal pin are connected, thereby realizing the communication connection between the microcontroller and the host computer. When the male connector is inserted incorrectly into the female connector, the second positive differential signal pin and the second negative differential signal pin are connected to the third positive differential signal pin and the third negative differential signal pin; that is, the second positive differential signal pin and the third positive differential signal pin are connected, and the second negative differential signal pin and the third negative differential signal pin are connected, thereby realizing the programming connection between the microcontroller and the host computer.
[0083] In one possible implementation, when the male connector is correctly inserted into the female connector, the second positive differential signal pin is also connected to the data transmission pin of the host computer, and the second negative differential signal pin is also connected to the data reception pin of the host computer, thereby achieving a communication connection between the host computer and the microcontroller when the male connector is correctly inserted into the female connector. When the male connector is reversed and inserted into the female connector, the second positive differential signal pin is also connected to the programming input / output pin of the host computer, and the second negative differential signal pin is also connected to the programming clock pin of the host computer, thereby achieving a programming connection between the host computer and the microcontroller when the male connector is reversed and inserted into the female connector.
[0084] For example, the first positive differential signal is connected to the microcontroller's data receive pin, the first negative differential signal is connected to the microcontroller's data transmit pin, the third positive differential signal is connected to the microcontroller's programming input / output pin, and the third negative differential signal is connected to the microcontroller's programming clock pin. When the male connector is inserted correctly into the female connector, the second positive differential signal is connected to the first positive differential signal, and the second negative differential signal is connected to the first negative differential signal, thus establishing a communication connection between the microcontroller and the host computer. When the male connector is inserted incorrectly into the female connector, the second positive differential signal is connected to the third positive differential signal, and the second negative differential signal is connected to the third negative differential signal, thus establishing a programming connection between the microcontroller and the host computer.
[0085] In one possible implementation, the male connector is at least one of a 16-pin Type-C interface and a 24-pin Type-C interface to meet more requirements.
[0086] The male connector provided in this application has multiple second pins that correspond to the first pins of the female connector. When the male connector is inserted into the female connector in the correct position, the first pins connected to each of the second pins are different from the first pins connected to each of the second pins when the male connector is inserted into the female connector in the reverse position. This enables the host computer connected to the male connector and the microcontroller connected to the female connector to communicate or program, thereby achieving programming and communication functions without adding pins to the female connector.
[0087] This application also provides an electronic device, such as Figure 5 As shown, it includes the aforementioned female head 200 and male head 300.
[0088] In one possible implementation, the electronic device further includes a microcontroller 100, which is connected to a female connector 200 so that the microcontroller 100 can be connected to an external host computer via the female connector 200 and the male connector 300.
[0089] For example, such as Figure 6 As shown, the microcontroller 50 may include at least one processor 501 and a memory 502. Optionally, the microcontroller 50 may also include a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus.
[0090] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0091] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0092] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0093] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0094] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0095] For example, a microcontroller may include multiple pins, such as Figure 7 As shown.
[0096] This application also provides a communication system, such as Figure 8 As shown, it includes the aforementioned electronic device 400 and host computer 500, and the electronic device 400 and host computer 500 are connected by communication or programming.
[0097] For example, the host computer may include a communication interface and a programming interface. The communication interface may include a data receiving pin and a data sending pin, and the programming interface may include programming input / output pins and a programming clock pin.
[0098] For example, the host computer may include a personal computer (PC), an embedded system, an industrial controller, a server, a mobile device, etc.
[0099] It should be noted that other embodiments of the invention will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings. Various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A female head, characterized in that, include: Multiple first pins correspond to multiple second pins of the male connector; Wherein, the second pins connected to each of the first pins when the male connector is inserted into the female connector are different from the second pins connected to each of the first pins when the male connector is inserted into the female connector, so as to enable the host computer connected to the male connector to communicate or program with the microcontroller connected to the female connector.
2. The female connector according to claim 1, characterized in that, The plurality of first pins include: a first positive differential signal pin and a first negative differential signal pin; When the male connector is inserted into the female connector, the first positive differential signal pin and the first negative differential signal pin are respectively connected to the second positive differential signal pin and the second negative differential signal pin among the plurality of second pins, so as to enable the host computer to communicate with the microcontroller.
3. The female head according to claim 2, characterized in that, The first positive differential signal pin is also connected to the data receiving pin of the microcontroller, and the first negative differential signal pin is also connected to the data transmitting pin of the microcontroller.
4. The female head according to claim 2, characterized in that, The plurality of first pins includes: a third positive differential signal pin and a third negative differential signal pin; When the male connector is inserted into the female connector in reverse, the third positive differential signal pin and the third negative differential signal pin are respectively connected to the second positive differential signal pin and the second negative differential signal pin.
5. The female connector according to claim 4, characterized in that, The third positive differential signal pin is also connected to the microcontroller's programming input / output pin, and the third negative differential signal pin is also connected to the microcontroller's programming clock pin.
6. The female connector according to any one of claims 1-5, characterized in that, The female connector is a 16-pin Type-C interface.
7. A male head, characterized in that, include: Multiple second pins correspond to multiple first pins of the female connector; The first pins connected to the second pins when the male connector is inserted into the female connector are different from the first pins connected to the second pins when the male connector is inserted into the female connector, so as to enable the host computer connected to the male connector to communicate or program with the microcontroller connected to the female connector.
8. The male head according to claim 7, characterized in that, The plurality of second pins includes a second positive differential signal pin and a second negative differential signal pin; When the male connector is inserted into the female connector, the second positive differential signal pin and the second negative differential signal pin are respectively connected to the first positive differential signal pin and the first negative differential signal pin among the plurality of first pins; When the male connector is inserted into the female connector in reverse, the second positive differential signal pin and the second negative differential signal pin are respectively connected to the third positive differential signal pin and the third negative differential signal pin among the plurality of first pins.
9. The male head according to claim 8, characterized in that, When the male connector is inserted into the female connector, the second positive differential signal pin is also connected to the data transmission pin of the host computer, and the second negative differential signal is also connected to the data reception pin of the host computer. When the male connector is inserted into the female connector in reverse, the second positive differential signal pin is also connected to the programming input / output pin of the host computer, and the second negative differential signal pin is also connected to the programming clock pin of the host computer.
10. The male head according to any one of claims 7-9, characterized in that, The male connector is at least one of a 16-pin Type-C interface and a 24-pin Type-C interface.
11. An electronic device, characterized in that, It includes the female head as described in any one of claims 1-6, and the male head as described in any one of claims 6-9.
12. The electronic device according to claim 11, characterized in that, Also includes: A microcontroller is connected to the female connector.
13. A communication system, characterized in that, Includes the electronic device as described in claim 11 or 12, and a host computer; The electronic device and the host computer are connected via communication or programming.