CN218848742U - I2C control circuit for fast writing chip parameters - Google Patents

I2C control circuit for fast writing chip parameters Download PDF

Info

Publication number
CN218848742U
CN218848742U CN202222644831.5U CN202222644831U CN218848742U CN 218848742 U CN218848742 U CN 218848742U CN 202222644831 U CN202222644831 U CN 202222644831U CN 218848742 U CN218848742 U CN 218848742U
Authority
CN
China
Prior art keywords
resistor
control circuit
target device
interface
mcu
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
CN202222644831.5U
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.)
Suzhou Ogawa New Energy Co ltd
Original Assignee
Suzhou Ogawa New Energy 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 Suzhou Ogawa New Energy Co ltd filed Critical Suzhou Ogawa New Energy Co ltd
Priority to CN202222644831.5U priority Critical patent/CN218848742U/en
Application granted granted Critical
Publication of CN218848742U publication Critical patent/CN218848742U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Power Sources (AREA)

Abstract

The utility model discloses an I2C control circuit for fast writing chip parameters, which is used for connecting USB equipment, a target device and an MCU unit and is characterized by comprising a first control circuit and a second control circuit; the first control circuit and the second control circuit are respectively connected with the USB equipment, the target device and the MCU, when the USB equipment is accessed to a computer, the first control circuit and the second control circuit are conducted and control the MCU and the target device to become slave equipment of I2C; when the USB equipment is vacant, the first control circuit and the second control circuit are disconnected, and the MCU unit controls the target device through I2C. The utility model discloses can I2C bus principal and subordinate mode automatic switch-over and can protect each components and parts, can improve production efficiency greatly.

Description

I2C control circuit for fast writing chip parameters
Technical Field
The utility model relates to a I2C control circuit that is used for chip parameter to write in into fast.
Background
At present, when an AMT49406 motor control chip is used, preset motor parameters and a motor control mode are generally required to be written into an EEPROM of the chip through an I2C bus, in the method, host computer software is used to connect a target chip through a USB-to-I2C device, after hardware connection is completed, the host computer software firstly communicates with the control chip to ensure that the I2C bus has no fault, and then the motor parameters and the control mode are written into the EEPROM of the control chip.
Disclosure of Invention
The utility model discloses the purpose is: the I2C control circuit for quickly writing the chip parameters is simple in structure and convenient to use, can realize an off-line burning function and can play a role in protecting a power supply of a target device.
The technical scheme of the utility model is that: an I2C control circuit for fast writing chip parameters is used for connecting a USB device, a target device and an MCU unit and is characterized by comprising a first control circuit and a second control circuit; the first control circuit and the second control circuit are respectively connected with the USB equipment, the target device and the MCU, when the USB equipment is accessed to a computer, the first control circuit and the second control circuit are conducted and control the MCU and the target device to become slave equipment of I2C; when the USB equipment is vacant, the first control circuit and the second control circuit are disconnected, and the MCU unit controls the target device through I2C.
Preferably, the first control circuit includes a first MOS transistor Q1A, a first resistor R1, a second resistor R2, a third resistor R3, and a fourth resistor R4, the gate of the first MOS transistor Q1A is connected to the SCL interface of the USB device through the third resistor R3, the source of the first MOS transistor Q1A is grounded and the fourth resistor R4 is connected in series between the source and the gate, the drain of the first MOS transistor Q1A is connected to the power supply interface of the USB device and the SCL interface of the MCU unit through the first resistor R1 and the second resistor R2, respectively, and the SCL interface of the target device is connected to the SCL interface of the MCU unit; the second control circuit comprises a second MOS tube Q1B, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7 and an eighth resistor R8, the grid of the second MOS tube Q1B is connected with the SDA interface of the USB device through the fifth resistor R5, the source of the second MOS tube Q1B is grounded and a ninth resistor R9 is connected between the source and the grid in series, the drain of the second MOS tube Q1B is connected with the power supply interface of the USB device and the SDA interface of the MCU unit through the seventh resistor R7 and the eighth resistor R8 respectively, the CHECK interface of the MCU unit is connected with the SDA interface of the MCU unit through the sixth resistor R6, and the SDA interface of the target device is connected with the SDA interface of the MCU unit.
Preferably, the first resistor R1, the second resistor R2, the third resistor R3, the fourth resistor R4, the fifth resistor R5, the sixth resistor R6, the seventh resistor R7, and the eighth resistor R8 are all chip resistors.
Preferably, the first MOS transistor Q1A and the second MOS transistor Q1B are both NMOS transistors.
The utility model has the advantages that:
1. the production efficiency can be greatly improved. The master-slave mode of the I2C bus is automatically switched, in the initial state of the equipment, if the USB is accessed into a computer, the TP2 point pulls up the level, at the moment, Q1A and Q1B are conducted, the TP1 level is short-circuited to the ground, the MCU loses the bus control right to the I2C at the moment, the MCU and the target device are both I2C slave equipment, the MCU receives I2C bus data and stores the data into FLASH, but does not respond to bus communication, the target device can respond according to the data content after receiving the bus data, and the state can be used as a PC upper computer to program or debug the target device. The function of realizing online programming is realized, if the USB does not have access to a PC under the initial state of the equipment, Q1A and Q1B are disconnected, the whole I2C bus only has two devices of an MCU and a target device, the MCU is automatically switched into an I2C master control device at the moment, after the communication between the MCU and the I2C bus and the target device is detected to be normal, the off-line programming state is entered, the MCU reads the data recorded during the last online programming of FLASH and sends the data to the target device through the I2C bus, the off-line programming function is realized, the off-line programming function can be simply realized, as long as the off-line programming function is connected with the target device, the programming function can be automatically completed, the production efficiency of mass products is greatly improved
2. The components and parts can be protected. Two MOS tubes are used as a circuit switch, when the voltage of the USB terminal is overhigh, G poles of Q1A and Q1B are broken down, and Q1A and Q1B are damaged and cut off, so that the connection between the MCU and a target device is broken, the introduction of the overhigh voltage on the bus into the target device and the MCU is prevented, an automatic protection function is realized, when the USB bus terminal is short-circuited, the G poles of Q1A and Q1B are pulled down, Q1A and Q1B are cut off, the connection between the MCU and the target device is also broken, the I2C bus on the other side is prevented from being short-circuited, and the function of protecting the power supply of the target device is realized.
Drawings
The invention will be further described with reference to the following drawings and examples:
fig. 1 is a block diagram of an I2C control circuit for fast writing of chip parameters according to the present invention;
FIG. 2 is a circuit diagram of an I2C control circuit for fast write of chip parameters.
Detailed Description
Example (b): as shown in fig. 1 and fig. 2, an I2C control circuit for fast writing of chip parameters is used for connecting a USB device, a target device, and an MCU unit, and the control circuit includes a first control circuit and a second control circuit; the first control circuit comprises a third MOS tube Q1A, a resistor R1, a resistor R2, a resistor R3 and a resistor R4, wherein the grid electrode of the MOS tube Q1A is connected with an SCL interface of the USB device through the resistor R3, the source electrode of the MOS tube Q1A is grounded and the resistor R4 is connected between the source electrode and the grid electrode in series, the drain electrode of the MOS tube Q1A is respectively connected with a power supply interface of the USB device and the SCL interface of the MCU unit through the resistor R1 and the resistor R2, and the SCL interface of the target device is connected with the SCL interface of the MCU unit; the second control circuit comprises a MOS tube Q1B, a resistor R5, a resistor R6, a resistor R7 and a resistor R8, the grid of the MOS tube Q1B is connected with the SDA interface of the USB device through the resistor R5, the source electrode of the MOS tube Q1B is grounded and a resistor R9 is connected between the source electrode and the grid in series, the drain electrode of the MOS tube Q1B is respectively connected with the power supply interface of the USB device and the SDA interface of the MCU unit through the resistor R7 and the resistor R8, the CHECK interface of the MCU unit is connected with the SDA interface of the MCU unit through the resistor R6, and the SDA interface of the target device is connected with the SDA interface of the MCU unit. The MOS transistors Q1A and Q1B in this embodiment are both UM6K31NTN type MOS transistors, and the resistors in this embodiment are both chip resistors. The embodiment can realize two functions, namely automatic switching of the master-slave mode of the I2C bus and automatic disconnection of circuit connection when the bus fails, so that 3-end equipment is protected from being damaged. Under the initial state of the equipment, if the USB is accessed into a computer, the TP2 point pulls up the electrical level, at the moment, Q1A and Q1B are conducted, the TP1 level is short-circuited to the ground, the MCU loses the bus control right to I2C at the moment, the MCU and the target device become I2C slave equipment, the MCU receives I2C bus data and stores the data into FLASH, but does not respond to bus communication, and the target device can respond according to the data content after receiving the bus data, and the state can be used as a PC upper computer to program or debug the target device. The method has the advantages that the online programming function is realized, if the USB is not connected with the PC in the initial state of the equipment, the Q1A and the Q1B are disconnected, the whole I2C bus only comprises the MCU and the target device, the MCU is automatically switched into the I2C master control equipment at the moment, the offline programming state is entered after the communication with the I2C bus and the target device is detected to be normal, the MCU reads data recorded during the last online programming of the FLASH and sends the data to the target device through the I2C bus, the offline programming function is realized, the offline programming function can be automatically completed simply by connecting with the target device, and the production efficiency of mass products is greatly improved. Two MOS tubes are used as a circuit switch, when the voltage of the USB terminal is overhigh, the Q1A pole and the Q1B pole are broken down, the Q1A pole and the Q1B pole are damaged and cut off, so that the connection between the MCU and a target device is broken, the overhigh voltage on the bus is prevented from being introduced into the target device and the MCU, the automatic protection function is realized, when the USB bus end is short-circuited, the level of the Q1A pole and the Q1B pole is pulled down, the Q1A pole and the Q1B pole are cut off, the connection between the MCU and the target device is also broken, the I2C bus on the other side is prevented from being short-circuited, and the function of protecting the power supply of the target device is achieved.
It should be understood that the above-mentioned embodiments are only for illustrating the technical concept and features of the present invention, and the purpose of the present invention is to enable those skilled in the art to understand the content of the present invention and implement the present invention, and the protection scope of the present invention cannot be limited thereby. All modifications made according to the spirit of the main technical scheme of the present invention shall be covered within the protection scope of the present invention.

Claims (4)

1. An I2C control circuit for fast writing chip parameters is used for connecting a USB device, a target device and an MCU unit and is characterized by comprising a first control circuit and a second control circuit; the first control circuit and the second control circuit are respectively connected with the USB equipment, the target device and the MCU, when the USB equipment is accessed to a computer, the first control circuit and the second control circuit are conducted and control the MCU and the target device to become slave equipment of I2C; when the USB equipment is vacant, the first control circuit and the second control circuit are disconnected, and the MCU unit controls the target device through I2C.
2. The I2C control circuit for fast writing chip parameters according to claim 1, wherein the first control circuit includes a first MOS transistor (Q1A), a first resistor (R1), a second resistor (R2), a third resistor (R3) and a fourth resistor (R4), a gate of the first MOS transistor (Q1A) is connected to an SCL interface of the USB device through the third resistor (R3), a source of the first MOS transistor (Q1A) is grounded and the fourth resistor (R4) is connected in series between the source and the gate, a drain of the first MOS transistor (Q1A) is connected to a power supply interface of the USB device and the SCL interface of the MCU unit through the first resistor (R1) and the second resistor (R2), respectively, and the SCL interface of the target device is connected to the SCL interface of the MCU unit; the second control circuit comprises a second MOS tube (Q1B), a fifth resistor (R5), a sixth resistor (R6), a seventh resistor (R7) and an eighth resistor (R8), the grid of the second MOS tube (Q1B) is connected with the SDA interface of the USB device through the fifth resistor (R5), the source of the second MOS tube (Q1B) is grounded, and a ninth resistor (R9) is connected between the source and the grid in series, the drain of the second MOS tube (Q1B) is connected with the power supply interface of the USB device and the SDA interface of the MCU unit through the seventh resistor (R7) and the eighth resistor (R8) respectively, the CHECK interface of the MCU unit is connected with the SDA interface of the MCU unit through the sixth resistor (R6), and the SDA interface of the target device is connected with the SDA interface of the MCU unit.
3. The I2C control circuit for chip parameter fast writing according to claim 2, wherein the first resistor (R1), the second resistor (R2), the third resistor (R3) and the fourth resistor (R4), the fifth resistor (R5), the sixth resistor (R6), the seventh resistor (R7) and the eighth resistor (R8) are all chip resistors.
4. The I2C control circuit for chip parameter fast writing according to claim 2, wherein the first MOS transistor (Q1A) and the second MOS transistor (Q1B) are both NMOS transistors.
CN202222644831.5U 2022-10-09 2022-10-09 I2C control circuit for fast writing chip parameters Active CN218848742U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202222644831.5U CN218848742U (en) 2022-10-09 2022-10-09 I2C control circuit for fast writing chip parameters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202222644831.5U CN218848742U (en) 2022-10-09 2022-10-09 I2C control circuit for fast writing chip parameters

Publications (1)

Publication Number Publication Date
CN218848742U true CN218848742U (en) 2023-04-11

Family

ID=87300744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202222644831.5U Active CN218848742U (en) 2022-10-09 2022-10-09 I2C control circuit for fast writing chip parameters

Country Status (1)

Country Link
CN (1) CN218848742U (en)

Similar Documents

Publication Publication Date Title
EP2698969B1 (en) Electronic device having usb interface and usb communication start method thereof
CN107645310B (en) The data transmission device and data transmission method of breaker controller
CN201629569U (en) Over-voltage protection circuit of USB interface
CN201117293Y (en) Memory writing protection circuit and television with the same
CN218848742U (en) I2C control circuit for fast writing chip parameters
CN104467167B (en) A kind of power path management circuit
CN207339255U (en) A kind of USB port protects circuit
CN113741257A (en) Current loop communication circuit and air conditioning unit
US9529756B2 (en) Method and terminal for starting universal serial USB state machine
CN203825423U (en) Box type device
CN202678968U (en) Communication protecting circuit and air conditioner adopting the communication protecting circuit
CN102375516A (en) Reset circuit and electronic device
CN109739801B (en) Serial port level conversion circuit between MCU chip and SOC chip
CN100547873C (en) A kind of protection circuit for interface signal hot-plug
CN214492776U (en) USB slave controller power-on control circuit and vehicle
CN203520299U (en) Timer-power-on control circuit
CN201562230U (en) Electronic system and resetting device thereof
CN211554886U (en) Singlechip circuit convenient to disconnect and reset
CN201181471Y (en) Apparatus for implementing server fan hot-plug
CN100539366C (en) A kind of universal serial bus device method of supplying power to and system
CN210864616U (en) Power supply control circuit for OPS microcomputer
CN218603468U (en) Burning isolation circuit and debugging system
CN219627364U (en) Hot plug protection circuit and meter applying same
CN215954102U (en) Current loop communication circuit and air conditioning unit
CN214670183U (en) Zero-live wire communication device and electrical equipment

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant