CN107678995B - Data communication method and electronic equipment - Google Patents

Data communication method and electronic equipment Download PDF

Info

Publication number
CN107678995B
CN107678995B CN201710881572.9A CN201710881572A CN107678995B CN 107678995 B CN107678995 B CN 107678995B CN 201710881572 A CN201710881572 A CN 201710881572A CN 107678995 B CN107678995 B CN 107678995B
Authority
CN
China
Prior art keywords
interface
data
single bus
power interface
microcontroller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710881572.9A
Other languages
Chinese (zh)
Other versions
CN107678995A (en
Inventor
赵祥军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201710881572.9A priority Critical patent/CN107678995B/en
Publication of CN107678995A publication Critical patent/CN107678995A/en
Application granted granted Critical
Publication of CN107678995B publication Critical patent/CN107678995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Abstract

The invention discloses a data communication method and an electronic device, wherein the method is applied to the electronic device, and the electronic device comprises a microcontroller and a power interface respectively connected with a single bus interface of the microcontroller and the battery assembly. The method comprises the following steps: detecting whether a data receiving event exists in a power interface, and if the data receiving event exists, receiving data to be received through the power interface. Detecting whether a data transmission event exists, and if the data transmission event exists, transmitting data to be transmitted through the power interface. The invention provides a wired communication mode which is not easy to be interfered, and the reliability of communication is greatly improved.

Description

Data communication method and electronic equipment
Technical Field
The invention belongs to the technical field of electronics, and particularly relates to a data communication method and electronic equipment.
Background
Because the waterproof characteristic, the functional characteristic requirement and the appearance design requirement are higher and higher when the electronic product is designed, the design of the external interface of the electronic product is simpler and simpler, so that the electronic product usually only keeps the power interface.
In the prior art, because data communication is required with a PC (personal computer) terminal or a mobile terminal during the production test, maintenance or use of an electronic product, for an electronic device only having a power interface, only a wireless communication mode, for example, can be adopted: BLE (Bluetooh Low Energy, bluetooth low energy), bluetooth, wifi (Wireless Fidelity, wireless network), etc. to achieve data transmission. However, due to the existence of wireless interference in the communication environment, unstable wireless communication is easy to cause, so that the communication failure rate is high, and the reliability of data communication is poor.
Disclosure of Invention
In view of the above, the present invention provides a data communication method and an electronic device, which are used for solving the problem of high communication failure rate caused by poor reliability when the electronic device can only perform data communication through wireless communication, so as to ensure the reliability of the data communication.
In order to solve the technical problem, the invention provides a data communication method, which comprises the following steps:
detecting whether a data receiving event exists in the power interface;
if the data receiving event exists, receiving data to be received through the power interface; wherein the power interface is connected with a single bus interface of the microcontroller;
Detecting whether a data transmission event exists;
and if the data transmission event exists, transmitting data to be transmitted through the power interface.
Preferably, the method further comprises:
if the data receiving event or the data transmitting event exists, controlling a charging control component to cut off the charging connection between the power interface and the battery component; the charging control assembly is respectively connected with the microcontroller and the battery assembly.
Preferably, said receiving data to be received via said power interface if said data reception event exists comprises:
receiving data to be received from the power interface using the single bus interface if the data reception event exists;
the sending the data to be sent through the power interface if the data sending event exists comprises:
if the data transmission event exists, configuring the single bus interface for transmitting data;
transmitting data to be transmitted from the single bus interface through the power interface;
resetting the single bus interface to an initial state if the data to be sent is sent; wherein the initial state of the single bus interface is to receive data.
Preferably, said receiving data to be received via said power interface if said data reception event exists comprises:
receiving data to be received from the power interface through a first interface of the single bus interface if the data receiving event exists;
the sending the data to be sent through the power interface if the data sending event exists comprises:
if the data transmission event exists, configuring the current state of the first interface to be forbidden to receive data, and configuring the current state of the second interface of the single bus interface to be push-pull output for transmitting data;
transmitting data to be transmitted from the second interface through the power interface;
if the data to be sent is sent, resetting the first interface and the second interface to corresponding initial states respectively; the initial state of the first interface is the received data, and the initial state of the second interface is the open-drain output.
The invention provides an electronic device, which comprises a microcontroller, a battery assembly connected with the microcontroller, and a power interface respectively connected with a single bus interface of the microcontroller and the battery assembly;
The power interface is used for connecting a power supply to charge the battery assembly;
the microcontroller is used for receiving data to be received through the power interface when detecting that the power interface has a data receiving event; and when detecting that a data transmission event exists, transmitting data to be transmitted through the power interface.
Preferably, the battery pack further comprises a charging control assembly respectively connected with the microcontroller and the battery pack;
the power interface is connected with the battery assembly through the charging control assembly so as to establish charging connection with the battery assembly;
the microcontroller is also used for controlling the charging control component to cut off the charging connection between the power interface and the battery component when the data receiving event or the transmitting event exists.
Preferably, the power supply interface further comprises a voltage conversion circuit, and the power supply interface is connected with the single bus interface through the voltage conversion circuit.
Preferably, the voltage conversion circuit includes: pull-up resistor, MOS tube and protection resistor;
the first end of the MOS tube is connected with the first end of the pull-up resistor; the single bus interface is respectively connected with the first end of the MOS tube and the first end of the pull-up resistor;
And the second end of the MOS tube is connected with the power interface through the protection resistor.
Preferably, the microcontroller configures an initial state of the single bus interface to receive data;
when the data receiving event is detected, the single bus interface is utilized to receive data to be received from the power interface;
when detecting that the data transmission event exists, configuring the single bus interface for transmitting data; transmitting data to be transmitted from the single bus interface through the power interface; and detecting that the data to be sent is sent, and resetting the single bus interface to the initial state.
Preferably, the single bus interface includes a first interface and a second interface connected to the power interface;
the microcontroller configures the initial state of the first interface as receiving data, and the initial state of the second interface as open-drain output;
when the data receiving event is detected, the first interface is utilized to receive data to be received from the power interface;
when the data transmission event is detected, configuring the current state of the first interface as forbidden to receive data, and configuring the current state of the second interface as push-pull output for transmitting data; transmitting data to be transmitted from the second interface through the power interface; and when the data to be sent is detected to be sent, resetting the first interface and the second interface to corresponding initial states respectively.
Preferably, the power supply interface further comprises a voltage stabilizing circuit, and the power supply interface is connected with the single bus interface through the voltage stabilizing circuit.
Preferably, the voltage stabilizing circuit comprises a voltage stabilizing diode and an electrolytic capacitor;
the first end of the voltage stabilizing diode is connected with the single bus interface and is respectively connected with the first end of the electrolytic capacitor and the positive electrode of the power interface;
the battery component is respectively connected with the first end of the electrolytic capacitor and the first end of the zener diode;
and the second end of the zener diode is respectively connected with the second end of the electrolytic capacitor and the negative electrode of the power interface.
Compared with the prior art, the invention can obtain the following technical effects:
the invention provides a data communication method and electronic equipment, wherein the method is suitable for electronic equipment which has smaller volume, only uses a battery and a specific microcontroller and only keeps a power interface, realizes data transmission in a wired communication mode by multiplexing a power interface and a single bus interface of the microcontroller, and particularly receives data to be received through the power interface when detecting whether a data receiving event exists in the power interface or not. And detecting whether a data transmission event exists, and transmitting data to be transmitted through the power interface when the data transmission event is detected. Therefore, the problem of high failure rate in the test process due to the fact that the test can be carried out only through wireless communication is solved, a wired communication mode which is not easy to interfere is provided, the reliability of communication is greatly improved, and the success rate of the electronic product in the communication process is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic circuit diagram of one embodiment of an electronic device according to an embodiment of the present invention;
FIG. 2 is a schematic circuit diagram of an electronic device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another circuit configuration of an electronic device according to an embodiment of the present invention;
FIG. 4 is a flow chart of one embodiment of a method of data communication of an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a data communication apparatus according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention will be given with reference to the accompanying drawings and examples, by which the implementation process of how the present invention can be applied to solve the technical problems and achieve the technical effects can be fully understood and implemented.
The scheme provided by the invention is applicable to but not limited to an electronic product which uses an intentional semiconductor Cortex-Mx series singlechip or Nordic low-power Bluetooth series singlechip and other microcontrollers, has no communication interfaces such as USB (Universal Serial Bus ), UART (Universal Asynchronous Receiver/Transmitter, universal asynchronous receiver Transmitter) and the like, and only retains a power interface by using battery power. For example, mobile handrings, eyeglass type cameras, pocket cameras and other electronic products which are required to have high waterproof performance, convenient to carry and small in size.
Since the electronic device does not retain a wired communication interface, data communication can be performed only by wireless communication. But since the stability of data communication is generally affected by radio interference in the communication environment when radio communication is performed. For example, when the electronic product is tested, the test workshop has 2.4GHz wireless interference or other electronic products wireless interference, so that the stability of test data communication is affected, and the failure rate in the test is higher.
In order to solve the technical problem of high communication failure rate caused by poor reliability when electronic equipment can only perform data communication through wireless communication, the inventor provides a technical scheme through a series of researches. In the invention, through multiplexing the power interface and a single bus interface of the microcontroller, a wired communication mode is provided for realizing data transmission, specifically, through detecting whether a data receiving event exists in the power interface, when the data receiving event exists, the data to be received is received through the power interface. And detecting whether the microcontroller has a data transmission event, and transmitting data to be transmitted through the power interface when detecting that the data transmission event exists. Therefore, the wired communication mode which is not easy to interfere is provided, the reliability of communication is greatly improved, and the success rate of the electronic product in communication is further improved.
The technical scheme of the invention will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present invention, where the device includes a microcontroller 101, a battery assembly 102 connected to the microcontroller 101, and a power interface 103 connected to a single bus interface of the microcontroller 101 and the battery assembly 102, respectively.
The power interface 103 is used for connecting with a power supply to charge the battery assembly 102.
In the invention, the single bus interface realizes the serial port function of the power interface by multiplexing with the power supply line of the power interface 103. At this time, the power interface 103 may charge the battery assembly 102, or may be connected to a computer terminal or a mobile terminal through a USB-to-serial adapter board to realize data communication.
The adapter plate of the USB-to-serial interface is matched with the power interface 103 of the electronic device of the present invention, so that serial data transmitted by a single bus interface of the electronic device can be converted into USB data which can be transmitted to a computer terminal or a mobile terminal.
The microcontroller 101 is configured to receive data to be received through the power interface 103 when detecting that the power interface 103 has a data receiving event; when detecting that there is a data transmission event, data to be transmitted is transmitted through the power interface 103.
The single bus interface of the microcontroller 101 is normally set to a data reception state, and when a data reception event is detected at the power interface 103, data to be received can be received through the power interface 103. In order to ensure data communication of the electronic device, a task scheduler in the electronic device needs to detect whether a data receiving event exists in the power interface 103 by adopting a time-polling method. If a data reception event exists, the data reception event is processed.
In the invention, when the electronic device needs to send data through the single bus interface, a single bus interface call instruction is generated, and the microcontroller 101 can determine that a data sending event exists according to the single bus interface call instruction, and send data through the power interface 103 connected with the single bus interface, thereby completing data communication.
In the embodiment of the invention, the multiplexing of the power interface and the single bus interface of the microcontroller provides a wired communication mode to realize data transmission, thereby solving the problem of higher failure rate in test caused by the fact that the test can only be carried out through wireless communication, providing a wired communication mode which is not easy to be interfered, greatly improving the reliability of communication and further improving the success rate of the electronic product in communication.
In the actual data communication process, the power interface 103 may charge the battery assembly 102 while performing data communication, or may cut off the charging of the battery assembly 102 by the power interface 103 in order to ensure that the data communication is not disturbed, and resume the charging of the battery assembly 102 after the data communication is completed.
To enable control of the charging of the battery assembly 102, in some embodiments, the electronic device may further comprise a charge control assembly connected to the microcontroller 101 and the battery assembly 102, respectively; the power interface 103 is connected with the battery assembly 102 through the charging control assembly to establish a charging connection with the battery assembly 102;
microcontroller 101 is also configured to control the charge control component to disconnect the power interface 103 from the charge of the battery component 102 upon detecting the presence of a data reception event or a transmission event at the power interface 103.
In the embodiment of the invention, when the data communication is carried out through the power interface, the microcontroller controls the charging control component to cut off the charging connection between the power interface and the battery component, so that the data transmitted during the data communication can be ensured not to be interfered by the charging current, and the reliability and the stability of the data communication can be greatly improved.
In practical applications, the voltage when the power interface 103 is connected to an external charging device is usually 5V, and the voltage of the GPIO interface of the microcontroller 101 is usually 3.3V, and a voltage conversion circuit needs to be provided to ensure that the voltage at the single bus interface can be maintained at 3.3V when the single bus interface is connected to the power interface 103. Thus, as an embodiment, the electronic device may further comprise a voltage conversion circuit, through which the power interface 103 is connected to the single bus interface.
In the present invention, the voltage conversion circuit may include: pull-up resistor, MOS tube and protection resistor; the MOS tube can be an (N-mosfet, N-type metal-oxide-semiconductor).
The first end of the MOS tube is connected with the first end of the pull-up resistor; the single bus interface is respectively connected with the first end of the MOS tube and the first end of the pull-up resistor;
the second end of the MOS tube is connected with the power interface through a protection resistor.
In practical application, when the input voltage of the power interface 103 is 5V power or the 5V signal is '1', VGS (video monitoring operation protection system, video Guarantee System) is lower than a threshold value, the MOS transistor is not turned on, and the single bus interface maintains a 3.3V pull-up voltage, which is '1'; when the output of the single bus interface is '1', VGS is lower than the threshold value, the MOS transistor is not turned on, and the voltage of the power interface 103 is 5V power or 5V signal '1', that is, the power-on protection of the microcontroller 101 is performed when the power interface 103 is charged or performs data transmission, so that the voltage of the single bus interface can be kept at 3.3V.
For the purpose of protecting the battery assembly 102 from charging, the electronic device further comprises, as an embodiment, a voltage stabilizing circuit, through which the power interface 103 is connected to the single bus interface.
In this embodiment, the voltage stabilizing circuit may include a voltage stabilizing diode and an electrolytic capacitor.
The electrolytic capacitor has a filtering function, and the zener diode has an over-current protection function so as to ensure that the output voltage is kept in a stable state.
The first end of the voltage stabilizing diode is connected with the single bus interface and is respectively connected with the first end of the electrolytic capacitor and the positive electrode of the power interface;
the battery assembly 102 is respectively connected with the first end of the electrolytic capacitor and the first end of the zener diode;
the second end of the zener diode is connected to the second end of the electrolytic capacitor and the negative electrode of the power interface 103, respectively.
The electronic equipment in the invention realizes serial port output of a single bus interface by utilizing GPIO (General Purpose Input Output, general purpose input/output) characteristics of the microcontroller, so the invention is applicable to but not limited to microcontrollers such as a single chip microcomputer of an intentional semiconductor Cortex-Mx series or a single chip of a Nordic low-power Bluetooth series.
In practical use, when the voltage value of the power interface 103 is different from the voltage value of the GPIO interface of the microcontroller, a voltage conversion circuit needs to be arranged between the single bus interface and the power interface 103, and the voltage conversion circuit is connected with the power interface through a voltage stabilizing circuit.
Wherein the voltage conversion circuit includes: pull-up resistor, MOS tube and protection resistor; the voltage stabilizing circuit comprises a voltage stabilizing diode and an electrolytic capacitor.
The first end of the MOS tube is connected with the first end of the pull-up resistor; the single bus interface is respectively connected with the first end of the MOS tube and the first end of the pull-up resistor;
the second end of the MOS tube is connected with the first end of the zener diode through the protection resistor;
the first end of the zener diode is connected with the first end of the protection resistor and is respectively connected with the first end of the electrolytic capacitor and the positive electrode of the power interface 103;
the battery assembly 102 is respectively connected with the first end of the electrolytic capacitor and the first end of the zener diode;
the second end of the zener diode is connected to the second end of the electrolytic capacitor and the negative electrode of the power interface 103, respectively.
In this embodiment, besides adding a voltage stabilizing circuit, a connection relationship of a voltage converting circuit is added, so as to provide a more complete multiplexing circuit with a single bus interface. As an embodiment of the present invention, the electronic device may use a Nordic bluetooth low energy serial single chip or other similar single chip microcomputer with a functional pin capable of being arbitrarily multiplexed as the microcontroller 101.
At this time, the single bus interface includes a single bus interface; the single bus interface is connected with the power interface 103; the microcontroller 101 configures an initial state of the single bus interface to receive data;
it will be appreciated that since the functional pins of the microcontroller 101 have any multiplexing property, the single bus interface may be any functional pin of the microcontroller 101, and data communication is achieved by multiplexing any functional pin as an I/O (input/output) interface and connecting the I/O interface as a single bus interface with the power interface 103.
When the microcontroller 101 detects that the power interface 103 has the data receiving event, the data to be received is received through the power interface 103 specifically: when the power interface 103 is detected to have the data receiving event, the data to be received is received from the power interface 103 by using the single bus interface.
Since the initial state of the single bus interface is configured to be a data reception state, the data to be received is received upon detecting the presence of a data reception event of the power interface 103. In order to implement the data transmission function of the single bus interface, when the microcontroller 101 detects that the data transmission event exists, the data to be transmitted may be specifically transmitted through the power interface 103: when detecting that the microcontroller 101 has the data transmission event, configuring the single bus interface for transmitting data; transmitting data to be transmitted from the single bus interface through the power interface 103; and detecting that the data to be sent is sent, and resetting the single bus interface to the initial state.
Taking the Nordic NRF51822 series singlechip as an example of the microcontroller 101 of the electronic device, fig. 2 is a schematic circuit structure diagram of the Nordic NRF51822 series singlechip.
In fig. 2, an electrolytic capacitor C1 and a zener diode D1 constitute a voltage stabilizing circuit, and a MOS transistor Q1, a protection resistor R1, and a pull-up resistor R2 constitute a voltage converting circuit. The pull-up resistor R2 is connected with the single bus interface P0.20 and the MOS tube, and the power-on voltage of the pull-up resistor R2 is 3.3V.
The charge control component or the battery component 102 may be connected to the electrolytic capacitor C1, the positive electrode ji.2 of the power interface J1, and the zener diode D1, and the current is filtered and stabilized by the zener circuit to keep the charging voltage at 5V. Other electronic components in fig. 2 are peripheral circuits of the microcontroller 101, and are not described herein.
The P0.20 pin of the microcontroller 101 is configured as a single bus interface by an initialization procedure, and is always in a receive data state, and the P0.21 pin is always in a transmit data state. However, in actual connection, pin P0.21 is in an idle state and is not connected to power interface J1, so that it is ensured that the single bus interface is in a data receiving state.
When the microcontroller 101 needs to send data to be sent, the functions of pins P0.20 and P0.21 are replaced by the configuration program, that is, P0.20 is configured to be in a sending data state, and P0.21 is configured to be in a receiving data state, so that the single bus interface is in the sending data state, and the single bus interface is ensured to be in the sending data state. After judging that the data to be sent is sent, resetting the GPIO functions of P0.20 and P0.21 to enable the single bus interface to be in an initial state of receiving the data.
In the embodiment of the invention, any functional interface of the microcontroller is multiplexed into the I/O interface with the input/output function as the single bus interface, and the initialization state of the single bus interface is configured into the data receiving state through the configuration program, so that the single bus interface can receive the data to be received, and when the microcontroller is detected to have a data sending event, the single bus interface is configured into the data sending state through the configuration program, so that the data to be sent can be sent through the single bus interface. And the data to be sent is sent to the computer terminal or the mobile terminal through the power interface to realize data transmission. The functional pins of the microcontroller can be multiplexed into the I/O interface, so that the design cost of the electronic equipment can be greatly saved, the circuit design is simplified, the data transmission of wired communication is realized, and the success rate of the electronic product communication is improved.
As can be seen from the above description, as an embodiment of the present invention, the electronic device may also use an intentional semiconductor Cortex-Mx series single chip or other similar single chip microcomputer with the characteristics that GPIO can be configured as an open drain output and a push-pull output as the microcontroller 101.
The single bus interface comprises a first interface and a second interface; the first interface and the second interface are connected with the power interface 103; the microcontroller 101 configures the initial state of the first interface to receive data, and the initial state of the second interface to be open drain output.
It is understood that the first interface and the second interface are GPIO interfaces of the microcontroller 101 in this embodiment, so as to ensure that the initial state of the single bus interface is a received data state. The initial state of the first interface is configured to receive data, and the initial state of the second interface is configured to be open-drain output. At this time, the second interface is in an off state, and outputs a high-level signal '1', so that the function of the first interface for receiving the data to be received can be prevented from being affected.
When the microcontroller 101 detects that the power interface 103 has the data receiving event, the receiving data to be received through the power interface 103 may specifically be: and when the power interface 103 detects that the data receiving event exists, the second interface is utilized to receive data to be received from the power interface 103.
The data to be received is received upon detecting the presence of a data reception event at the power interface 103. In order to implement the data transmission function of the single bus interface, when the microcontroller 101 detects that the data transmission event exists, the data to be transmitted is specifically transmitted through the power interface 103: when detecting that the microcontroller 101 has the data transmission event, configuring the current state of the first interface to be forbidden to receive data, and configuring the current state of the second interface to be push-pull output for transmitting data; transmitting data to be transmitted from the second interface through the power interface 103; and when the data to be sent is detected to be sent, resetting the first interface and the second interface to corresponding initial states respectively.
Taking the STM32 series single-chip microcomputer as an example of the microcontroller 102 of the electronic device, fig. 3 is a schematic diagram of a circuit structure based on the STM32 series single-chip microcomputer.
In fig. 3, an electrolytic capacitor C1 and a zener diode D1 constitute a voltage stabilizing circuit, and a MOS transistor Q1, a protection resistor R1, and a pull-up resistor R2 constitute a voltage converting circuit. The pull-up resistor R2 is connected with the single bus interfaces PA9 and PA10 and the MOS tube, and the energizing voltage of the pull-up resistor R2 is 3.3V.
The charging control component or the battery component 102 can be connected with the electrolytic capacitor C1, the positive electrode of the power interface JI and the zener diode D1, and the current is filtered and stabilized by the voltage stabilizing circuit so that the charging voltage is kept at 5V. Other electronic components in fig. 4 constitute peripheral circuits of the microcontroller 101, and are not described herein.
The microcontroller 101 configures the PA10 pin of the microcontroller to be a first interface through an initialization program, and is always in a data receiving state, and configures the PA9 pin to be a second interface, and is always in an open-drain output state because the GPIO interface of the STM32 series singlechip can be configured to have the characteristics of open-drain output and push-pull output. At this time, the PA9 pin is in an idle state, so that the second interface outputs '1' for the disconnected state, and the data to be received is received through the PA10, thereby ensuring that the single bus interface is in a data receiving state.
When the microcontroller 101 needs to transmit data to be transmitted, the data receiving function of the PA10 is disabled by the configuration program, and the PA9 is configured to be in a push-pull output state, and at this time, the second interface is in a data transmitting state, and the data to be transmitted is transmitted through the PA 9. After judging that the data to be sent is sent, resetting the GPIO functions of the PA9 and the PA10 to enable the single bus interface to be in an initial state of receiving the data.
In the embodiment of the invention, the GPIO pin of the microcontroller can be set to have the characteristics of open-drain output and push-pull output, and the initialization state of the first interface is configured to be a data receiving state by a configuration program, and the initialization state of the second interface is set to be an open-drain output state, so that the first interface can receive the data to be received. When detecting that the microcontroller has a data transmission event, the first interface is configured to be in a data transmission forbidden state by the configuration program, and the second interface is in a push-pull output state, so that the data to be transmitted can be transmitted through the second interface. Therefore, data communication is realized, the design cost of the electronic equipment can be greatly saved, the circuit design is simplified, meanwhile, the data transmission of wired communication is realized, and the success rate of the electronic product communication is improved.
Fig. 4 is a flowchart of an embodiment of a data communication method according to an embodiment of the present invention, which is applied to an electronic device including a housing, a microcontroller mounted in the housing, and a power interface mounted on a surface of the housing and connected to a single bus interface of the microcontroller.
The method may include:
401: it is detected whether a data reception event is present at the power interface.
402: and if the data receiving event exists, receiving data to be received through the power interface.
In the invention, the single bus interface realizes the serial port function of the power interface by multiplexing with the power supply line of the power interface. At this time, the power interface can charge the power supply battery, and can also be connected with a computer terminal or a mobile terminal through the adapter plate of the USB to serial port to realize data communication.
The adapter plate of the USB to serial port is matched with the power interface of the electronic equipment, so that serial port data transmitted by a single bus interface of the electronic equipment can be converted into USB data which can be transmitted to a computer terminal or a mobile terminal.
The single bus interface of the microcontroller is typically set to a data reception state, through which data to be received can be received upon detection of a data reception event at the power interface. In order to ensure data communication of the electronic device, a task scheduler in the electronic device needs to detect whether a data receiving event exists in the power interface by adopting a time-polling detection method. If a data reception event exists, the data reception event is processed.
When the single bus interface receives the data to be received, an interrupt instruction is generated to break the operation of the background program, and after the microcontroller receives the interrupt processing, the interrupt processing function notifies the background to execute the corresponding processing operation and continues to execute the operation of the background program after the data receiving event processing is completed.
Because the data transmitted by the power interface is transmitted in the form of an electric signal, whether the data receiving event exists in the power interface can be judged according to the level change of the power interface. If the level of the power interface is detected to be changed to a preset level state, the power interface can be judged to have a data receiving event.
The preset level state may be set according to a serial communication protocol of the electronic device in practical application, for example, the preset level change state includes a start bit and an end bit, which are respectively '11100101' and '01110010', and when it is detected that the level state of the power interface is changed to '11100101″ 01110010', it is determined that a correct data receiving event exists in the power interface. Where '1' represents a high level and '0' represents a low level.
403: it is detected whether a data transmission event exists.
404: and if the data transmission event exists, transmitting data to be transmitted through the power interface.
In the invention, when the electronic equipment needs to send data through the single bus interface, a single bus interface calling instruction is generated, and the microcontroller can judge that a data sending event exists according to the single bus interface calling instruction, and simultaneously send the data through the power interface connected with the single bus interface, thereby completing data communication.
In the embodiment of the invention, the power interface and the single bus interface of the microcontroller are multiplexed, so that the data transmission is realized in a wired communication mode, the problem that the failure rate is high when the electronic equipment is tested only through wireless communication is solved, the wired communication mode which is not easy to be interfered is provided, the communication reliability is greatly improved, and the success rate of the electronic product in communication is further improved.
In the actual data communication process, the power interface can charge the battery assembly while carrying out data communication, and in order to ensure that the data communication is not interfered, the power interface can be cut off to charge the battery assembly, and after the data communication is completed, the battery assembly is restored to be charged.
In order to realize the control of charging the battery assembly, in the embodiment of the invention, the electronic equipment further comprises a charging control assembly respectively connected with the microcontroller and the battery assembly; the power interface is connected with the battery assembly through the charging control assembly so as to establish charging connection with the battery assembly.
The method further comprises the steps of:
if the data receiving event or the data transmitting event exists, controlling a charging control component to cut off the charging connection between the power interface and the battery component; the charging control assembly is respectively connected with the microcontroller and the battery assembly.
In the embodiment of the invention, when the data communication is carried out through the power interface, the microcontroller controls the charging control component to cut off the charging connection between the power interface and the battery component, so that the data transmitted during the data communication can be ensured not to be interfered by the charging current, and the reliability and the stability of the data communication can be greatly improved.
The electronic equipment in the invention realizes serial port output of the single bus interface by utilizing GPIO (general purpose input/output) characteristics of the microcontroller, so the invention is applicable to but not limited to microcontrollers such as a single chip microcomputer of an intentional semiconductor Cortex-Mx series or a single chip of Nordic low-power consumption Bluetooth series.
As an embodiment of the invention, the electronic equipment can use Nordic low-power Bluetooth series singlechips or other similar singlechips with arbitrarily multiplexing functional pins as microcontrollers.
At this time, the single bus interface is connected with the power interface; the microcontroller configures an initial state of the single bus interface to receive data.
It can be understood that, because the functional pins of the microcontroller have any multiplexing property, the single bus interface can be any functional pin of the microcontroller, and data communication is realized by multiplexing any functional pin as an I/O (input/output) interface and connecting the I/O interface as a single bus interface with a power interface.
The receiving data to be received through the power interface may include:
and if the data receiving event exists, receiving data to be received from the power interface by using the single bus interface.
Since the initial state of the single bus interface is configured to be the receive data state, the data to be received is received upon detecting the presence of a data reception event at the power interface. In order to implement the data transmission function of the single bus interface, if the microcontroller has the data transmission event, the transmitting the data to be transmitted through the power interface may include:
If the data transmission event exists, configuring the single bus interface for transmitting data;
transmitting data to be transmitted from the single bus interface through the power interface;
and if the data to be sent is sent, resetting the single bus interface to the initial state.
The initial state of the single bus interface is reset so that the single bus interface can continue to detect data reception events.
In the embodiment of the invention, any functional interface of the microcontroller is multiplexed into the I/O interface with the input/output function as the single bus interface, and the initialization state of the single bus interface is configured into the data receiving state through the configuration program, so that the single bus interface can receive the data to be received, and when the microcontroller is detected to have a data sending event, the single bus interface is configured into the data sending state through the configuration program, so that the data to be sent can be sent through the single bus interface. And the data to be sent is sent to the computer terminal or the mobile terminal through the power interface to realize data transmission. The functional pins of the microcontroller can be multiplexed into the I/O interface, so that the design cost of the electronic equipment can be greatly saved, the circuit design is simplified, the data transmission of wired communication is realized, and the success rate of the electronic product communication is improved.
As can be seen from the above, as an embodiment of the present invention, the electronic device may also use an intentional semiconductor Cortex-Mx series single chip or other similar single chip microcomputer with the characteristics that GPIO can be configured as an open drain output and a push-pull output as a microcontroller.
The single bus interface in the electronic device may include a first interface and a second interface; the first interface and the second interface are connected with the power interface; the microcontroller configures the initial state of the first interface to be receiving data, and the initial state of the second interface to be open-drain output.
It can be understood that the first interface and the second interface are GPIO interfaces of the microcontroller in this embodiment, so as to ensure that the initial state of the single bus interface is a data receiving state. The initial state of the first interface is configured to receive data, and the initial state of the second interface is configured to be open-drain output. At this time, the second interface is in an off state, and outputs a high-level signal '1', so that the function of the first interface for receiving the data to be received can be prevented from being affected.
Said receiving data to be received via said power interface if said data reception event exists comprises:
And if the data receiving event exists, receiving data to be received from the power interface through a first interface of the single bus interface.
The data to be received is received upon detecting the presence of a data reception event. In order to implement the data transmission function of the single bus interface, if the data transmission event exists, the transmitting the data to be transmitted through the power interface may include:
if the data transmission event exists, configuring the current state of the first interface to be forbidden to receive data, and configuring the current state of the second interface of the single bus interface to be push-pull output for transmitting data;
transmitting data to be transmitted from the second interface through the power interface;
at this time, the current state of the first interface is set to be a state of prohibiting data reception, so that interference of data communication caused by data reception of the first interface when data is transmitted can be avoided, and meanwhile, when the current state of the second interface is configured to be a push-pull output state, the second interface has a data transmission function and is communicated with the second interface and the power interface, so that transmission of data to be transmitted is completed.
And if the data to be sent is sent, resetting the first interface and the second interface to corresponding initial states respectively.
Resetting the first interface and the second interface to the corresponding initial states respectively, so that the single bus interface can continue to detect data receiving events when the single bus interface is in a data receiving state.
In the embodiment of the invention, the GPIO pin of the microcontroller can be set to have the characteristics of open-drain output and push-pull output, and the initialization state of the first interface is configured to be a data receiving state by a configuration program, and the initialization state of the second interface is set to be an open-drain output state, so that the first interface can receive the data to be received. When detecting that the microcontroller has a data transmission event, the first interface is configured to be in a data transmission forbidden state by the configuration program, and the second interface is in a push-pull output state, so that the data to be transmitted can be transmitted through the second interface. Therefore, data communication is realized, the design cost of the electronic equipment can be greatly saved, the circuit design is simplified, meanwhile, the data transmission of wired communication is realized, and the success rate of the electronic product communication is improved.
Fig. 5 is a schematic diagram of an embodiment of a data communication device according to an embodiment of the present invention, where the device is applied to an electronic apparatus, and the electronic apparatus includes a housing, a microcontroller installed in the housing, and a power interface installed on a surface of the housing and connected to a single bus interface of the microcontroller.
The apparatus may include:
a first detection module 501 is configured to detect whether a data receiving event exists in the power interface.
A data receiving module 502, configured to receive data to be received through the power interface if the data receiving event exists.
In the invention, the single bus interface realizes the serial port function of the power interface by multiplexing with the power supply line of the power interface. At this time, the power interface can charge the power supply battery, and can also be connected with a computer terminal or a mobile terminal through the adapter plate of the USB to serial port to realize data communication.
The adapter plate of the USB to serial port is matched with the power interface of the electronic equipment, so that serial port data transmitted by a single bus interface of the electronic equipment can be converted into USB data which can be transmitted to a computer terminal or a mobile terminal.
The single bus interface of the microcontroller is typically set to a data reception state, through which data to be received can be received upon detection of a data reception event at the power interface. In order to ensure data communication of the electronic device, a task scheduler in the electronic device needs to detect whether a data receiving event exists in the power interface by adopting a time-polling detection method. If a data reception event exists, the data reception event is processed.
A second detection module 503, configured to detect whether a data transmission event exists.
A data transmission module 504, configured to transmit data to be transmitted through the power interface if the data transmission event exists.
In the invention, when the electronic equipment needs to send data through the single bus interface, a single bus interface calling instruction is generated, and the microcontroller can judge that a data sending event exists according to the single bus interface calling instruction, and simultaneously send the data through the power interface connected with the single bus interface, thereby completing data communication.
In the embodiment of the invention, the multiplexing of the power interface and the single bus interface of the microcontroller provides a wired communication mode to realize data transmission, thereby solving the problem of higher failure rate when the electronic equipment is tested only through wireless communication.
In the actual data communication process, the power interface can charge the battery assembly while carrying out data communication, and in order to ensure that the data communication is not interfered, the power interface can be cut off to charge the battery assembly, and after the data communication is completed, the power supply battery is restored to be charged.
In order to realize the control of charging the battery assembly, in the embodiment of the invention, the electronic equipment further comprises a charging control assembly respectively connected with the microcontroller and the battery assembly; the power interface is connected with the battery assembly through the charging control assembly so as to establish charging connection with the battery assembly.
The apparatus further comprises:
and the control module is used for controlling the charging control component to cut off the charging connection between the power interface and the battery component if the data receiving event or the data sending event exists.
In the embodiment of the invention, when the data communication is carried out through the power interface, the microcontroller controls the charging control component to cut off the charging connection between the power interface and the battery component, so that the data transmitted during the data communication can be ensured not to be interfered by the charging current, and the reliability and the stability of the data communication can be greatly improved.
The electronic equipment in the invention realizes serial port output of the single bus interface by utilizing GPIO (general purpose input/output) characteristics of the microcontroller, so the invention is applicable to but not limited to microcontrollers such as a single chip microcomputer of an intentional semiconductor Cortex-Mx series or a single chip of Nordic low-power consumption Bluetooth series.
As an embodiment of the invention, the electronic equipment can use Nordic low-power Bluetooth series singlechips or other similar singlechips with arbitrarily multiplexing functional pins as microcontrollers.
At this time, the single bus interface is connected with the power interface; the microcontroller configures the single bus interface initial state to receive data.
It can be understood that, because the functional pins of the microcontroller have any multiplexing property, the single bus interface can be any functional pin of the microcontroller, and data communication is realized by multiplexing any functional pin as an I/O (input/output) interface and connecting the I/O interface as a single bus interface with a power interface.
The receiving data module 502 may specifically be configured to:
and if the data receiving event exists, receiving data to be received from the power interface by utilizing the single bus interface.
Since the initial state of the single bus interface is configured to be the receive data state, the data to be received is received upon detecting the presence of a data reception event at the power interface. In order to implement the data transmission function of the single bus interface, the data transmission module 504 may specifically be configured to:
If the data transmission event exists, configuring the single bus interface for transmitting data;
transmitting data to be transmitted from the single bus interface through the power interface;
and if the data to be sent is sent, resetting the single bus interface to the initial state.
The initial state of the single bus interface is reset so that the single bus interface can continue to detect data reception events.
In the embodiment of the invention, any functional interface of the microcontroller is multiplexed into the I/O interface with the input/output function as the single bus interface, and the initialization state of the single bus interface is configured into the data receiving state through the configuration program, so that the single bus interface can receive the data to be received, and when the microcontroller is detected to have a data sending event, the single bus interface is configured into the data sending state through the configuration program, so that the data to be sent can be sent through the single bus interface. And the data to be sent is sent to the computer terminal or the mobile terminal through the power interface to realize data transmission. The functional pins of the microcontroller can be multiplexed into the I/O interface, so that the design cost of the electronic equipment can be greatly saved, the circuit design is simplified, the data transmission of wired communication is realized, and the success rate of the electronic product communication is improved.
As can be seen from the above, as an embodiment of the present invention, the electronic device may also use an intentional semiconductor Cortex-Mx series single chip or other similar single chip microcomputer with the characteristics that GPIO can be configured as an open drain output and a push-pull output as a microcontroller.
The single bus interface in the electronic device may include a first interface and a second interface; the first interface and the second interface are connected with the power interface; the microcontroller configures the initial state of the first interface to be receiving data, and the initial state of the second interface to be open-drain output.
It can be understood that the first interface and the second interface are GPIO interfaces of the microcontroller in this embodiment, so as to ensure that the initial state of the single bus interface is a data receiving state. The initial state of the first interface is configured to receive data, and the initial state of the second interface is configured to be open-drain output. At this time, the second interface is in an off state, and outputs a high-level signal '1', so that the function of the first interface for receiving the data to be received can be prevented from being affected.
The receiving data module 502 may specifically be configured to:
if the data receiving event exists, the data to be received is received from the power interface using the first interface of the single bus interface.
The data to be received is received upon detecting the presence of a data reception event. In order to realize the data transmission function of the single bus interface, the data transmission module may specifically be used for:
if the data transmission event exists, configuring the current state of the first interface to be forbidden to receive data, and configuring the current state of the second interface of the single bus interface to be push-pull output for transmitting data;
transmitting data to be transmitted from the second interface through the power interface;
at this time, the current state of the first interface is set to be a state of prohibiting data reception, so that interference of data communication caused by data reception of the first interface when data is transmitted can be avoided, and meanwhile, when the current state of the second interface is configured to be a push-pull output state, the second interface has a data transmission function and is communicated with the second interface and the power interface, so that transmission of data to be transmitted is completed.
And if the data to be sent is sent, resetting the first interface and the second interface to corresponding initial states respectively.
Resetting the first interface and the second interface to the corresponding initial states respectively, so that the single bus interface can continue to detect data receiving events when the single bus interface is in a data receiving state.
In the embodiment of the invention, the GPIO pin of the microcontroller can be set to have the characteristics of open-drain output and push-pull output, and the initialization state of the first interface is configured to be a data receiving state by a configuration program, and the initialization state of the second interface is set to be an open-drain output state, so that the first interface can receive the data to be received. When detecting that the microcontroller has a data transmission event, the first interface is configured to be in a data transmission forbidden state by the configuration program, and the second interface is in a push-pull output state, so that the data to be transmitted can be transmitted through the second interface. Therefore, data communication is realized, the design cost of the electronic equipment can be greatly saved, the circuit design is simplified, meanwhile, the data transmission of wired communication is realized, and the success rate of the electronic product communication is improved.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include non-transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
Certain terms are used throughout the description and claims to refer to particular components. Those of skill in the art will appreciate that a hardware manufacturer may refer to the same component by different names. The description and claims do not take the form of an element differentiated by name, but rather by functionality. As used throughout the specification and claims, the word "comprise" is an open-ended term, and thus should be interpreted to mean "include, but not limited to. By "substantially" is meant that within an acceptable error range, a person skilled in the art is able to solve the technical problem within a certain error range, substantially achieving the technical effect. Furthermore, the term "coupled" as used herein includes any direct or indirect electrical coupling. Accordingly, if a first device couples to a second device, that connection may be through a direct electrical coupling to the second device, or through another device or coupling means coupled to ground. The description hereinafter sets forth a preferred embodiment for practicing the invention, but is not intended to limit the scope of the invention, as the description is given for the purpose of illustrating the general principles of the invention. The scope of the invention is defined by the appended claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such product or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or system comprising such elements
While the foregoing description illustrates and describes the preferred embodiments of the present invention, it is to be understood that the invention is not limited to the forms disclosed herein, but is not to be construed as limited to other embodiments, and is capable of numerous other combinations, modifications and environments and is capable of changes or modifications within the scope of the inventive concept as expressed herein, either as a result of the foregoing teachings or as a result of the knowledge or technology of the relevant art. And that modifications and variations which do not depart from the spirit and scope of the invention are intended to be within the scope of the appended claims.

Claims (8)

1. A method of data communication, the method comprising:
Detecting whether a data receiving event exists in the power interface;
if the data receiving event exists, receiving data to be received through the power interface; wherein the power interface is connected with a single bus interface of the microcontroller;
detecting whether a data transmission event exists;
if the data transmission event exists, transmitting data to be transmitted through the power interface;
if the data receiving event or the data transmitting event exists, controlling a charging control component to cut off the charging connection between the power interface and the battery component; the charging control assembly is respectively connected with the microcontroller and the battery assembly.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
said receiving data to be received via said power interface if said data reception event exists comprises:
receiving data to be received from the power interface using the single bus interface if the data reception event exists;
the sending the data to be sent through the power interface if the data sending event exists comprises:
if the data transmission event exists, configuring the single bus interface for transmitting data;
Transmitting data to be transmitted from the single bus interface through the power interface;
resetting the single bus interface to an initial state if the data to be sent is sent; wherein the initial state of the single bus interface is to receive data.
3. The method of claim 1, wherein the receiving data to be received via the power interface if the data reception event exists comprises:
receiving data to be received from the power interface through a first interface of the single bus interface if the data receiving event exists;
the sending the data to be sent through the power interface if the data sending event exists comprises:
if the data transmission event exists, configuring the current state of the first interface to be forbidden to receive data, and configuring the current state of the second interface of the single bus interface to be push-pull output for transmitting data;
transmitting data to be transmitted from the second interface through the power interface;
if the data to be sent is sent, resetting the first interface and the second interface to corresponding initial states respectively; the initial state of the first interface is the received data, and the initial state of the second interface is the open-drain output.
4. An electronic device is characterized by comprising a microcontroller, a battery assembly connected with the microcontroller, and a power interface respectively connected with a single bus interface of the microcontroller and the battery assembly;
the power interface is used for connecting a power supply to charge the battery assembly;
the microcontroller is used for receiving data to be received through the power interface when detecting that the power interface has a data receiving event; when detecting that a data transmission event exists, transmitting data to be transmitted through the power interface;
the charging control assembly is respectively connected with the microcontroller and the battery assembly;
the power interface is connected with the battery assembly through the charging control assembly so as to establish charging connection with the battery assembly;
the microcontroller is also used for controlling the charging control component to cut off the charging connection between the power interface and the battery component when detecting the data receiving event or the transmitting event;
the power supply interface is connected with the single bus interface through the voltage conversion circuit;
the power supply interface is connected with the single bus interface through the voltage stabilizing circuit.
5. The apparatus of claim 4, wherein the voltage conversion circuit comprises: pull-up resistor, MOS tube and protection resistor;
the first end of the MOS tube is connected with the first end of the pull-up resistor; the single bus interface is respectively connected with the first end of the MOS tube and the first end of the pull-up resistor;
and the second end of the MOS tube is connected with the power interface through the protection resistor.
6. The apparatus of claim 4, wherein the device comprises a plurality of sensors,
the microcontroller configures the initial state of the single bus interface to be receiving data;
when the data receiving event is detected, the single bus interface is utilized to receive data to be received from the power interface;
when detecting that the data transmission event exists, configuring the single bus interface for transmitting data; transmitting data to be transmitted from the single bus interface through the power interface; and detecting that the data to be sent is sent, and resetting the single bus interface to the initial state.
7. The apparatus of claim 4, wherein the single bus interface comprises a first interface and a second interface connected to the power interface;
The microcontroller configures the initial state of the first interface as receiving data, and the initial state of the second interface as open-drain output;
when the data receiving event is detected, the first interface is utilized to receive data to be received from the power interface;
when the data transmission event is detected, configuring the current state of the first interface as forbidden to receive data, and configuring the current state of the second interface as push-pull output for transmitting data; transmitting data to be transmitted from the second interface through the power interface; and when the data to be sent is detected to be sent, resetting the first interface and the second interface to corresponding initial states respectively.
8. The apparatus of claim 4, wherein the voltage stabilizing circuit comprises a voltage stabilizing diode and an electrolytic capacitor;
the first end of the voltage stabilizing diode is connected with the single bus interface and is respectively connected with the first end of the electrolytic capacitor and the positive electrode of the power interface;
the battery component is respectively connected with the first end of the electrolytic capacitor and the first end of the zener diode;
and the second end of the zener diode is respectively connected with the second end of the electrolytic capacitor and the negative electrode of the power interface.
CN201710881572.9A 2017-09-26 2017-09-26 Data communication method and electronic equipment Active CN107678995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710881572.9A CN107678995B (en) 2017-09-26 2017-09-26 Data communication method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710881572.9A CN107678995B (en) 2017-09-26 2017-09-26 Data communication method and electronic equipment

Publications (2)

Publication Number Publication Date
CN107678995A CN107678995A (en) 2018-02-09
CN107678995B true CN107678995B (en) 2024-04-02

Family

ID=61137147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710881572.9A Active CN107678995B (en) 2017-09-26 2017-09-26 Data communication method and electronic equipment

Country Status (1)

Country Link
CN (1) CN107678995B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701289B (en) * 2022-09-15 2024-04-12 荣耀终端有限公司 Communication method and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820372A (en) * 2010-03-17 2010-09-01 浙江大学 TDM (Time Division Multiplexing) single-bus communication system of power supply, data signals and audio analog signals
CN102289420A (en) * 2011-06-28 2011-12-21 电子科技大学 Simple single-bus interface conversion circuit and data acquisition system adopting same
CN202196398U (en) * 2011-07-13 2012-04-18 青岛海信移动通信技术股份有限公司 Power supply managing circuit of charging/ communication multiplex interface and digital electronic product
CN103684943A (en) * 2012-09-02 2014-03-26 刘新丽 Bus system with power supply transmission and data communication functions
CN205212860U (en) * 2015-12-23 2016-05-04 上海神开石油化工装备股份有限公司 Single bus communication module
CN205829202U (en) * 2016-04-26 2016-12-21 广州同明太阳能科技有限公司 A kind of power supply is powered and serial communication multiplex circuit
CN208188729U (en) * 2017-09-26 2018-12-04 歌尔科技有限公司 Electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820372A (en) * 2010-03-17 2010-09-01 浙江大学 TDM (Time Division Multiplexing) single-bus communication system of power supply, data signals and audio analog signals
CN102289420A (en) * 2011-06-28 2011-12-21 电子科技大学 Simple single-bus interface conversion circuit and data acquisition system adopting same
CN202196398U (en) * 2011-07-13 2012-04-18 青岛海信移动通信技术股份有限公司 Power supply managing circuit of charging/ communication multiplex interface and digital electronic product
CN103684943A (en) * 2012-09-02 2014-03-26 刘新丽 Bus system with power supply transmission and data communication functions
CN205212860U (en) * 2015-12-23 2016-05-04 上海神开石油化工装备股份有限公司 Single bus communication module
CN205829202U (en) * 2016-04-26 2016-12-21 广州同明太阳能科技有限公司 A kind of power supply is powered and serial communication multiplex circuit
CN208188729U (en) * 2017-09-26 2018-12-04 歌尔科技有限公司 Electronic equipment

Also Published As

Publication number Publication date
CN107678995A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
US10784722B2 (en) BLUETOOTH headset, charging cabin and charging system thereof
EP3093945B1 (en) Electronic device, charger within the electronic device, and detecting method for detecting abnormal status of connector of electronic device
US8819462B2 (en) Serial advanced technology attachment interfaces and methods for power management thereof
US10658860B2 (en) Electronic device, charger within the electronic device, and detecting method for detecting abnormal status of connector of electronic device
US9312576B2 (en) Portable electronic devices capable of obtaining charging current value of charger and charging method thereof
US20150236522A1 (en) Usb charging system with variable charging voltage, charger and smart terminal
EP3136529B1 (en) Wearable device and electrostatic discharge protection circuit of the same
CN107948798B (en) Charging box, wireless device and wireless earphone
KR102091508B1 (en) Power supply circuit and method for controlling thereof
EP2984699A1 (en) Dynamic charging of a rechargeable battery
CA2868547A1 (en) Power delivery including out-of-band communication
US8463978B2 (en) Computer with ability to charge electronic device in power off state and USB interface module thereof
CN107678995B (en) Data communication method and electronic equipment
JP7270719B2 (en) Terminal and Type C interface anti-corrosion method
CN114501285B (en) Plug detection circuit and plug detection method
CN208188729U (en) Electronic equipment
EP2383860A2 (en) Rapid charging apparatus
US9496737B2 (en) Charge devices and charge systems
CN110912239A (en) Multi-port charging equipment
CN211018347U (en) Multi-port charging equipment
US20240077932A1 (en) Wakeup circuit
US20220060041A1 (en) Device and method of detecting attachment and detachment of portable device
CN213484518U (en) GPRS conversion module circuit
CN218352191U (en) TWS earphone circuit
CN111431149B (en) Battery protection circuit, terminal and battery protection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant