CN116945782A - Printer and control method thereof - Google Patents

Printer and control method thereof Download PDF

Info

Publication number
CN116945782A
CN116945782A CN202311006726.1A CN202311006726A CN116945782A CN 116945782 A CN116945782 A CN 116945782A CN 202311006726 A CN202311006726 A CN 202311006726A CN 116945782 A CN116945782 A CN 116945782A
Authority
CN
China
Prior art keywords
module
charging
transmission port
data
information transmission
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.)
Pending
Application number
CN202311006726.1A
Other languages
Chinese (zh)
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.)
Xiamen Hanyin Electronic Technology Co Ltd
Original Assignee
Xiamen Hanyin Electronic Technology 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 Xiamen Hanyin Electronic Technology Co Ltd filed Critical Xiamen Hanyin Electronic Technology Co Ltd
Priority to CN202311006726.1A priority Critical patent/CN116945782A/en
Publication of CN116945782A publication Critical patent/CN116945782A/en
Pending legal-status Critical Current

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • B41J29/393Devices for controlling or analysing the entire machine ; Controlling or analysing mechanical parameters involving printing of test patterns

Abstract

The application provides a printer and a control method thereof, wherein the printer comprises a connection interface, a charging module, a data flow direction switching module, a control module and a printing module; the connection interface can acquire charging mode switching request information from the external device through the state information transmission port, acquire printing data and charging protocol data from the external device through the data information transmission port, and supply power to the external device through the power supply transmission port; the control module generates a control signal according to the charging mode switching request information and generates a printing instruction according to the printing data; the data flow direction switching module is used for controlling the data information transmission port to be communicated with the charging module or the control module according to the control signal of the control module; the charging module controls a power supply mode output by the power supply transmission port according to the charging mode switching request information and/or the charging protocol data; the print module executes the print instruction. The application can avoid the condition of insufficient electric quantity of external equipment and improve the flexibility and convenience of the printer.

Description

Printer and control method thereof
Technical Field
The application relates to the technical field of printing, in particular to a printer and a control method thereof.
Background
Traditional printers usually need to be connected through a computer to print, however, the printing mode limits the use situations of users and has poor convenience.
With the popularity of mobile devices and the development of printing technology, more and more users tend to print using mobile devices. However, due to the limited battery capacity of the mobile device, the battery of the mobile device is easily consumed for a long time, and printing is no longer performed. At this time, the user needs to charge the mobile device and then print, or change the mobile device to another mobile device for printing, so that the flexibility and the convenience are poor.
Disclosure of Invention
The embodiment of the application provides a printer and a control method thereof, which are used for solving the problems of poor printing flexibility and convenience caused by the fact that the mobile equipment is possibly insufficient in electric quantity when the mobile equipment is connected with the printer for printing.
In a first aspect, an embodiment of the present application provides a printer, including a connection interface, a charging module, a data flow direction switching module, a control module, and a printing module;
the connection interface at least comprises a power supply transmission port, a data information transmission port and a state information transmission port; the connection interface is used for connecting an external device, can acquire charging mode switching request information from the external device through the state information transmission port, acquire print data and charging protocol data from the external device through the data information transmission port, and can supply power to the external device through the power supply transmission port;
The control module is used for generating a control signal according to the charging mode switching request information acquired by the state information transmission port and generating a printing instruction according to the printing data acquired by the data information transmission port;
the data flow direction switching module is used for controlling the data information transmission port to be communicated with the charging module or the control module according to the control signal of the control module;
the charging module is used for controlling a power supply mode output by the power supply transmission port according to the charging mode switching request information acquired by the state information transmission port and/or the charging protocol data acquired by the data information transmission port;
the printing module is used for executing the printing instruction sent by the control module.
In one possible implementation manner, the control module generates a control signal according to the charging mode switching request information acquired by the state information transmission port, so that the data flow direction switching module controls the data information transmission port to be communicated with the charging module; and when the first preset time length passes, the control module generates a control signal again so that the data flow direction switching module controls the data information transmission port to be communicated with the control module.
In one possible implementation manner, when the control module obtains the charging mode switching request information, if the control module is in a busy state, after receiving the printing data of the current page, the control module generates a control signal according to the charging mode switching request information, so that the data flow direction switching module controls the data information transmission port to be communicated with the charging module.
In one possible implementation, the charging module includes a charging communication unit and a charging protocol unit;
the charging communication unit is used for acquiring charging mode switching request information through the state information transmission port and sending the charging mode switching request information to the charging protocol unit and the control module;
the charging protocol unit is used for controlling a power supply mode output by the power supply transmission port through the charging communication unit according to the charging protocol data acquired by the charging mode switching request information and/or the data information transmission port.
In one possible implementation, the charging protocol unit includes a charging protocol element and a first switching tube;
the first switch tube is used for connecting an external power supply;
the charging protocol element is used for controlling the state of the first switching tube according to the charging protocol data acquired by the charging mode switching request information and/or the data information transmission port so as to control the power mode of the external power supply output through the first switching tube, the charging communication unit and the power transmission port.
In one possible implementation, the charging communication unit includes a charging communication element, a second switching tube, a third switching tube, a fourth switching tube, and a fifth switching tube;
The charging communication element is used for acquiring charging mode switching request information through the state information transmission port, sending the charging mode switching request information to the charging protocol unit and the control module, and controlling the states of the second switching tube and the third switching tube by controlling the states of the fourth switching tube and the fifth switching tube so that the charging protocol unit controls the power supply mode output by the power supply transmission port through the second switching tube and the third switching tube.
In one possible implementation, the control module has a print driver module integrated therein;
the data flow direction switching module is specifically used for controlling the data information transmission port to be communicated with the charging module or the printing driving module according to the control signal of the control module;
the printing driving module is used for generating a printing instruction according to the printing data acquired by the data information transmission port;
the printing module is specifically used for executing the printing instruction sent by the printing driving module.
In one possible implementation, the print driving module is further configured to drive the print module to perform an opening operation before generating a print instruction according to the print data acquired by the data information transmission port.
In one possible implementation, the data flow switching module includes a switching element;
The switch element is used for controlling the communication channel of the switch element according to the control signal of the control module so as to enable the data information transmission port to be communicated with the charging module or the control module.
In a second aspect, an embodiment of the present application provides a method for controlling a printer, where the printer includes a connection interface, a charging module, a data flow direction switching module, a control module, and a print driving module; the printer control method includes:
when the state information transmission port of the connection interface acquires charging mode switching request information from the external equipment, the control module generates a control signal according to the charging mode switching request information so that the data flow direction switching module controls the data information transmission port of the connection interface to be communicated with the charging module; and when the first preset time length passes, the control module generates a control signal again so that the data flow direction switching module controls the data information transmission port of the connection interface to be communicated with the printing driving module.
The embodiment of the application provides a printer and a control method thereof, wherein the printer comprises a connection interface, a charging module, a data flow switching module, a control module and a printing module; the connection interface can acquire charging mode switching request information from the external device through the status information transmission port, acquire print data and charging protocol data from the external device through the data information transmission port, and can supply power to the external device through the power supply transmission port; the control module is used for generating a control signal according to the charging mode switching request information and generating a printing instruction according to the printing data; the data flow direction switching module is used for controlling the data information transmission port to be communicated with the charging module or the control module according to the control signal of the control module; the charging module is used for controlling a power supply mode output by the power supply transmission port according to the charging mode switching request information and/or the charging protocol data; the printing module is used for executing the printing instruction sent by the control module; through above-mentioned each module, the printer not only can accomplish self print task, can also switch request information according to the charging mode of external equipment, makes power transmission port output corresponding power mode, satisfies external equipment's charge demand, avoids external equipment to appear the condition that the electric quantity is insufficient or the electric quantity is overcharged, can protect external equipment's battery, improves the flexibility and the convenience of printer.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a printer according to an embodiment of the present application;
FIG. 2 is a schematic circuit diagram of a charging module, a data flow switching module and a connection interface according to an embodiment of the present application;
fig. 3 is a schematic structural view of a printer according to another embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following description will be made by way of specific embodiments with reference to the accompanying drawings.
Referring to fig. 1, a schematic diagram of a printer according to an embodiment of the present application is shown. Referring to fig. 1, the printer includes a connection interface 11, a charging module 12, a data flow switching module 13, a control module 14, and a printing module 15;
the connection interface 11 at least comprises a power supply transmission port, a data information transmission port and a state information transmission port; the connection interface 11 is for connecting an external device, which is capable of acquiring charging mode switching request information from the external device through a status information transmission port, acquiring print data and charging protocol data from the external device through a data information transmission port, and supplying power to the external device through a power supply transmission port;
the control module 14 is configured to generate a control signal according to the charging mode switching request information acquired by the status information transmission port, and generate a print instruction according to the print data acquired by the data information transmission port;
the data flow direction switching module 13 is used for controlling the data information transmission port to be communicated with the charging module 12 or the control module 14 according to the control signal of the control module 14;
The charging module 12 is configured to control a power mode output by the power transmission port according to the charging mode switching request information acquired by the status information transmission port and/or the charging protocol data acquired by the data information transmission port;
the printing module 15 is used for executing the printing instruction sent by the control module 14.
The control port of the data flow direction switching module 13 and the first data port of the data flow direction switching module 13 are connected with the control module 14, the second data port of the data flow direction switching module 13 is connected with the data information transmission port of the connection interface 11, and the third data port of the data flow direction switching module 13 is connected with the data transmission port of the charging module 12; the state information transmission port of the connection interface 11 is connected with the first state transmission port of the charging module 12, and the power transmission port of the connection interface 11 is connected with the power transmission port of the charging module 12; the control module 14 is connected to the second status transmission port of the charging module 12 and the printing module 15, respectively.
Referring to fig. 1, the printer is connected to a device interface of an external device through a connection interface 11 to realize information transmission, power transmission, and the like of the printer and the external device. The connection interface 11 and the device interface may be type-c interfaces, or may be other interfaces, and are not particularly limited herein. The external device may be a mobile device such as a cell phone, tablet computer, or the like.
When the printer is connected to the external device, the charging mode switching request information may be acquired from the external device through the status information transmission port. The charging mode switching request information acquired by the connection interface 11 is transmitted to the charging module 12, and the charging module 12 may send the charging mode switching request information to the control module 14.
After receiving the charging mode switching request information, the control module 14 sends a control signal to the data flow direction switching module 13, and the data flow direction switching module 13 is controlled to communicate the data information transmission port with the charging module 12, so that the external device can send charging protocol data to the charging module 12 through the data information transmission port to communicate with the charging protocol, and the charging module 12 can learn the charging requirement of the external device, such as the charging protocol, the charging power, the charging mode and the like.
The external device transmits the charging mode switching request information in order to initiate power negotiation. The control module 14 controls the data flow direction switching module 13 to communicate the data information transmission port with the charging module 12, so as to provide a channel for power negotiation between the external device and the charging module 12.
For different charging protocols, the external device may communicate with the charging protocol through different ports. For a part of the charging protocol, communication of the charging protocol, for example, PD (Power Delivery) fast charging protocol, may be performed only through a communication channel between the status information transmission port and the charging module 12. For another part of the charging protocol, the communication of the charging protocol, such as a fast charging protocol of QC (Quick Charge), needs to be performed together through a communication channel between the status information transmission port and the charging module 12 and a communication channel between the data flow direction switching module 13 and the data information transmission port and the charging module 12. Therefore, when the control module 14 receives the charging mode switching request information, the data flow direction switching module 13 needs to be controlled to connect the data information transmission port and the charging module 12 without knowing what charging protocol is used, so as to provide a communication channel between the external device and the charging module 12.
In some possible implementations, the connection interface 11 may acquire charging protocol data from an external device through the data information transmission interface, and send the charging protocol data to the charging module 12 through a communication channel between the data information transmission interface and the charging module 12; the charging protocol data may also be obtained from the external device through the status information transmission port, and the charging protocol data may be sent to the charging module 12 through a communication channel between the status information transmission port and the charging module 12.
The charging module 12 may determine the charging requirement of the external device according to the obtained charging mode switching request information and/or charging protocol data, so as to control the power mode output by the power transmission port, so that the power mode output by the power transmission port meets the charging requirement of the external device.
When the control module 14 does not receive the charging mode switching request information, the data flow direction switching module 13 can be controlled to communicate the data information transmission port with the control module 14, so that when an external device has a print job, the external device can send print data to the control module 14 through the data information transmission port. The control module 14 generates a print instruction from the print data after receiving the print data, and transmits the print instruction to the printing module 15. The printing module 15 executes the printing instruction sent by the control module 14 to complete the print job.
The data flow direction switching module 13 may conduct between the first data port of itself and the second data port of itself according to the control signal of the control module 14, so as to connect the data information transmission port and the control module 14; the third data port of the charging module 14 and the second data port of the charging module 12 can be conducted according to the control signal of the control module, so that the data information transmission port and the charging module 12 are communicated.
It should be noted that, in the embodiment of the present application, the signals sent by the control module 14 to the data flow direction switching module 13 for controlling the data flow direction switching module 13 are collectively referred to as the control signals of the control module 14, and the control signals of the control module 14 are not limited to the signals for controlling the data flow direction switching module 13 in one of the states, but include various signals for controlling the data flow direction switching module 13 in different states.
The printer provided in this embodiment includes a connection interface 11, a charging module 12, a data flow direction switching module 13, a control module 14, and a printing module 15; the connection interface 11 can acquire charging mode switching request information from the external device through the status information transmission port, acquire print data and charging protocol data from the external device through the data information transmission port, and can supply power to the external device through the power supply transmission port; the control module 14 is configured to generate a control signal according to the charging mode switching request information, and generate a print instruction according to the print data; the data flow direction switching module 13 is used for controlling the data information transmission port to be communicated with the charging module 12 or the control module 14 according to the control signal of the control module 14; the charging module 12 is configured to control a power mode output by the power transmission port according to the charging mode switching request information and/or the charging protocol data; the printing module 15 is used for executing the printing instruction sent by the control module 14; through above-mentioned each module, the printer not only can accomplish self print task, can also switch request information according to the charging mode of external equipment, makes power transmission port output corresponding power mode, satisfies external equipment's charge demand, avoids external equipment to appear the condition that the electric quantity is insufficient or the electric quantity is overcharged, can protect external equipment's battery, improves the flexibility and the convenience of printer.
In some possible implementations, referring to fig. 2, the connection interface 11 may include a type-c interface USB1, the power transmission port of the connection interface 11 may include a VBUS pin of the type-c interface USB1, the status information transmission port of the connection interface 11 may include CC1 and CC2 pins of the type-c interface USB1, and the data information transmission port of the connection interface 11 may include DN1, DP1, DN2, and DP2 pins of the type-c interface USB 1. The specific connection relationship of the connection interface 11 may refer to fig. 1 and 2, and will not be described herein.
In some embodiments, the control module 14 generates a control signal according to the charging mode switching request information acquired by the status information transmission port, so that the data flow direction switching module 13 controls the data information transmission port to communicate with the charging module 12; and when the first preset time period passes, the control module 14 generates a control signal again, so that the data flow direction switching module 13 controls the data information transmission port to be communicated with the control module 14.
In this embodiment, the control module 14 generates a control signal to send to the data flow direction switching module 13 when receiving the charging mode switching request information. The data flow direction switching module 13 controls the data information transmission port to communicate with the charging module 12 according to the control signal of the control module 14, so that the external device can communicate with the charging module 12 through the data information transmission port in a protocol manner. Because the time required for protocol communication is short, after the protocol communication is completed, the charging module 12 can determine the charging mode required by the external device, and the data information transmission port is not required to be occupied. Therefore, when the first preset period of time elapses, the control module 14 generates the control signal again, and the control data flow direction switching module 13 communicates the data information transmission port and the control module 14 so that the external device can transmit the print data to the control module 14 through the data information transmission port.
Similarly to inserting a charge mode switching task into a continuous print data transfer task, when the charge mode switching task is detected, the control data flow direction switching module 13 causes the data information transfer port to communicate with the charge module 12, and when the charge mode switching task is completed, the control data flow direction switching module 13 causes the data information transfer port to communicate with the control module 14, and the print data transfer task is continued.
The first preset duration may be set according to a duration required for actual protocol communication, and is generally a shorter duration, for example, may be 2 seconds, 3 seconds, and so on.
In this embodiment, after the protocol communication between the external device and the charging module 12 is completed, the printing state can be switched back in time, and the printing task is continuously completed or is waited for, so that the printing work of the printer is not affected.
In some embodiments, when the control module 14 obtains the charging mode switching request information, if the charging mode switching request information is in a busy state, after receiving the print data of the current page, the control module generates a control signal according to the charging mode switching request information, so that the data flow direction switching module 13 controls the data information transmission port to communicate with the charging module 12.
In this embodiment, when the control module 14 obtains the charging mode switching request information, it determines the self state, if the self is in a busy state, in order to avoid affecting the printing operation of the printer, it needs to firstly receive the printing data of the current page, then pause receiving the printing data, and send a control signal to the data flow direction switching module 13, so that the data flow direction switching module 13 controls the data information transmission port to communicate with the charging module 12, and when a first preset period of time passes, the control module 14 generates a control signal again, so that the data flow direction switching module 13 controls the data information transmission port to communicate with the control module 14, so that the control module 14 can continuously receive the printing data; if the control signal is in an idle state, the control signal may be directly generated and sent to the data flow direction switching module 13, so that the data flow direction switching module 13 controls the data information transmission port to communicate with the charging module 12, and when a first preset period of time passes, the control module 14 generates the control signal again, so that the data flow direction switching module 13 controls the data information transmission port to communicate with the control module 14, and at this time, the control module 14 may be in a waiting printing state, i.e. waiting for a print job of an external device.
Wherein, when the control module 14 is receiving print data or the data information transmission port is acquiring print data sent by the external device, it is determined that the control module 14 is in a busy state; when the control module 14 is not receiving print data and the data information transmission port is not acquiring print data transmitted by the external device, it is determined that the control module 14 is in an idle state.
Even when the device is in a busy state, the device can timely respond to the charging mode switching request information of the external device, so that the problem that the printing task is affected due to insufficient electric quantity of the external device or the service life of the battery is affected due to overcharge of the battery of the external device is avoided.
In some embodiments, referring to fig. 3, the charging module 12 includes a charging communication unit 121 and a charging protocol unit 122;
the charging communication unit 121 is configured to obtain charging mode switching request information through the status information transmission port, and send the charging mode switching request information to the charging protocol unit 122 and the control module 14;
the charging protocol unit 122 is configured to control a power mode output by the power transmission port through the charging communication unit 121 according to the charging protocol data acquired by the charging mode switching request information and/or the data information transmission port.
The first state transmission port of the charging communication unit 121 is used as the first state transmission port of the charging module 12, the second state transmission port of the charging communication unit 121 is connected with the state transmission port of the charging protocol unit 122, and the second state transmission port of the charging communication unit 121 is also used as the second state transmission port of the charging module 12; the power port of the charging protocol unit 122 is used for connecting an external power supply, and the data transmission port of the charging protocol unit 122 is used as the data transmission port of the charging module 12; the power transmission port of the charging protocol unit 122 is connected to the first power transmission port of the charging communication unit 121, and the second power transmission port of the charging communication unit 121 serves as the power transmission port of the charging module 12.
In this embodiment, when receiving the charging mode switching request information sent by the status information transmission port, the charging communication unit 121 may send the received charging mode switching request information to the charging protocol unit 122 and the control module 14. After the protocol communication with the external device is completed, the charging protocol unit 122 may analyze the obtained charging mode switching request information and/or the charging protocol data, determine a charging mode required by the external device, and control, through the charging communication unit 121, the power mode output by the power transmission port to be a power mode corresponding to the charging mode required by the external device. For example, if the external device requires the fast charging mode, the power mode output by the power transmission port can be controlled to be the power mode corresponding to the fast charging mode; if the external device requires the slow charging mode, the power mode output by the power transmission port can be controlled to be the power mode corresponding to the slow charging mode.
In some embodiments, referring to fig. 2, the charging protocol unit 122 includes a charging protocol element U3 and a first switching tube Q3;
the first switching tube Q3 is used for connecting an external power supply;
the charging protocol element U3 is configured to control the state of the first switching tube Q3 according to the charging protocol data acquired by the charging mode switching request information and/or the data information transmission port, so as to control the power mode of the external power supply output through the first switching tube Q3, the charging communication unit 121 and the power transmission port.
The power port of the charging protocol element U3 is used as the power port of the charging protocol unit 122, the state transmission port of the charging protocol element U3 is used as the state transmission port of the charging protocol unit 122, the data transmission port of the charging protocol element U3 is used as the data transmission port of the charging protocol unit 122, the control port of the charging protocol element U3 is connected with the control port of the first switching tube Q3, the first port of the first switching tube Q3 is connected with an external power supply, and the second port of the first switching tube Q3 is used as the power transmission port of the charging protocol unit 122.
Referring to fig. 2, the power port of the charging protocol element U3 includes the vbus_pwr pin of the charging protocol element U3, and the power port of the charging protocol unit 122 is the VADP in fig. 2, and is used for connecting to an external power source. The state transfer port of the charging protocol element U3 includes the CC1 pin of the charging protocol element U3. The data transfer port of the charging protocol element U3 may include DP and DM pins of the charging protocol element U3. The control port of charging protocol element U3 includes the NDRV pin of charging protocol element U3.
The control port of the first switching tube Q3 comprises a G pin of the first switching tube Q3, the first port of the first switching tube Q3 comprises a D pin of the first switching tube Q3, and the second port of the first switching tube Q3 comprises an S pin of the first switching tube Q3. The first switching transistor Q3 may be an NMOS (N-Metal-Oxide-Semiconductor) transistor.
The charging protocol element U3 may determine a charging mode required by the external device according to the received charging mode switching request information and/or charging protocol data, and control the on-off state of the first switching tube Q3 according to the charging mode required by the external device, so as to control, through the charging communication unit 121, the power mode output by the power transmission port to be a power mode corresponding to the charging mode required by the external device.
In practical application, the Power roller and the Data roller are synchronous normally, for example, when the mobile phone is connected with the USB flash disk, the Power roller of the mobile phone is DFP, and the Data roller is also host; when the mobile phone is connected with the notebook, the Power Role of the mobile phone is UFP, and the Data Role is also device. If the mobile phone's Power row is to be UFP and Data row is to be host, the associated charging protocol element U3 needs to be used for switching.
In some embodiments, referring to fig. 2, the charging communication unit 121 includes a charging communication element U2, a second switching tube Q2, a third switching tube Q1, a fourth switching tube Q4, and a fifth switching tube Q5;
the charging communication element U2 is configured to obtain charging mode switching request information through the status information transmission port, send the charging mode switching request information to the charging protocol unit 122 and the control module 14, and control the states of the second switching tube Q2 and the third switching tube Q1 by controlling the states of the fourth switching tube Q4 and the fifth switching tube Q5, so that the charging protocol unit 122 controls the power mode output by the power transmission port through the second switching tube Q2 and the third switching tube Q1.
In this embodiment, the charging communication element U2 may directly send a signal to control the switching states of the fourth switching tube Q4 and the fifth switching tube Q5, and the switching states of the second switching tube Q2 and the third switching tube Q1 are affected by the switching states of the fourth switching tube Q4 and the fifth switching tube Q5, so that the charging protocol unit 122 may control the power mode output by the power transmission port through the second switching tube Q2 and the third switching tube Q1.
The first state transmission port of the charging communication element U2 is used as the first state transmission port of the charging communication unit 121, the second state transmission port of the charging communication element U2 is used as the second state transmission port of the charging communication unit 121, the first control port of the charging communication element U2 is connected with the control port of the fourth switching tube Q4, and the second control port of the charging communication element U2 is connected with the control port of the fifth switching tube Q5;
The first port of the second switching tube Q2 is used as a first power transmission port of the charging communication unit 121, the second port of the second switching tube Q2 is connected with the second port of the third switching tube Q1, and the control port of the second switching tube Q2 is connected with the first port of the fifth switching tube Q5; the control port of the third switching tube Q1 is connected with the first port of the fourth switching tube Q4, and the first port of the third switching tube Q1 is used as the second power transmission port of the charging communication unit 121;
the second port of the fourth switching tube Q4 and the second port of the fifth switching tube Q5 are both grounded.
In some possible implementations, the charging communication unit 121 may further include a first capacitor C4, a first resistor R2, and a second resistor R4;
the detection port of the charging communication element U2 is respectively connected with the first port of the first resistor R2 and the second port of the second resistor R4, and the first port of the second resistor R4 is respectively connected with the first port of the first capacitor C4 and the first port of the second switching tube Q2;
the second port of the first resistor R2 and the second port of the first capacitor C4 are both grounded.
The charging communication element U2 can control the switch states of the fourth switch tube Q4 and the fifth switch tube Q5 according to the detection result of the detection port, and then can control the switch states of the second switch tube Q2 and the third switch tube Q1, so that the charging protocol unit 122 controls the power supply mode output by the power supply transmission port through the second switch tube Q2 and the third switch tube Q1 to meet the charging mode required by the external device.
In the charging module 12, the charging protocol element U3 and the charging communication element U2 can control the power supply mode output by the power supply transmission port through controlling the first switching tube Q3, the second switching tube Q2, the third switching tube Q1, the fourth switching tube Q4 and the fifth switching tube Q5, so as to meet the charging mode switching request of the external device.
Referring to fig. 2, the first state transmission port of the charging communication element U2 includes C0CC1 and C0CC2 pins of the charging communication element U2. The second state transmission port of the charging communication element U2 includes the C1CC2 pin of the charging communication element U2. The detection port of the charging communication element U2 includes the C1DT pin of the charging communication element U2. The first control port of the charging communication element U2 includes the VBEN pin of the charging communication element U2. The second control port of the charging communication element U2 includes the VadpEN pin of the charging communication element U2.
The first port of the second switching tube Q2 comprises a D pin of the second switching tube Q2, the second port of the second switching tube Q2 comprises an S pin of the second switching tube Q2, and the control port of the second switching tube Q2 comprises a G pin of the second switching tube Q2.
The control port of the third switching tube Q1 comprises a G pin of the third switching tube Q1, the first port of the third switching tube Q1 comprises a D pin of the third switching tube Q1, and the second port of the third switching tube Q1 comprises an S pin of the third switching tube Q1.
The control port of the fourth switching tube Q4 comprises a G pin of the fourth switching tube Q4, the first port of the fourth switching tube Q4 comprises a D pin of the fourth switching tube Q4, and the second port of the fourth switching tube Q4 comprises an S pin of the fourth switching tube Q4.
The control port of the fifth switching tube Q5 comprises a G pin of the fifth switching tube Q5, the first port of the fifth switching tube Q5 comprises a G pin of the fifth switching tube Q5, and the second port of the fifth switching tube Q5 comprises an S pin of the fifth switching tube Q5.
The second and third switching transistors Q2 and Q1 may be PMOS (positive channel Metal Oxide Semiconductor ) transistors, and the fourth and fifth switching transistors Q4 and Q5 may be NMOS transistors.
In some embodiments, the control module 14 has a print driver module 16 integrated therein;
the data flow direction switching module 13 is specifically configured to control the data information transmission port to communicate with the charging module 12 or the print driving module 16 according to the control signal of the control module 14;
the print driving module 16 is used for generating a print instruction according to the print data acquired by the data information transmission port;
the printing module 15 is specifically configured to execute a printing instruction sent by the printing driving module 16.
The first data port of the data flow direction switching module 13 is connected to the first data transmission port of the print driving module 16, and the second data transmission port of the print driving module 16 is connected to the print module 1515.
In this embodiment, the data flow direction switching module 13 controls the data information transmission port connection control module 14, and it is essential that the data flow direction switching module 13 controls the data information transmission port connection print driving module 16.
When the data information transmission port is connected to the print driving module 16, the print driving module 16 may obtain, through the data flow direction switching module 13, print data obtained from the external device by the data information transmission port, parse the received print data into a print instruction executable by the print module 15, and send the print instruction to the print module 15. The print module 15 executes the received print instruction, thereby completing a print job transmitted from the external device to the printer.
In some embodiments, the print driving module 16 is further configured to drive the print module 15 to perform an opening operation before generating a print instruction from the print data acquired by the data information transmission port.
At present, when external equipment is connected to a printer, a printer driver of the external equipment can sense that the printer is on line, when an equipment interface (USB interface) of the external equipment is switched to be charged, the external equipment can sense that the printer is off line, and when the USB interface is switched back to be printed, the external equipment can sense that the printer is on line. At this time, the printing app for the external device needs to re-open the USB device to perform printing next time. This has an impact on the client's app. Therefore, before the print module 15 is driven to print, the print module 15 is driven to perform an opening operation, similar to a start-up operation or controlling the print module 15 to be in a standby state, so that the external device is insensitive to the switching between charging and printing, and the client does not need to perform any processing for this situation.
In some embodiments, referring to fig. 2, the data flow direction switching module 13 includes a switching element U1;
the switching element U1 is configured to control its communication channel according to a control signal of the control module 14, so that the data information transmission port communicates with the charging module 12 or the control module 14.
The control port of the data flow direction switching module 13 comprises the S pin of the switching element U1, the second data port of the data flow direction switching module 13 comprises the d+ and D-pins of the switching element U1, the first data port of the data flow direction switching module 13 comprises the hsd1+ and hsd1-pins of the switching element U1, and the third data port of the data flow direction switching module 13 comprises the hsd2+ and hsd2-pins of the switching element U1.
Referring to fig. 2, the charging module 12, the data flow direction switching module 13 and the connection interface 11 may further include some resistors and/or capacitors, and the connection relationship is referred to in fig. 2; the connection relationship between the charging module 12, the data flow direction switching module 13 and other pins in the connection interface 11 can refer to fig. 2, and will not be described again.
Corresponding to the printer, the embodiment of the application also provides a printer control method, wherein the printer comprises a connection interface, a charging module, a data flow switching module, a control module and a printing driving module; the printer control method includes:
When the state information transmission port of the connection interface acquires charging mode switching request information from the external equipment, the control module generates a control signal according to the charging mode switching request information so that the data flow direction switching module controls the data information transmission port of the connection interface to be communicated with the charging module; and when the first preset time length passes, the control module generates a control signal again so that the data flow direction switching module controls the data information transmission port of the connection interface to be communicated with the printing driving module.
The printer control method may refer to the related description of the foregoing printer, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided herein, it should be understood that the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. The printer is characterized by comprising a connection interface, a charging module, a data flow switching module, a control module and a printing module;
the connection interface at least comprises a power supply transmission port, a data information transmission port and a state information transmission port; the connection interface is used for connecting an external device, can acquire charging mode switching request information from the external device through a state information transmission port, acquire print data and charging protocol data from the external device through the data information transmission port, and can supply power to the external device through the power transmission port;
The control module is used for generating a control signal according to the charging mode switching request information acquired by the state information transmission port and generating a printing instruction according to the printing data acquired by the data information transmission port;
the data flow direction switching module is used for controlling the data information transmission port to be communicated with the charging module or the control module according to the control signal of the control module;
the charging module is used for controlling a power supply mode output by the power supply transmission port according to the charging mode switching request information acquired by the state information transmission port and/or the charging protocol data acquired by the data information transmission port;
the printing module is used for executing the printing instruction sent by the control module.
2. The printer according to claim 1, wherein the control module generates a control signal according to the charging mode switching request information acquired by the status information transmission port, so that the data flow direction switching module controls the data information transmission port to communicate with the charging module; and when the first preset time length passes, the control module generates a control signal again so that the data flow direction switching module controls the data information transmission port to be communicated with the control module.
3. The printer according to claim 2, wherein the control module generates a control signal according to the charging mode switching request information after receiving the print data of the current page if the control module is in a busy state when the charging mode switching request information is acquired, so that the data flow direction switching module controls the data information transmission port to communicate with the charging module.
4. The printer of claim 1, wherein the charging module comprises a charging communication unit and a charging protocol unit;
the charging communication unit is used for acquiring the charging mode switching request information through the state information transmission port and sending the charging mode switching request information to the charging protocol unit and the control module;
the charging protocol unit is used for controlling a power supply mode output by the power supply transmission port through the charging communication unit according to the charging mode switching request information and/or the charging protocol data acquired by the data information transmission port.
5. The printer of claim 4, wherein the charging protocol unit comprises a charging protocol element and a first switching tube;
The first switch tube is used for being connected with an external power supply;
the charging protocol element is used for controlling the state of the first switch tube according to the charging mode switching request information and/or the charging protocol data acquired by the data information transmission port so as to control the power mode of the external power supply output through the first switch tube, the charging communication unit and the power transmission port.
6. The printer of claim 4, wherein the charging communication unit comprises a charging communication element, a second switching tube, a third switching tube, a fourth switching tube, and a fifth switching tube;
the charging communication element is configured to obtain the charging mode switching request information through the state information transmission port, send the charging mode switching request information to the charging protocol unit and the control module, and control states of the second switching tube and the third switching tube by controlling states of the fourth switching tube and the fifth switching tube, so that the charging protocol unit controls a power supply mode output by the power supply transmission port through the second switching tube and the third switching tube.
7. The printer of claim 1, wherein the control module has a print driver module integrated therein;
the data flow direction switching module is specifically configured to control the data information transmission port to communicate with the charging module or the print driving module according to a control signal of the control module;
the printing driving module is used for generating a printing instruction according to the printing data acquired by the data information transmission port;
the printing module is specifically used for executing the printing instruction sent by the printing driving module.
8. The printer of claim 7, wherein the print driver module is further configured to drive the print module to perform an open operation before generating a print instruction from the print data acquired by the data information transmission port.
9. The printer of any one of claims 1 to 8, wherein the data flow direction switching module includes a switching element;
the switch element is used for controlling the communication channel of the switch element according to the control signal of the control module so that the data information transmission port is communicated with the charging module or the control module.
10. The printer comprises a connection interface, a charging module, a data flow switching module, a control module and a printing driving module; the printer control method is characterized by comprising the following steps:
When the state information transmission port of the connection interface acquires charging mode switching request information from external equipment, the control module generates a control signal according to the charging mode switching request information so that the data flow direction switching module controls the data information transmission port of the connection interface to be communicated with the charging module; and when the first preset time length passes, the control module generates a control signal again so that the data flow direction switching module controls the data information transmission port of the connection interface to be communicated with the printing driving module.
CN202311006726.1A 2023-08-10 2023-08-10 Printer and control method thereof Pending CN116945782A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311006726.1A CN116945782A (en) 2023-08-10 2023-08-10 Printer and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311006726.1A CN116945782A (en) 2023-08-10 2023-08-10 Printer and control method thereof

Publications (1)

Publication Number Publication Date
CN116945782A true CN116945782A (en) 2023-10-27

Family

ID=88449205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311006726.1A Pending CN116945782A (en) 2023-08-10 2023-08-10 Printer and control method thereof

Country Status (1)

Country Link
CN (1) CN116945782A (en)

Similar Documents

Publication Publication Date Title
US7984318B2 (en) Apparatus and method to support USB enumeration of a bus powered handheld device
US20190050037A1 (en) Intelligent mobile power supply and method for usb data communication therewith
US7085876B2 (en) USB controlling apparatus for data transfer between computers and method for the same
JP5055489B2 (en) Bidirectional single-wire interrupt line for communication bus
CN101208680B (en) Electronic data communication method, device and system
US9665150B2 (en) Electronic device with a control circuit to detect and establish a connection to host device
JP6936543B2 (en) USB interface circuits and methods for low power operation
US20110016334A1 (en) Auto-Detect Polling for Correct Handshake to USB Client
US20040063464A1 (en) High-speed data and power source interface cable for mobile devices
EP1775652B1 (en) Apparatus and method to support USB enumeration of a BUS powered handheld device
US8479043B2 (en) Power over ethernet powered device with power fallback states
US11048315B2 (en) Remote wake-up of mobile devices
US20150253842A1 (en) Semiconductor device, and power control method for usbotg
CN105932733A (en) OTG power supply, power supply method thereof, OTG equipment, and mobile communication equipment
KR20060090283A (en) An interface for serial data communication
CN101369948B (en) Communication system implementing low-power consumption
CN112838635A (en) Interface circuit and intelligent device
US8275919B2 (en) Device for tapping USB power
CN102609339A (en) Embedded main board testing device
CN104169896B (en) The power management of FPDP
US6351820B1 (en) PC card with automated drag and sleep function
CN205193960U (en) POS machine base of adaptation OTG mobile device
CN116945782A (en) Printer and control method thereof
JP4954023B2 (en) Image forming apparatus and connection notification method
CN105446912A (en) Method and device of CPU (Central Processing Unit) for connecting WIFI module through HSIC (High Speed Inter-chip) bus interface

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