Movatterモバイル変換


[0]ホーム

URL:


CN106877462B - A kind of method and charger detecting charged state - Google Patents

A kind of method and charger detecting charged state
Download PDF

Info

Publication number
CN106877462B
CN106877462BCN201710265670.XACN201710265670ACN106877462BCN 106877462 BCN106877462 BCN 106877462BCN 201710265670 ACN201710265670 ACN 201710265670ACN 106877462 BCN106877462 BCN 106877462B
Authority
CN
China
Prior art keywords
communication interface
port mode
communication
charger
state
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
CN201710265670.XA
Other languages
Chinese (zh)
Other versions
CN106877462A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Vivo Mobile Communication Co Ltd Beijing Branch
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 Vivo Mobile Communication Co Ltd, Vivo Mobile Communication Co Ltd Beijing BranchfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN201710265670.XApriorityCriticalpatent/CN106877462B/en
Publication of CN106877462ApublicationCriticalpatent/CN106877462A/en
Application grantedgrantedCritical
Publication of CN106877462BpublicationCriticalpatent/CN106877462B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提供一种检测充电状态的方法和充电器,该方法包括:通过处于IO口模式的第一通信接口,读取电平状态,其中,所述第一通信接口为所述充电器与移动终端建立通信连接的接口;根据所述电平状态,确定充电状态。本发明实施例中,当第一通信接口配置为IO口模式时,通过读取电平状态确定充电状态,从而快速检测充电器和移动终端之间的充电状态,以便于对充电异常进行及时响应,提高了通信成功率和响应速度,增强了系统的安全性。

The present invention provides a method and a charger for detecting a charging state. The method includes: reading a level state through a first communication interface in an IO port mode, wherein the first communication interface is the charger and the mobile phone. The terminal establishes an interface for communication connection; according to the level state, the charging state is determined. In the embodiment of the present invention, when the first communication interface is configured in the IO port mode, the charging state is determined by reading the level state, so as to quickly detect the charging state between the charger and the mobile terminal, so as to respond to abnormal charging in time. , improve the communication success rate and response speed, and enhance the security of the system.

Description

Translated fromChinese
一种检测充电状态的方法和充电器A method and charger for detecting charging status

技术领域technical field

本发明涉及通信领域,尤其涉及一种检测充电状态的方法和充电器。The present invention relates to the field of communications, and in particular, to a method for detecting a charging state and a charger.

背景技术Background technique

随着移动终端快速充电技术的快速发展,相较于上一代普通充电和高压充电技术,目前比较流行的快充技术是采用低压直充,在低压直充技术中,需要搭建移动终端和充电器之间的通信系统,充电器可以根据移动终端的状态实时进行输出电压、输出电流的调整,以及实现充电系统各环节的调整和控制。With the rapid development of mobile terminal fast charging technology, compared with the previous generation of ordinary charging and high-voltage charging technology, the more popular fast charging technology is low-voltage direct charging. In low-voltage direct charging technology, it is necessary to build mobile terminals and chargers The charger can adjust the output voltage and output current in real time according to the state of the mobile terminal, and realize the adjustment and control of each link of the charging system.

目前的快充技术中,通过在移动终端和充电器各设一个微控制器,并基于微控制器搭建通信系统,采用两线式串行总线的方式进行通信,其中移动终端作为主控,发送指令给充电器进行充电器输出电压和电流的调整。充电器与移动终端之间采用轮询的方式对充电过程中的电压电流参数进行调整,无法快速检测到充电状态,进而影响充电的安全性。可见,现有的充电器存在充电状态检测速度慢的问题。In the current fast charging technology, a microcontroller is installed in the mobile terminal and the charger, and a communication system is built based on the microcontroller, and the communication is carried out by a two-wire serial bus. Command to the charger to adjust the output voltage and current of the charger. A polling method is used between the charger and the mobile terminal to adjust the voltage and current parameters during the charging process, and the charging state cannot be quickly detected, thereby affecting the safety of charging. It can be seen that the existing charger has the problem that the detection speed of the charging state is slow.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种检测充电状态的方法和充电器,以解决充电器存在的充电状态检测速度慢的问题。Embodiments of the present invention provide a method for detecting a state of charge and a charger, so as to solve the problem of slow state of charge detection in the charger.

第一方面,本发明实施例提供了一种检测充电状态的方法,应用于充电器,包括:In a first aspect, an embodiment of the present invention provides a method for detecting a charging state, applied to a charger, including:

通过处于IO(In/Out,输入输出)口模式的第一通信接口,读取电平状态,其中,所述第一通信接口为所述充电器与移动终端建立通信连接的接口;Read the level state through the first communication interface in the IO (In/Out, input and output) port mode, wherein the first communication interface is an interface for establishing a communication connection between the charger and the mobile terminal;

根据所述电平状态,确定充电状态。Based on the level state, the state of charge is determined.

第二方面,本发明实施例还提供一种充电器,包括:In a second aspect, an embodiment of the present invention further provides a charger, including:

读取模块,用于通过处于IO口模式的第一通信接口,读取电平状态,其中,所述第一通信接口为所述充电器与移动终端建立通信连接的接口;a reading module, configured to read the level state through the first communication interface in the IO port mode, wherein the first communication interface is an interface for establishing a communication connection between the charger and the mobile terminal;

确定模块,用于根据所述电平状态,确定充电状态。The determining module is configured to determine the charging state according to the level state.

这样,本发明实施例中,本发明提供一种检测充电状态的方法和充电器,该方法包括:通过处于IO口模式的第一通信接口,读取电平状态,其中,所述第一通信接口为所述充电器与移动终端建立通信连接的接口;根据所述电平状态,确定充电状态。这样,当第一通信接口配置为IO口模式时,通过读取电平状态确定充电状态,从而快速检测充电器和移动终端之间的充电状态,以便于对充电异常进行及时响应,提高了通信成功率和响应速度,增强了系统的安全性。In this way, in the embodiment of the present invention, the present invention provides a method for detecting a charging state and a charger, the method comprising: reading a level state through a first communication interface in an IO port mode, wherein the first communication The interface is an interface for establishing a communication connection between the charger and the mobile terminal; the charging state is determined according to the level state. In this way, when the first communication interface is configured as the IO port mode, the charging state is determined by reading the level state, so as to quickly detect the charging state between the charger and the mobile terminal, so as to respond in time to abnormal charging and improve communication The success rate and response speed enhance the security of the system.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative labor.

图1是本发明实施例提供的一种检测充电状态的方法的流程图;1 is a flowchart of a method for detecting a charging state provided by an embodiment of the present invention;

图2是本发明实施例提供的一种通信系统硬件框图;2 is a hardware block diagram of a communication system provided by an embodiment of the present invention;

图3是本发明实施例提供的另一种检测充电状态的方法的流程图;3 is a flowchart of another method for detecting a charging state provided by an embodiment of the present invention;

图4是本发明实施例提供的另一种检测充电状态的方法的流程图;4 is a flowchart of another method for detecting a charging state provided by an embodiment of the present invention;

图5是本发明实施例提供的一种充电器的结构图;5 is a structural diagram of a charger according to an embodiment of the present invention;

图6是本发明实施例提供的确定模块的结构图;6 is a structural diagram of a determination module provided by an embodiment of the present invention;

图7是本发明实施例提供的读取模块的结构图;7 is a structural diagram of a reading module provided by an embodiment of the present invention;

图8是本发明实施例提供的另一种充电器的结构图;8 is a structural diagram of another charger provided by an embodiment of the present invention;

图9是本发明实施例提供的第一通信模块的结构图;9 is a structural diagram of a first communication module provided by an embodiment of the present invention;

图10是本发明实施例提供的另一种充电器的结构图。FIG. 10 is a structural diagram of another charger provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

参见图1-2,图1是本发明实施例提供的一种检测充电状态的方法的流程图,图2是本发明实施例提供的一种通信系统硬件框图,如图1所示,包括以下步骤:Referring to FIGS. 1-2, FIG. 1 is a flowchart of a method for detecting a charging state provided by an embodiment of the present invention, and FIG. 2 is a hardware block diagram of a communication system provided by an embodiment of the present invention, as shown in FIG. 1, including the following step:

步骤101、通过处于IO口模式的第一通信接口,读取电平状态。Step 101: Read the level state through the first communication interface in the IO port mode.

该步骤中,在使用充电器对移动终端的充电过程中,可以通过在移动终端与充电器之间搭建如图2所示的通信系统,并通过处于IO口模式的第一通信接口,可以快速的读取到第一通信接口的电平状态,其中,第一通信接口是充电器与移动终端建立通信连接的接口。在本实施例中,第一通信接口可以是充电器的数据正信号引脚,即图2所示充电器的D+信号引脚。In this step, in the process of using the charger to charge the mobile terminal, a communication system as shown in FIG. 2 can be built between the mobile terminal and the charger, and the first communication interface in the IO port mode can quickly The level state of the first communication interface is read, wherein the first communication interface is an interface for establishing a communication connection between the charger and the mobile terminal. In this embodiment, the first communication interface may be the data positive signal pin of the charger, that is, the D+ signal pin of the charger shown in FIG. 2 .

如图2所示,该通信系统包括充电器、移动终端,其中,在充电器侧设置有数据负信号引脚(D-信号引脚)和数据正信号引脚(D+信号引脚),在移动终端侧设置有数据负信号引脚(D-信号引脚)和数据正信号引脚(D+信号引脚)。其中,移动终端的数据负信号引脚与充电器的数据负信号引脚连接,移动终端的数据正信号引脚与充电器的数据正信号引脚连接。在本实施例中,可以将充电器的D+信号定义为TX+信号,D-信号定义为RX-信号;将移动终端的D+信号定义为RX+信号,D-信号定义为TX-信号,其中TX+信号和TX-信号为发送信号,RX-信号和RX+信号为接收信号。As shown in FIG. 2 , the communication system includes a charger and a mobile terminal, wherein a data negative signal pin (D- signal pin) and a data positive signal pin (D+ signal pin) are set on the charger side. The mobile terminal side is provided with a data negative signal pin (D- signal pin) and a data positive signal pin (D+ signal pin). The data negative signal pin of the mobile terminal is connected to the data negative signal pin of the charger, and the data positive signal pin of the mobile terminal is connected to the data positive signal pin of the charger. In this embodiment, the D+ signal of the charger may be defined as the TX+ signal, and the D- signal may be defined as the RX- signal; the D+ signal of the mobile terminal may be defined as the RX+ signal, and the D- signal may be defined as the TX- signal, wherein the TX+ signal The and TX- signals are transmit signals, and the RX- and RX+ signals are receive signals.

需要说明的是,可以通过在移动终端的充电电路里设置上拉电阻,将移动终端侧的数据正信号引脚的电压上拉至预设电压。例如,当充电电压为5V时,可以通过在移动终端的充电电路里设置100千欧的上拉电阻,将移动终端侧的数据正信号引脚电压由2.5V上拉至3.3V。而充电器一侧的数据正信号引脚的初始电压为2.5V,则可以通过读取充电器一侧的数据正信号引脚的电压状态,即读取第一通信接口的电压状态,即可确定充电器和移动终端之间的充电状态。It should be noted that the voltage of the data positive signal pin on the mobile terminal side can be pulled up to a preset voltage by setting a pull-up resistor in the charging circuit of the mobile terminal. For example, when the charging voltage is 5V, the voltage of the data positive signal pin on the mobile terminal side can be pulled up from 2.5V to 3.3V by setting a pull-up resistor of 100 kΩ in the charging circuit of the mobile terminal. And the initial voltage of the data positive signal pin on the charger side is 2.5V, you can read the voltage state of the data positive signal pin on the charger side, that is, read the voltage state of the first communication interface, you can Determine the charging status between the charger and the mobile terminal.

步骤102、根据电平状态,确定充电状态。Step 102: Determine the charging state according to the level state.

该步骤中,可以根据第一通信接口的电平状态,确定充电器和移动终端之间的充电状态。其中,当第一通信接口的电平状态为高电平时,则可以确定充电器和移动终端之间的充电状态为接入状态;当第一通信接口的电平状态为低电平时,则可以确定充电器和移动终端之间的充电状态为断开状态。In this step, the charging state between the charger and the mobile terminal may be determined according to the level state of the first communication interface. Wherein, when the level state of the first communication interface is a high level, it can be determined that the charging state between the charger and the mobile terminal is an access state; when the level state of the first communication interface is a low level, it can be determined that the charging state between the charger and the mobile terminal is an access state; It is determined that the charging state between the charger and the mobile terminal is a disconnected state.

例如,若第一通信接口的初始电压为2.5V,当读取到处于IO口模式下的通信接口的电压为3.3V的时候,则可以确定充电器和移动终端之间的充电状态为接入状态;若第一通信接口的电压为3.3V,当读取到处于IO口模式下的通信接口的电压为2.5V的时候,则可以确定充电器和移动终端之间的充电状态为断开状态。For example, if the initial voltage of the first communication interface is 2.5V, when the voltage of the communication interface in the IO port mode is read as 3.3V, it can be determined that the charging state between the charger and the mobile terminal is connected state; if the voltage of the first communication interface is 3.3V, when the voltage of the communication interface in the IO port mode is read as 2.5V, it can be determined that the charging state between the charger and the mobile terminal is disconnected .

本发明实施例中,上述方法可以应用于充电器,该充电器包括可对移动终端进行快速充电的充电器,其中该移动终端可以是能够快速充电的手机、平板电脑(TabletPersonal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digitalassistant,简称PDA)、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。In the embodiment of the present invention, the above method can be applied to a charger, and the charger includes a charger capable of fast charging a mobile terminal, wherein the mobile terminal can be a mobile phone, a tablet computer (Tablet Personal Computer), a laptop capable of fast charging Laptop Computer (Laptop Computer), Personal Digital Assistant (Personal Digital Assistant, PDA for short), Mobile Internet Device (Mobile Internet Device, MID) or Wearable Device (Wearable Device) and so on.

本发明实施例的检测充电状态的方法,本发明提供一种检测充电状态的方法和充电器,该方法包括:通过处于IO口模式的第一通信接口,读取电平状态;根据电平状态,确定充电状态。这样,当第一通信接口配置为IO口模式时,通过读取电平状态确定充电状态,从而快速检测充电器和移动终端之间的充电状态,以便于对充电异常进行及时响应,提高了通信成功率和响应速度,增强了系统的安全性。The method for detecting a charging state according to an embodiment of the present invention provides a method for detecting a charging state and a charger. The method includes: reading a level state through a first communication interface in an IO port mode; according to the level state to determine the charging status. In this way, when the first communication interface is configured as the IO port mode, the charging state is determined by reading the level state, so as to quickly detect the charging state between the charger and the mobile terminal, so as to respond in time to abnormal charging and improve communication The success rate and response speed enhance the security of the system.

参见图3,图3是本发明实施例提供的另一种检测充电状态的方法的流程图,本实施例与上一实施例的主要区别为通过检测中断信号实现快速读取电平状态,如图3所示,包括以下步骤:Referring to FIG. 3, FIG. 3 is a flowchart of another method for detecting a charging state provided by an embodiment of the present invention. The main difference between this embodiment and the previous embodiment is that the level state can be quickly read by detecting an interrupt signal, such as As shown in Figure 3, it includes the following steps:

步骤301,在检测到中断信号时,通过处于IO口模式的第一通信接口,读取电平状态。In step 301, when the interrupt signal is detected, the level state is read through the first communication interface in the IO port mode.

该步骤中,当第一通信接口处于IO模式时,若检测到中断信号,则读取第一通信接口的电平状态。而且在本实施方式中,可以根据电平状态确定该中断信号的类别。例如,若第一通信接口的电平状态为高电平,则该中断信号为上升沿中断;若第一通信接口的电平状态为低电平,则该中断信号为下降沿中断,并可以根据上升沿中断或者下降沿中断来确定充电器和移动终端之间的充电状态。In this step, when the first communication interface is in the IO mode, if an interrupt signal is detected, the level state of the first communication interface is read. Furthermore, in this embodiment, the type of the interrupt signal can be determined according to the level state. For example, if the level state of the first communication interface is a high level, the interrupt signal is a rising edge interrupt; if the level state of the first communication interface is a low level, the interrupt signal is a falling edge interrupt, and can The charging state between the charger and the mobile terminal is determined according to a rising edge interrupt or a falling edge interrupt.

步骤302、当电平状态为高电平时,确定充电状态为接入状态。Step 302: When the level state is a high level, determine that the charging state is an access state.

该步骤中,当第一通信接口的电平状态为高电平时,可以确定充电器和移动终端之间的充电状态为接入状态。而且还可以根据中断信号的类型确定充电器和移动终端之间的充电状态,例如,当中断信号为上升沿中断时,则确定充电器和移动终端之间的充电状态为接入状态。In this step, when the level state of the first communication interface is a high level, it may be determined that the charging state between the charger and the mobile terminal is an access state. Moreover, the charging state between the charger and the mobile terminal can also be determined according to the type of the interrupt signal. For example, when the interrupt signal is a rising edge interrupt, the charging state between the charger and the mobile terminal is determined to be the connected state.

步骤303、当电平状态为低电平时,确定充电状态为断开状态。Step 303: When the level state is a low level, determine that the charging state is an off state.

该步骤中,当第一通信接口的电平状态为低电平时,可以确定充电器和移动终端之间的充电状态为断开状态。而且还可以根据中断信号的类型确定充电器和移动终端之间的充电状态,例如,当中断信号为下降沿中断时,则确定充电器和移动终端之间的充电状态为断开状态。In this step, when the level state of the first communication interface is a low level, it may be determined that the charging state between the charger and the mobile terminal is a disconnected state. Moreover, the charging state between the charger and the mobile terminal can also be determined according to the type of the interrupt signal. For example, when the interrupt signal is a falling edge interrupt, the charging state between the charger and the mobile terminal is determined to be a disconnected state.

可选的,通过处于IO口模式的第一通信接口,读取电平状态,包括:Optionally, read the level status through the first communication interface in the IO port mode, including:

将第一通信接口配置为IO口模式,并通过处于第一通信接口,读取电平状态。The first communication interface is configured as an IO port mode, and the level state is read by being in the first communication interface.

该实施方式中,在使用充电器对移动终端的充电过程中,通过将第一通信接口配置为IO口模式,这样可以通过处于IO口模式的第一通信接口,快速的读取第一通信接口的电平状态,进而确定充电器与移动终端之间的充电状态,从而实现快速检测充电器和移动终端之间的充电状态。In this embodiment, in the process of using the charger to charge the mobile terminal, the first communication interface is configured as the IO port mode, so that the first communication interface can be quickly read through the first communication interface in the IO port mode. The level state of the charger and the mobile terminal is further determined, so as to realize the rapid detection of the charging state between the charger and the mobile terminal.

可选的,将第一通信接口配置为IO口模式之前,还包括:Optionally, before configuring the first communication interface as the IO port mode, the method further includes:

通过处于串行通信口模式的第一通信接口,按照预设的轮询周期,与移动终端进行通信握手;Through the first communication interface in the serial communication port mode, according to the preset polling period, perform communication handshake with the mobile terminal;

将第一通信接口配置为IO口模式,包括:Configure the first communication interface as IO port mode, including:

在轮询间隔内,将第一通信接口配置为IO口模式;In the polling interval, configure the first communication interface to the IO port mode;

通过处于IO口模式的第一通信接口,读取电平状态之后,方法还包括:After reading the level state through the first communication interface in the IO port mode, the method further includes:

将第一通信接口从IO口模式切换至串行通信口模式,并继续按照轮询周期,与移动终端进行通信握手。Switch the first communication interface from the IO port mode to the serial communication port mode, and continue to perform communication handshake with the mobile terminal according to the polling cycle.

该实施方式中,在使用充电器对移动终端的充电过程中,可以通过预先设定轮询周期,并采用轮询的方式对充电过程中的电压电流参数进行调整,当处于轮询期间时,可以通过处于串行通信口模式的第一通信接口,与移动终端进行通信握手。其中,当充电器与移动终端之间的数据通信处于轮询间隔期时,则将第一通信接口配置为IO口模式,使用IO口模式下的中断功能,可以实现快速检测充电器的充电状态。当轮询间隔期结束,则将第一通信接口从IO口模式切换至串行通信口模式,并继续按照预先设定的轮询周期,与移动终端进行通信握手,继续对充电过程进行轮询处理。这样,通过处于IO口模式下的第一通信接口,可以快速的读取第一通信接口的电平状态,进而确定充电器与移动终端之间的充电状态,实现快速检测充电器和移动终端之间的充电状态。In this embodiment, during the charging process of the mobile terminal using the charger, the polling period can be preset, and the voltage and current parameters in the charging process can be adjusted in a polling manner. The communication handshake can be performed with the mobile terminal through the first communication interface in the serial communication port mode. Among them, when the data communication between the charger and the mobile terminal is in the polling interval, the first communication interface is configured as the IO port mode, and the interrupt function in the IO port mode is used to quickly detect the charging state of the charger. . When the polling interval period ends, the first communication interface is switched from the IO port mode to the serial communication port mode, and continues to perform a communication handshake with the mobile terminal according to the preset polling period, and continues to poll the charging process. deal with. In this way, through the first communication interface in the IO port mode, the level state of the first communication interface can be quickly read, and then the charging state between the charger and the mobile terminal can be determined, so as to quickly detect the relationship between the charger and the mobile terminal. state of charge between.

可选的,通过处于串行通信口模式的第一通信接口,按照预设的轮询周期,与移动终端进行通信握手,包括:Optionally, perform a communication handshake with the mobile terminal according to a preset polling cycle through the first communication interface in the serial communication port mode, including:

在第一通信接口配置为串行通信口模式时,向移动终端发送握手数据;When the first communication interface is configured as a serial communication port mode, sending handshake data to the mobile terminal;

将第一通信接口配置为IO口模式,包括:Configure the first communication interface as IO port mode, including:

在发送握手数据后,将第一通信接口从串行通信口模式切换至IO口模式。After sending the handshake data, the first communication interface is switched from the serial communication port mode to the IO port mode.

该实施方式中,可以通过对充电过程进行轮询处理,实时调整充电电压和充电电流参数。其中,在第一通信接口配置为串行通信口模式时,向移动终端发送握手数据,当握手数据发送完成后,将第一通信接口从串行通信口模式切换至IO口模式,这样通过使用IO口模式下的中断功能,可以在轮询间隔内快速检测充电器的充电状态,实现安全充电。In this embodiment, the charging voltage and charging current parameters can be adjusted in real time by performing polling processing on the charging process. Wherein, when the first communication interface is configured as the serial communication port mode, the handshake data is sent to the mobile terminal, and after the handshake data is sent, the first communication interface is switched from the serial communication port mode to the IO port mode, so that by using The interrupt function in IO port mode can quickly detect the charging status of the charger within the polling interval to achieve safe charging.

可选的,通过处于串行通信口模式的第一通信接口,按照预设的轮询周期,与移动终端进行通信握手,包括:Optionally, perform a communication handshake with the mobile terminal according to a preset polling cycle through the first communication interface in the serial communication port mode, including:

在第一通信接口配置为串行通信口模式时,向移动终端发送握手数据;When the first communication interface is configured as a serial communication port mode, sending handshake data to the mobile terminal;

通过充电器中与移动终端建立通信连接的第二通信接口,接收移动终端返回的响应数据;Receive response data returned by the mobile terminal through the second communication interface in the charger that establishes a communication connection with the mobile terminal;

将第一通信接口配置为IO口模式,包括:Configure the first communication interface as IO port mode, including:

在通过第二通信接口接收到响应数据后,将第一通信接口从串行通信口模式切换至IO口模式。After receiving the response data through the second communication interface, the first communication interface is switched from the serial communication port mode to the IO port mode.

该实施方式中,可以通过对充电过程进行轮询处理,实时调整充电电压和充电电流参数。其中,在第一通信接口配置为串行通信口模式时,向移动终端发送握手数据,并通过充电器中的第二通信接口接收移动终端返回的响应数据,当第二通信接口接收到移动终端返回的响应数据后,则将第一通信接口从串行通信口模式切换至IO口模式,这样通过使用IO口模式下的中断功能,可以在轮询间隔内快速检测充电器的充电状态,实现安全充电。In this embodiment, the charging voltage and charging current parameters can be adjusted in real time by performing polling processing on the charging process. Wherein, when the first communication interface is configured as a serial communication port mode, the handshake data is sent to the mobile terminal, and the response data returned by the mobile terminal is received through the second communication interface in the charger. When the second communication interface receives the mobile terminal After the response data is returned, the first communication interface is switched from the serial communication port mode to the IO port mode. In this way, by using the interrupt function in the IO port mode, the charging state of the charger can be quickly detected within the polling interval to achieve Safe charging.

需要说明的是,在本实施方式中,第一通信接口为充电器的数据正信号引脚,第二通信接口为充电器的数据负信号引脚。It should be noted that, in this embodiment, the first communication interface is the data positive signal pin of the charger, and the second communication interface is the data negative signal pin of the charger.

这样,本发明实施例提供的检测充电状态的方法,在检测到中断信号时,通过处于IO口模式的第一通信接口,读取电平状态;当电平状态为高电平时,确定充电状态为接入状态;当电平状态为低电平时,确定充电状态为断开状态。这样,当第一通信接口配置为IO口模式时,通过读取电平状态确定充电状态,从而快速检测充电器和移动终端之间的充电状态,以便于对充电异常进行及时响应,提高了通信成功率和响应速度,增强了系统的安全性。In this way, in the method for detecting the charging state provided by the embodiment of the present invention, when an interrupt signal is detected, the level state is read through the first communication interface in the IO port mode; when the level state is a high level, the charging state is determined It is an access state; when the level state is a low level, it is determined that the charging state is a disconnected state. In this way, when the first communication interface is configured as the IO port mode, the charging state is determined by reading the level state, so as to quickly detect the charging state between the charger and the mobile terminal, so as to respond in time to abnormal charging and improve communication The success rate and response speed enhance the security of the system.

参见图4,图4是本发明实施例提供的另一种检测充电状态的方法的流程图,本实施例与上述实施例的主要区别为充电状态为接入状态的情况,如图4所示,包括以下步骤:Referring to FIG. 4 , FIG. 4 is a flowchart of another method for detecting a charging state provided by an embodiment of the present invention. The main difference between this embodiment and the above-mentioned embodiment is the case where the charging state is an access state, as shown in FIG. 4 . , including the following steps:

步骤401、通过处于IO口模式的第一通信接口,读取电平状态。Step 401: Read the level state through the first communication interface in the IO port mode.

该步骤中,在使用充电器对移动终端的充电过程中,通过处于IO口模式的第一通信接口,可以快速的读取到第一通信接口的电平状态,其中,第一通信接口是充电器与移动终端建立通信连接的接口。In this step, during the charging process of the mobile terminal using the charger, the level state of the first communication interface can be quickly read through the first communication interface in the IO port mode, wherein the first communication interface is the charging It is an interface for establishing a communication connection between the device and the mobile terminal.

步骤402、当电平状态为高电平时,确定充电状态为接入状态。Step 402 , when the level state is a high level, determine that the charging state is an access state.

该步骤中,当充电器的第一通信接口的电平状态为高电平时,则可以确定充电器和移动终端之间的充电状态的为接入状态,充电器开始对移动终端输出电压,并开始对移动终端充电。In this step, when the level state of the first communication interface of the charger is a high level, it can be determined that the charging state between the charger and the mobile terminal is an access state, the charger starts to output voltage to the mobile terminal, and Start charging the mobile terminal.

需要说明的是,本发明实施例还可以通过检测中断的方式确定充电状态。例如,当充电器接入移动终端时,且移动终端的数据正信号引脚的初始电压为3.3V,则充电器的第一通信接口的电压也会由初始的2.5V升至3.3V,且当充电器的第一通信接口配置为IO口模式下时,会产生电平变化情况为低电平转变到高电平的变化情况对应的上降沿中断。基于该上升沿中断,则可以确定充电器与移动终端之间处于接入状态,充电器开始对移动终端输出电压,并开始对移动终端充电。It should be noted that, in this embodiment of the present invention, the charging state may also be determined by detecting interruption. For example, when the charger is connected to the mobile terminal, and the initial voltage of the data positive signal pin of the mobile terminal is 3.3V, the voltage of the first communication interface of the charger will also increase from the initial 2.5V to 3.3V, and When the first communication interface of the charger is configured in the IO port mode, a rising and falling edge interrupt corresponding to the change of the level change from a low level to a high level will be generated. Based on the interruption of the rising edge, it can be determined that the charger and the mobile terminal are in a connected state, the charger starts to output voltage to the mobile terminal, and starts to charge the mobile terminal.

步骤403、将第一通信接口从IO口模式切换至串行通信口模式。Step 403: Switch the first communication interface from the IO port mode to the serial communication port mode.

该步骤中,当确定充电状态为接入状态时,则将第一通信接口从IO口模式切换至串行通信口模式,并可以利用串口通信口的特性向移动终端侧发送握手数据。In this step, when it is determined that the charging state is the access state, the first communication interface is switched from the IO port mode to the serial communication port mode, and the characteristics of the serial communication port can be used to send handshake data to the mobile terminal side.

步骤404、通过处于串行通信口模式的第一通信接口,按照预设的轮询周期,与移动终端进行通信握手。Step 404 , perform a communication handshake with the mobile terminal according to a preset polling cycle through the first communication interface in the serial communication port mode.

该步骤中,当第一目标数据通信接口从IO口模式切换至串行通信模式后,可以按照预先设置的轮询周期,与移动终端进行通信握手,即向移动终端发送握手数据,开始对移动终端充电。In this step, after the first target data communication interface is switched from the IO port mode to the serial communication mode, a communication handshake can be performed with the mobile terminal according to the preset polling cycle, that is, the handshake data is sent to the mobile terminal, and the mobile terminal is started to communicate with the mobile terminal. Terminal charging.

这样,本发明实施例提供的检测充电状态的方法,通过处于输入输出IO口模式的第一通信接口,读取电平状态;当电平状态为高电平时,确定充电状态为接入状态;将第一通信接口从IO口模式切换至串行通信口模式;通过处于串行通信口模式的第一通信接口,按照预设的轮询周期,与移动终端进行通信握手。这样,当第一通信接口配置为IO口模式时,通过读取电平状态确定充电状态,从而快速检测充电器和移动终端之间的充电状态,以便于对充电异常进行及时响应,提高了通信成功率和响应速度,增强了系统的安全性。In this way, the method for detecting the charging state provided by the embodiment of the present invention reads the level state through the first communication interface in the input/output IO port mode; when the level state is high, it is determined that the charging state is the access state; The first communication interface is switched from the IO port mode to the serial communication port mode; the communication handshake is performed with the mobile terminal according to the preset polling cycle through the first communication interface in the serial communication port mode. In this way, when the first communication interface is configured as the IO port mode, the charging state is determined by reading the level state, so as to quickly detect the charging state between the charger and the mobile terminal, so as to respond in time to abnormal charging and improve communication The success rate and response speed enhance the security of the system.

参见图5,图5是本发明实施提供的充电器的结构图,如图5所示,充电器500包括读取模块501和确定模块502,其中,读取模块501和确定模块502连接。Referring to FIG. 5, FIG. 5 is a structural diagram of the charger provided by the implementation of the present invention. As shown in FIG. 5, the charger 500 includes a reading module 501 and a determining module 502, wherein the reading module 501 and the determining module 502 are connected.

读取模块501,用于通过处于IO口模式的第一通信接口,读取电平状态,其中,所述第一通信接口为所述充电器与移动终端建立通信连接的接口;The reading module 501 is used to read the level state through the first communication interface in the IO port mode, wherein the first communication interface is an interface for establishing a communication connection between the charger and the mobile terminal;

确定模块502,用于根据所述电平状态,确定充电状态。The determining module 502 is configured to determine the charging state according to the level state.

可选的,如图6所示,所述确定模块502包括:Optionally, as shown in FIG. 6 , the determining module 502 includes:

第一确定子模块5021,用于当所述电平状态为高电平时,确定充电状态为接入状态;The first determination sub-module 5021 is configured to determine that the charging state is an access state when the level state is a high level;

第二确定子模块5022,用于当所述电平状态为低电平时,确定充电状态为断开状态。The second determination sub-module 5022 is configured to determine that the charging state is an off state when the level state is a low level.

可选的,如图7所示,所述读取模块501包括:Optionally, as shown in FIG. 7 , the reading module 501 includes:

第一读取子模块5011,用于在检测到中断信号时,通过处于IO口模式的第一通信接口,读取电平状态;The first reading sub-module 5011 is used to read the level state through the first communication interface in the IO port mode when the interrupt signal is detected;

或者,or,

第二读取子模块5012,用于将所述第一通信接口配置为IO口模式,并通过所述第一通信接口,读取电平状态。The second reading sub-module 5012 is configured to configure the first communication interface as an IO port mode, and read the level state through the first communication interface.

可选的,如图8所示,所述读取模块501包括所述第二读取子模块5012时,所述充电器500还包括:Optionally, as shown in FIG. 8 , when the reading module 501 includes the second reading sub-module 5012, the charger 500 further includes:

第一通信模块503,用于通过处于串行通信口模式的所述第一通信接口,按照预设的轮询周期,与所述移动终端进行通信握手;a first communication module 503, configured to perform a communication handshake with the mobile terminal according to a preset polling cycle through the first communication interface in the serial communication port mode;

所述第二读取子模块5012,具体用于在轮询间隔内,将所述第一通信接口配置为IO口模式,并通过所述第一通信接口,读取电平状态;The second reading sub-module 5012 is specifically configured to configure the first communication interface as an IO port mode within the polling interval, and read the level state through the first communication interface;

所述第一通信模块503,还用于在所述第二读取子模块5012通过所述第一通信接口读取电平状态之后,将所述第一通信接口从IO口模式切换至串行通信口模式,并继续按照所述轮询周期,与所述移动终端进行通信握手。The first communication module 503 is further configured to switch the first communication interface from the IO port mode to the serial interface after the second reading sub-module 5012 reads the level state through the first communication interface. communication port mode, and continue to perform communication handshake with the mobile terminal according to the polling cycle.

可选的,所述第一通信模块503,具体用于在所述第一通信接口配置为串行通信口模式时,向所述移动终端发送握手数据;Optionally, the first communication module 503 is specifically configured to send handshake data to the mobile terminal when the first communication interface is configured as a serial communication port mode;

所述第二读取子模块5012,具体用于在发送所述握手数据后,将所述第一通信接口从所述串行通信口模式切换至IO口模式,并通过所述第一通信接口,读取电平状态。The second reading sub-module 5012 is specifically configured to switch the first communication interface from the serial communication port mode to the IO port mode after sending the handshake data, and pass the first communication interface , read the level status.

可选的,如图9所示,所述第一通信模块503包括:Optionally, as shown in FIG. 9 , the first communication module 503 includes:

发送子模块5031,用于在所述第一通信接口配置为串行通信口模式时,向所述移动终端发送握手数据;A sending submodule 5031, configured to send handshake data to the mobile terminal when the first communication interface is configured as a serial communication port mode;

接收子模块5032,用于通过所述充电器中与所述移动终端建立通信连接的第二通信接口,接收所述移动终端返回的响应数据;A receiving sub-module 5032, configured to receive the response data returned by the mobile terminal through the second communication interface in the charger that establishes a communication connection with the mobile terminal;

所述第二读取子模块5012,具体用于在通过所述第二通信接口接收到所述响应数据后,将所述第一通信接口从所述串行通信口模式切换至IO口模式,并通过所述第一通信接口,读取电平状态。The second reading sub-module 5012 is specifically configured to switch the first communication interface from the serial communication port mode to the IO port mode after receiving the response data through the second communication interface, And through the first communication interface, the level state is read.

可选的,所述第一通信接口为所述充电器的数据正信号引脚,所述第二通信接口为所述充电器的数据负信号引脚。Optionally, the first communication interface is a data positive signal pin of the charger, and the second communication interface is a data negative signal pin of the charger.

可选的,如图10所示,所述充电器500还包括:Optionally, as shown in FIG. 10 , the charger 500 further includes:

配置模块504,用于在所述第一确定子模块5021确定充电状态为接入状态后,将所述第一通信接口从IO口模式切换至串行通信口模式;The configuration module 504 is configured to switch the first communication interface from the IO port mode to the serial communication port mode after the first determination sub-module 5021 determines that the charging state is the access state;

第二通信模块505,用于通过处于串行通信口模式的所述第一通信接口,按照预设的轮询周期,与所述移动终端进行通信握手。The second communication module 505 is configured to perform a communication handshake with the mobile terminal according to a preset polling cycle through the first communication interface in the serial communication port mode.

充电器500能够实现图1至图4的方法实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The charger 500 can implement each process implemented by the mobile terminal in the method embodiments of FIG. 1 to FIG. 4 , and in order to avoid repetition, details are not repeated here.

本发明实施例提供的充电器,本发明提供一种检测充电状态的方法和充电器,该方法包括:通过处于IO口模式的第一通信接口,读取电平状态;根据电平状态,确定充电状态。这样,当第一通信接口配置为IO口模式时,通过读取电平状态确定充电状态,从而快速检测充电器和移动终端之间的充电状态,以便于对充电异常进行及时响应,提高了通信成功率和响应速度,增强了系统的安全性。In the charger provided by the embodiment of the present invention, the present invention provides a method and a charger for detecting a charging state. The method includes: reading a level state through a first communication interface in an IO port mode; determining the level state according to the level state charging. In this way, when the first communication interface is configured as the IO port mode, the charging state is determined by reading the level state, so as to quickly detect the charging state between the charger and the mobile terminal, so as to respond to the charging abnormality in time and improve the communication The success rate and response speed enhance the security of the system.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (12)

Translated fromChinese
1.一种检测充电状态的方法,应用于充电器,其特征在于,包括:1. a method for detecting state of charge, applied to a charger, is characterized in that, comprising:通过处于输入输出IO口模式的第一通信接口,读取电平状态,其中,所述第一通信接口为所述充电器与移动终端建立通信连接的接口;Read the level state through the first communication interface in the input/output IO port mode, wherein the first communication interface is an interface for establishing a communication connection between the charger and the mobile terminal;根据所述电平状态,确定充电状态;According to the level state, determine the charging state;其中,所述通过处于IO口模式的第一通信接口,读取电平状态,包括:Wherein, the reading of the level state through the first communication interface in the IO port mode includes:将所述第一通信接口配置为IO口模式,并通过所述第一通信接口,读取电平状态;Configuring the first communication interface as an IO port mode, and reading the level state through the first communication interface;所述将所述第一通信接口配置为IO口模式之前,还包括:Before configuring the first communication interface to the IO port mode, the method further includes:通过处于串行通信口模式的所述第一通信接口,按照预设的轮询周期,与所述移动终端进行通信握手;Perform a communication handshake with the mobile terminal according to a preset polling cycle through the first communication interface in the serial communication port mode;所述将所述第一通信接口配置为IO口模式,包括:The configuring the first communication interface as an IO port mode includes:在轮询间隔内,将所述第一通信接口配置为IO口模式;Within the polling interval, configure the first communication interface as an IO port mode;所述通过处于IO口模式的第一通信接口,读取电平状态之后,还包括:After reading the level state through the first communication interface in the IO port mode, it also includes:将所述第一通信接口从IO口模式切换至串行通信口模式,并继续按照所述轮询周期,与所述移动终端进行通信握手;Switching the first communication interface from the IO port mode to the serial communication port mode, and continuing to perform a communication handshake with the mobile terminal according to the polling cycle;所述根据所述电平状态,确定充电状态,包括:The determining the charging state according to the level state includes:当所述电平状态为高电平时,确定充电状态为接入状态;When the level state is a high level, it is determined that the charging state is an access state;当所述电平状态为低电平时,确定充电状态为断开状态。When the level state is a low level, it is determined that the charging state is an off state.2.根据权利要求1所述的方法,其特征在于,所述通过处于IO口模式的第一通信接口,读取电平状态,包括:2. method according to claim 1, is characterized in that, described by the first communication interface in IO port mode, read level state, comprising:在检测到中断信号时,通过处于IO口模式的第一通信接口,读取电平状态。When the interrupt signal is detected, the level state is read through the first communication interface in the IO port mode.3.根据权利要求1所述的方法,其特征在于,所述通过处于串行通信口模式的所述第一通信接口,按照预设的轮询周期,与所述移动终端进行通信握手,包括:3. The method according to claim 1, wherein the first communication interface in the serial communication port mode, according to a preset polling period, performs a communication handshake with the mobile terminal, comprising: :在所述第一通信接口配置为串行通信口模式时,向所述移动终端发送握手数据;When the first communication interface is configured as a serial communication port mode, sending handshake data to the mobile terminal;所述将所述第一通信接口配置为IO口模式,包括:The configuring the first communication interface as an IO port mode includes:在发送所述握手数据后,将所述第一通信接口从所述串行通信口模式切换至IO口模式。After sending the handshake data, the first communication interface is switched from the serial communication port mode to the IO port mode.4.根据权利要求1所述的方法,其特征在于,所述通过处于串行通信口模式的所述第一通信接口,按照预设的轮询周期,与所述移动终端进行通信握手,包括:4 . The method according to claim 1 , wherein the first communication interface in the serial communication port mode, according to a preset polling period, performs a communication handshake with the mobile terminal, comprising: 5 . :在所述第一通信接口配置为串行通信口模式时,向所述移动终端发送握手数据;When the first communication interface is configured as a serial communication port mode, sending handshake data to the mobile terminal;通过所述充电器中与所述移动终端建立通信连接的第二通信接口,接收所述移动终端返回的响应数据;Receive response data returned by the mobile terminal through a second communication interface in the charger that establishes a communication connection with the mobile terminal;所述将所述第一通信接口配置为IO口模式,包括:The configuring the first communication interface as an IO port mode includes:在通过所述第二通信接口接收到所述响应数据后,将所述第一通信接口从所述串行通信口模式切换至IO口模式。After receiving the response data through the second communication interface, the first communication interface is switched from the serial communication port mode to the IO port mode.5.根据权利要求4所述的方法,其特征在于,所述第一通信接口为所述充电器的数据正信号引脚,所述第二通信接口为所述充电器的数据负信号引脚。5. The method according to claim 4, wherein the first communication interface is a data positive signal pin of the charger, and the second communication interface is a data negative signal pin of the charger .6.根据权利要求1所述的方法,其特征在于,所述当所述电平状态为低电平时,确定充电状态为接入状态之后,还包括:6 . The method according to claim 1 , wherein when the level state is a low level, after determining that the charging state is an access state, the method further comprises: 6 .将所述第一通信接口从IO口模式切换至串行通信口模式;switching the first communication interface from the IO port mode to the serial communication port mode;通过处于串行通信口模式的所述第一通信接口,按照预设的轮询周期,与所述移动终端进行通信握手。A communication handshake is performed with the mobile terminal according to a preset polling period through the first communication interface in the serial communication port mode.7.一种充电器,其特征在于,包括:7. A charger, characterized in that, comprising:读取模块,用于通过处于IO口模式的第一通信接口,读取电平状态,其中,所述第一通信接口为所述充电器与移动终端建立通信连接的接口;a reading module, configured to read the level state through the first communication interface in the IO port mode, wherein the first communication interface is an interface for establishing a communication connection between the charger and the mobile terminal;确定模块,用于根据所述电平状态,确定充电状态;a determining module for determining the charging state according to the level state;其中,所述读取模块包括:Wherein, the reading module includes:第二读取子模块,用于将所述第一通信接口配置为IO口模式,并通过所述第一通信接口,读取电平状态;The second reading sub-module is used to configure the first communication interface as an IO port mode, and read the level state through the first communication interface;所述读取模块包括所述第二读取子模块时,所述充电器还包括:When the reading module includes the second reading sub-module, the charger further includes:第一通信模块,用于通过处于串行通信口模式的所述第一通信接口,按照预设的轮询周期,与所述移动终端进行通信握手;a first communication module, configured to perform a communication handshake with the mobile terminal according to a preset polling cycle through the first communication interface in the serial communication port mode;所述第二读取子模块,具体用于在轮询间隔内,将所述第一通信接口配置为IO口模式,并通过所述第一通信接口,读取电平状态;The second reading sub-module is specifically configured to configure the first communication interface as an IO port mode within the polling interval, and read the level state through the first communication interface;所述第一通信模块,还用于在所述第二读取子模块通过所述第一通信接口读取电平状态之后,将所述第一通信接口从IO口模式切换至串行通信口模式,并继续按照所述轮询周期,与所述移动终端进行通信握手;The first communication module is further configured to switch the first communication interface from the IO port mode to the serial communication port after the second reading sub-module reads the level state through the first communication interface mode, and continue to perform communication handshake with the mobile terminal according to the polling period;所述确定模块包括:The determining module includes:第一确定子模块,用于当所述电平状态为高电平时,确定充电状态为接入状态;a first determining submodule, configured to determine that the charging state is an access state when the level state is a high level;第二确定子模块,用于当所述电平状态为低电平时,确定充电状态为断开状态。The second determination sub-module is configured to determine that the charging state is an off state when the level state is a low level.8.根据权利要求7所述的充电器,其特征在于,所述读取模块包括:8. The charger according to claim 7, wherein the reading module comprises:第一读取子模块,用于在检测到中断信号时,通过处于IO口模式的第一通信接口,读取电平状态。The first reading sub-module is used to read the level state through the first communication interface in the IO port mode when the interrupt signal is detected.9.根据权利要求7所述的充电器,其特征在于,9. The charger according to claim 7, wherein,所述第一通信模块,具体用于在所述第一通信接口配置为串行通信口模式时,向所述移动终端发送握手数据;The first communication module is specifically configured to send handshake data to the mobile terminal when the first communication interface is configured as a serial communication port mode;所述第二读取子模块,具体用于在发送所述握手数据后,将所述第一通信接口从所述串行通信口模式切换至IO口模式,并通过所述第一通信接口,读取电平状态。The second reading sub-module is specifically configured to switch the first communication interface from the serial communication port mode to the IO port mode after sending the handshake data, and through the first communication interface, Read level status.10.根据权利要求7所述的充电器,其特征在于,所述第一通信模块包括:10. The charger according to claim 7, wherein the first communication module comprises:发送子模块,用于在所述第一通信接口配置为串行通信口模式时,向所述移动终端发送握手数据;a sending submodule, configured to send handshake data to the mobile terminal when the first communication interface is configured as a serial communication port mode;接收子模块,用于通过所述充电器中与所述移动终端建立通信连接的第二通信接口,接收所述移动终端返回的响应数据;a receiving sub-module, configured to receive response data returned by the mobile terminal through a second communication interface in the charger that establishes a communication connection with the mobile terminal;所述第二读取子模块,具体用于在通过所述第二通信接口接收到所述响应数据后,将所述第一通信接口从所述串行通信口模式切换至IO口模式,并通过所述第一通信接口,读取电平状态。The second reading sub-module is specifically configured to switch the first communication interface from the serial communication port mode to the IO port mode after receiving the response data through the second communication interface, and Through the first communication interface, the level state is read.11.根据权利要求10所述的充电器,其特征在于,所述第一通信接口为所述充电器的数据正信号引脚,所述第二通信接口为所述充电器的数据负信号引脚。11. The charger according to claim 10, wherein the first communication interface is a data positive signal pin of the charger, and the second communication interface is a data negative signal pin of the charger. foot.12.根据权利要求7所述的充电器,其特征在于,所述充电器还包括:12. The charger of claim 7, wherein the charger further comprises:配置模块,用于在所述第一确定子模块确定充电状态为接入状态后,将所述第一通信接口从IO口模式切换至串行通信口模式;a configuration module, configured to switch the first communication interface from the IO port mode to the serial communication port mode after the first determination sub-module determines that the charging state is the access state;第二通信模块,用于通过处于串行通信口模式的所述第一通信接口,按照预设的轮询周期,与所述移动终端进行通信握手。The second communication module is configured to perform a communication handshake with the mobile terminal according to a preset polling cycle through the first communication interface in the serial communication port mode.
CN201710265670.XA2017-04-212017-04-21A kind of method and charger detecting charged stateActiveCN106877462B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710265670.XACN106877462B (en)2017-04-212017-04-21A kind of method and charger detecting charged state

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710265670.XACN106877462B (en)2017-04-212017-04-21A kind of method and charger detecting charged state

Publications (2)

Publication NumberPublication Date
CN106877462A CN106877462A (en)2017-06-20
CN106877462Btrue CN106877462B (en)2019-04-12

Family

ID=59163674

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710265670.XAActiveCN106877462B (en)2017-04-212017-04-21A kind of method and charger detecting charged state

Country Status (1)

CountryLink
CN (1)CN106877462B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108521417B (en)*2018-03-302020-04-14维沃移动通信有限公司 A communication processing method and mobile terminal
CN109560581B (en)*2018-11-132020-12-01Oppo广东移动通信有限公司 Charging processing method, charging processing circuit, electronic device and storage medium
EP4181341A4 (en)2020-07-152024-02-21Huawei Technologies Co., Ltd.Data transmission method employing charging cable, and electronic devices
CN111896884B (en)*2020-07-312023-11-14北京小米移动软件有限公司 Charging detection method and device
CN112946492B (en)*2020-12-312023-07-07苏州德凌迅动力科技有限公司Aging test method and system for battery pack without communication interface

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1574539A (en)*2003-05-272005-02-02捷讯研究有限公司Method and apparatus for controlling the charging state in a mobile electronic device
CN101082892A (en)*2006-05-302007-12-05三星电子株式会社Electronic device having usb interface capable of supporting multiple usb interface standards and methods of operating same
CN102143266A (en)*2011-02-182011-08-03深圳桑菲消费通信有限公司Method for extending universal serial bus (USB) interface of mobile terminal into serial communication interface
CN102393837A (en)*2011-11-082012-03-28深圳市海思半导体有限公司USB charger recognition device and method
CN103024195A (en)*2012-12-272013-04-03青岛海信移动通信技术股份有限公司Smart mobile terminal and implementation method of charging of smart mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1574539A (en)*2003-05-272005-02-02捷讯研究有限公司Method and apparatus for controlling the charging state in a mobile electronic device
CN101082892A (en)*2006-05-302007-12-05三星电子株式会社Electronic device having usb interface capable of supporting multiple usb interface standards and methods of operating same
CN102143266A (en)*2011-02-182011-08-03深圳桑菲消费通信有限公司Method for extending universal serial bus (USB) interface of mobile terminal into serial communication interface
CN102393837A (en)*2011-11-082012-03-28深圳市海思半导体有限公司USB charger recognition device and method
CN103024195A (en)*2012-12-272013-04-03青岛海信移动通信技术股份有限公司Smart mobile terminal and implementation method of charging of smart mobile terminal

Also Published As

Publication numberPublication date
CN106877462A (en)2017-06-20

Similar Documents

PublicationPublication DateTitle
CN106877462B (en)A kind of method and charger detecting charged state
JP7428835B2 (en) Charging circuit and charging cable
US10389153B2 (en)Charging control method and mobile terminal
CN112152276B (en)Abnormality detection method and apparatus, and storage medium
TWI636637B (en)Method of fast charging, mobile terminal, and adaptor
CN103618356B (en) A charging system and charging method for a mobile terminal
CN111049214A (en)Charging method, terminal and charging adapter
EP3206279A1 (en)Charging control method and device, power adapter, and mobile terminal
CN104467109B (en)Method for supplying power to electronic equipment and electronic equipment
JP2020513719A (en) Electronic device, charger, charging system and charging method
CN106356918A (en)Quick charge recognition method and terminal equipment
US20180097315A1 (en)Power adapter, terminal device, charging system, and charging method
WO2018090174A1 (en)Charging method and related device
CN109254210B (en)Electronic equipment port type detection method and device, detection circuit and electronic equipment
CN109560581B (en) Charging processing method, charging processing circuit, electronic device and storage medium
CN107516919A (en) A charging method and charger
CN105048018B (en)The charging method and device of a kind of terminal with data exchanging function
CN104485712B (en)Charging method and electronic equipment
CN105071484A (en)Charging method and apparatus of terminal having data exchange function
CN120072244A (en)Log transmission method, continuous blood glucose monitoring equipment and system
CN107579558B (en) Charging control method, charger, charging system, and computer-readable storage medium
WO2017049556A1 (en)Data transmission method and mobile terminal
CN112821156B (en)Electronic tags chip and TYPE-C data line
CN107706977B (en) Method for detecting charging current and charging device
CN204067514U (en) Device, terminal, charger and system for activating battery

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
TA01Transfer of patent application right

Effective date of registration:20171107

Address after:283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Applicant after:VIVO MOBILE COMMUNICATION CO., LTD.

Applicant after:Wewo Mobile Communication Co. Ltd. Beijing branch

Address before:283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Applicant before:VIVO MOBILE COMMUNICATION CO., LTD.

TA01Transfer of patent application right
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right

Effective date of registration:20200521

Address after:283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Patentee after:VIVO MOBILE COMMUNICATION Co.,Ltd.

Address before:283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Co-patentee before:Wewo Mobile Communication Co. Ltd. Beijing branch

Patentee before:VIVO MOBILE COMMUNICATION Co.,Ltd.

TR01Transfer of patent right

[8]ページ先頭

©2009-2025 Movatter.jp