Impedance Adaptive Method, Device, and Computer-Readable Storage Medium

By installing an impedance setting module between the pins of the vehicle or vehicle diagnostic instrument, and using the processor to parse the CAN protocol, switching the impedance to adapt to multiple CAN buses, the problem of traditional technology being able to adapt to only one CAN bus is solved, and a high-accuracy multiple CAN bus impedance adaptation is achieved.

CN114039591BActive Publication Date: 2025-06-17SHENZHEN SHUMA ELECTRONICS TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111227772.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-06-17
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

The traditional impedance adaptation method only applies to one CAN bus, and cannot be adapted to multiple CAN buses at the same time.

Method used

By installing an impedance setting module between the pins of the vehicle or vehicle diagnostic instrument, the processor analyzes the digital signal according to the CAN protocol, and sends a control signal to control the impedance setting module to switch the impedance until the analysis result complies with the CAN protocol, it realizes impedance adaptation to multiple CAN buses.

Benefits of technology

It realizes impedance adaptation to multiple CAN buses in vehicle scenarios, and the target impedance is obtained through actual verification and has high accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114039591B_ABST
    Figure CN114039591B_ABST
Patent Text Reader

Abstract

The present invention provides an impedance adaptation method, apparatus and computer-readable storage medium. The method includes: parsing a digital signal according to the CAN protocol to obtain a parsing result; the digital signal is an output signal collected by a signal collection module and converted therefrom; the output signal is sent by a vehicle or a vehicle diagnostic instrument and obtained through an impedance setting module; the impedance setting module is connected between the pins of the vehicle or the vehicle diagnostic instrument; when the parsing result does not conform to the CAN protocol, a control signal is sent to control the impedance setting module to switch the impedance until the parsing result conforms to the CAN protocol, and a target impedance adapted to the pins is obtained. The method of the present application can be adapted to various CAN buses related to vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of signal processing, and particularly to an impedance adaptive method, device and computer-readable storage medium. Background Art

[0002] In many scenarios, the CAN (Controller Area Network) bus is used as a communication method. The specific application scenarios of the CAN bus are divided into three types: single-wire CAN, low-speed CAN, and high-speed CAN. Different types of CAN use different impedance methods. According to the CAN bus protocol, appropriate matching resistors must be installed at both ends of the CAN bus for normal communication. In the traditional method, when the high-speed CAN is known, the voltage values of CANH and CANL in the CAN bus network are respectively collected by voltage acquisition, and the potentiometers are respectively adjusted to achieve impedance matching. However, the traditional impedance adaptive method only adapts to one type of CAN bus and cannot adapt to multiple types of CAN buses simultaneously. Summary of the Invention

[0003] Based on this, in view of the above technical problems, it is necessary to propose an impedance adaptive method that can adapt to multiple types of CAN buses.

[0004] An impedance adaptive method, the method comprising:

[0005] Parsing a digital signal according to the CAN protocol to obtain a parsing result; the digital signal is an output signal collected by a signal acquisition module and converted therefrom; the output signal is emitted by a vehicle or a vehicle diagnostic instrument and obtained through an impedance setting module;

[0006] When the parsing result does not conform to the CAN protocol, sending a control signal to control the impedance setting module to switch the impedance until the parsing result conforms to the CAN protocol, and obtaining a target impedance adapted to the vehicle or the vehicle diagnostic instrument.

[0007] An impedance adaptive device, comprising an impedance setting module, a signal acquisition module and a processor connected in sequence; the impedance setting module is connected between the pins of a vehicle or a vehicle diagnostic instrument;

[0008] The vehicle or the vehicle diagnostic instrument is configured to send an output signal passing through the impedance setting module to the signal acquisition module;

[0009] The signal acquisition module is configured to convert the output signal into a digital signal;

[0010] The processor is configured to parse the digital signal according to the CAN protocol to obtain a parsing result;

[0011] The processor is configured to, when the parsing result does not conform to the CAN protocol, issue a control signal to control the impedance setting module to switch the impedance until the parsing result conforms to the CAN protocol, and obtain a target impedance adapted to the vehicle or the vehicle diagnostic instrument.

[0012] A computer-readable storage medium stores a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the methods in the embodiments of the present application.

[0013] The above impedance adaptation method, device and computer-readable storage medium parse a digital signal according to the CAN protocol to obtain a parsing result. When the parsing result does not conform to the CAN protocol, a control signal is issued to control the impedance setting module to switch the impedance, and it is verified whether the impedance is adapted to the pins of the vehicle or the vehicle diagnostic instrument by switching the impedance, so as to achieve impedance adaptation for multiple CAN buses in a vehicle scenario. And since the target impedance is not only determined by the voltage value, but is obtained through actual verification, the accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is an application environment diagram of the impedance adaptation method in an embodiment;

[0015] Figure 2 It is a schematic flowchart of the impedance adaptation method in an embodiment;

[0016] Figure 3 It is an application environment diagram of the impedance adaptation method in another embodiment;

[0017] Figure 4 It is a schematic flowchart of the impedance adaptation method in another embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0019] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than 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.

[0020] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the attached drawings). If the specific posture changes, the directional indications will also change accordingly. The connection described herein can be a direct connection or an indirect connection.

[0021] In addition, in the present invention, descriptions such as "first" and "second" are only for descriptive purposes and should not be construed as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those skilled in the art can implement them. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.

[0022] In one embodiment, as Figure 1 shown, it is an application environment diagram of an impedance adaptive method in one embodiment. Among them, an impedance setting module 120, a signal acquisition module 130, and a processor 140 are connected in sequence; the impedance setting module 120 is connected between the pins of the vehicle 110 or the vehicle diagnostic instrument 110.

[0023] The vehicle can be any vehicle. Specifically, the signal acquisition module 130 can be connected between the pins of the vehicle's instrument panel. Or the signal acquisition module 130 is connected to the pins of the OBD (On Board Diagnostics). Specifically, the signal acquisition module 130 can be an ADC (Analog to Digital Converter), etc.

[0024] The processor 140 may include a CAN controller and a microcontroller unit (MCU). The CAN controller is used to parse digital signals according to the CAN protocol to obtain the parsing result. Specifically, the processor 140 can be a microcontroller unit (MCU), etc.

[0025] Both ends of the impedance setting module 120 are respectively connected between two pins of the vehicle or between two pins of the vehicle diagnostic instrument. Different impedances may be included in the impedance setting module 120. For example, the impedance setting module 120 includes an impedance adapted to the low-speed CAN bus, an impedance adapted to the high-speed CAN bus, and an impedance adapted to the single-wire CAN bus. Since different impedances adapted to the vehicle CAN bus are included in the impedance setting module, the impedance adapted to the vehicle or the vehicle diagnostic instrument can be quickly obtained by switching, improving the impedance adaptation efficiency.

[0026] It can be understood that the impedance adapted to the low-speed CAN bus, the impedance adapted to the high-speed CAN bus, and the impedance adapted to the single-wire CAN bus may all include impedances within a certain range. For example, the impedance adapted to the high-speed CAN bus may include resistors of 100 ohms, 110 ohms, 120 ohms, 130 ohms, 140 ohms, and 150 ohms. The impedance adapted to the low-speed CAN bus may include pull-up resistors such as 450 ohms, 460 ohms, 500 ohms, 510 ohms, etc. The impedance adapted to the single-wire CAN bus may be a resistor of 50 ohms, 100 ohms connected, or 150 ohms grounded, etc. The switching of each impedance in the impedance setting module 120 can be achieved through a switch or a MOS (Metal Oxide Semiconductor Field Effect Transistor) tube, etc. In vehicle diagnosis, usually a 120-ohm resistor needs to be added to the CANH and CANL buses of the high-speed CAN bus communication. For the low-speed CAN, 510 ohms resistor needs to be connected to CANH and pulled up to 5V, and 510 ohms resistor needs to be connected to CANL and grounded; for the single-wire CAN bus, a 100-ohm resistor needs to be connected to the ground. Figure 1 The architecture in it is applicable to various vehicles and vehicle diagnostic instruments, with strong versatility.

[0027] In one embodiment, as Figure 2 shown, it is a schematic flow diagram of an impedance adaptation method in one embodiment, including:

[0028] Step 202, parse the digital signal according to the CAN protocol to obtain the parsing result; the digital signal is the output signal collected by the signal acquisition module and converted. The output signal is emitted by the vehicle or the vehicle diagnostic instrument and obtained after passing through the impedance setting module. The impedance setting module is connected between the pins of the vehicle or the vehicle diagnostic instrument.

[0029] Among them, the parsing result includes an arbitration segment, a control segment, a data segment, and a CRC (Cyclic Redundancy Check) separator, etc. The output signal is specifically an analog signal. The impedance setting module is connected between the pins of the vehicle or between the pins of the vehicle diagnostic instrument.

[0030] Specifically, when the vehicle or the vehicle diagnostic instrument is started, the vehicle or the vehicle diagnostic instrument sends a signal and passes it through the impedance setting module; in the case where the current set impedance is set in the impedance setting module, the signal acquisition module acquires the output signal of the impedance setting module and converts the output signal into a digital signal. The processor receives the digital signal sent by the signal acquisition module and parses the data according to the CAN protocol to obtain a parsing result.

[0031] Step 204, when the parsing result does not conform to the CAN protocol, send a control signal to control the impedance setting module to switch the impedance until the parsing result conforms to the CAN protocol, and obtain the target impedance adapted to the pin.

[0032] Specifically, when the parsing result fails the CRC check of the CAN protocol, the processor sends a control signal to control the impedance setting module to switch from the current set impedance to another impedance. The processor returns to execute the step of obtaining the parsing result obtained by the CAN controller parsing the digital signal according to the CAN protocol until the parsing result conforms to the CAN protocol, and takes the impedance when the parsing result conforms to the CAN protocol as the target impedance adapted to the pins of the vehicle or the vehicle diagnostic instrument.

[0033] The above impedance adaptation method parses the digital signal according to the CAN protocol to obtain a parsing result. When the parsing result does not conform to the CAN protocol, it sends a control signal to control the impedance setting module to switch the impedance, and verifies whether it is adapted to the pins of the vehicle or the vehicle diagnostic instrument by switching the impedance, which can achieve impedance adaptation for multiple vehicle-related CAN buses in the vehicle scenario. And because the target impedance is not only determined by the voltage value, but obtained through actual verification, the accuracy is high.

[0034] In one embodiment, the impedance adaptation method further includes: when the parsing result conforms to the CAN protocol, retain the current set impedance in the impedance setting module as the target impedance adapted to the pin.

[0035] Specifically, when the processor CAN controller parses the digital signal and the parsing result conforms to the CAN protocol, the processor retains the current set impedance in the impedance setting module as the target impedance adapted to the pins of the vehicle or the vehicle diagnostic instrument. In this embodiment, when the parsing result directly conforms to the CAN protocol, the current set impedance in the impedance setting module is retained, and the target impedance can be obtained without switching, improving the switching efficiency.

[0036] In one embodiment, the digital signal is parsed according to the CAN protocol to obtain a parsing result, including: verifying according to the voltage value and waveform of the output signal collected by the signal acquisition module, and when the voltage value and waveform of the output signal conform to the CAN waveform characteristics, parsing the digital signal according to the CAN protocol to obtain the parsing result.

[0037] Specifically, the processor is connected to the signal acquisition module. The CAN waveform transmitted through the CAN bus has certain characteristics. For example, the high level of the electrical signal is 2.5V - 5V, the low level of the electrical signal is 0 - 1V, etc., and the waveform has characteristics such as square wave characteristics and differential signal characteristics. The processor verifies according to the voltage value and waveform of the output signal obtained by the signal acquisition module. When the voltage value and waveform of the output signal conform to the CAN waveform characteristics, the digital signal is parsed according to the CAN protocol to obtain the parsing result. Optionally, the processor can verify according to the voltage difference and waveform of the output signal obtained by the signal acquisition module.

[0038] In this embodiment, first verify according to the voltage value and waveform of the output signal. When it conforms to the CAN waveform characteristics, control the signal acquisition module to transmit the digital signal to the CAN controller, which can first filter out some waveforms that do not meet the requirements, avoid frequent impedance switching, and improve the switching accuracy.

[0039] In one embodiment, after obtaining the target impedance adapted to the pin, the impedance adaptive method further includes:

[0040] Sending an acknowledgment character to the CAN transceiver, so that the CAN transceiver sends the acknowledgment character to the vehicle or vehicle diagnostic instrument, and the vehicle or vehicle diagnostic instrument stops sending data according to the acknowledgment character.

[0041] Among them, the acknowledgment character (ACK) is a transmission control character sent by the receiving station to the sending station in data communication, indicating that the data sent has been confirmed without error. The processor, CAN transceiver, and impedance setting module are connected in sequence.

[0042] Specifically, when the output signal after the vehicle or vehicle diagnostic instrument passes through the impedance setting module is correct, the processor sends an acknowledgment character for the digital signal to the CAN transceiver. After converting the acknowledgment character of the digital signal into an acknowledgment character of an analog signal, the CAN transceiver sends it to the vehicle or vehicle diagnostic instrument through the impedance setting module, and the vehicle or vehicle diagnostic instrument stops sending data according to the acknowledgment character.

[0043] In this embodiment, the acknowledgment character is sent to the vehicle or vehicle diagnostic instrument through the CAN transceiver, which can convert the character format and prevent the vehicle or vehicle diagnostic instrument from sending data continuously.

[0044] In one embodiment, sending an acknowledgement character to a CAN transceiver includes: determining the CAN bus type according to the voltage value of the output signal; and sending the acknowledgement character to the CAN transceiver corresponding to the CAN bus type.

[0045] Among them, the CAN bus types include single-wire CAN bus, high-speed CAN bus, and low-speed CAN bus. The CAN transceivers include high-speed CAN transceivers, low-speed CAN transceivers, SCAN transceivers, etc.

[0046] Specifically, the processor obtains the voltage value of the output signal corresponding to the target impedance obtained by the signal acquisition module, and determines the CAN bus type according to the voltage value and the voltage range of the CAN bus type. It can be understood that the output signal corresponding to the target impedance conforms to the CAN protocol standard. For example, the CANH voltage of the high-speed CAN bus fluctuates between 2.5V and 3.5V, and the CANL voltage fluctuates between 1.5V and 2.5V. Then when the output signal conforms to the CAN protocol, and CANH is 3V, CANL is 2V, and CANH and CANL exhibit differential signal characteristics, the CAN bus type is determined to be the high-speed CAN bus. The processor sends an acknowledgement character to the CAN transceiver corresponding to the CAN bus type.

[0047] In this embodiment, as Figure 3 shown, it is an application environment diagram of the impedance adaptation method in another embodiment. Figure 3 Taking the case where the MCU and the CAN controller are not integrated on the same chip as an example for illustration. It includes a vehicle or a vehicle diagnostic instrument, an impedance setting module, an ADC, an MCU, a CAN controller, a high-speed CAN transceiver, a low-speed CAN transceiver, and a SCAN transceiver. The vehicle or the vehicle diagnostic instrument outputs a signal, and the signal is transmitted to the signal acquisition module through the impedance setting module. The signal acquisition module converts the output signal into a digital signal. The CAN controller in the processor analyzes the digital signal according to the CAN protocol to obtain an analysis result. When the analysis result does not conform to the CAN protocol, the MCU sends a control signal to control the impedance setting module to switch the impedance until the analysis result output by the CAN controller conforms to the CAN protocol, and the target impedance adapted to the pin is obtained. After switching to the target impedance, the MCU sends an acknowledgement character and the CAN bus type to the CAN controller. The CAN controller converts the acknowledgement character in the format of an analog signal into an acknowledgement character in the format of a digital signal, and sends the acknowledgement character in the format of a digital signal to the CAN transceiver corresponding to the CAN bus type. That is, it may be sent to a high-speed CAN transceiver, a low-speed CAN transceiver, or a SCAN transceiver. The CAN transceiver can send an acknowledgement character to the vehicle or the vehicle diagnostic instrument through the impedance setting module, so that the vehicle or the vehicle diagnostic instrument stops sending data.

[0048] In this embodiment, the CAN bus type is determined according to the voltage value of the output signal; an acknowledgment character is sent to the CAN transceiver corresponding to the CAN bus type, and data transmission is performed according to the data of different CAN bus types, ensuring that the vehicle or the vehicle diagnostic instrument can receive the acknowledgment character and stop sending data.

[0049] In one embodiment, an impedance adaptation method includes:

[0050] Step a1, verify according to the voltage value and waveform of the output signal collected by the signal acquisition module. When the voltage value and waveform of the output signal conform to the CAN waveform characteristics, parse the digital signal according to the CAN protocol to obtain a parsing result. The digital signal is obtained by the signal acquisition module collecting the output signal and converting the output signal; the output signal is sent by the vehicle or the vehicle diagnostic instrument and obtained through the impedance setting module.

[0051] Step a2, when the parsing result does not conform to the CAN protocol, send a control signal to control the impedance setting module to switch the impedance until the parsing result conforms to the CAN protocol, and obtain the target impedance adapted to the pin.

[0052] Step a3, when the parsing result conforms to the CAN protocol, retain the current set impedance in the impedance setting module as the target impedance adapted to the pin.

[0053] Step a4, when the parsing result conforms to the CAN protocol, retain the current set impedance in the impedance setting module as the target impedance adapted to the pin of the vehicle or the vehicle diagnostic instrument.

[0054] Step a5, determine the CAN bus type according to the voltage value of the output signal.

[0055] Step a6, send an acknowledgment character to the CAN transceiver corresponding to the CAN bus type.

[0056] Step a7, send an acknowledgment character to the CAN transceiver, so that the CAN transceiver sends the acknowledgment character to the vehicle or the vehicle diagnostic instrument, and the vehicle or the vehicle diagnostic instrument stops sending data according to the acknowledgment character.

[0057] The above impedance adaptation method parses the digital signal according to the CAN protocol to obtain a parsing result. When the parsing result does not conform to the CAN protocol, a control signal is sent to control the impedance setting module to switch the impedance, and it is verified whether it is adapted to the pin of the vehicle or the vehicle diagnostic instrument by switching the impedance. It can achieve impedance adaptation for a variety of vehicle-related CAN buses in the vehicle scenario, and since the target impedance is not only determined by the voltage value, but is obtained through actual verification, the accuracy is high.

[0058] In one embodiment, when the target impedance between known pins is given, the impedance setting module automatically switches to the target impedance.

[0059] In one embodiment, as Figure 4 shown, it is a schematic flowchart of an impedance adaptive method in another embodiment. After the main program starts, module initialization operations are performed.

[0060] Module initialization operations: For example, set the second pin of all OBDs not to configure any impedance of OBD. Determine the pins where CAN may appear. The pins where CAN may appear may be 1 - 9, 6 - 14, 3 - 8, 3 - 11, 12 - 13, etc.

[0061] The signal acquisition module acquires the voltage values and waveforms on the corresponding pins.

[0062] Make a preliminary judgment based on the voltage values and waveforms: The processor makes a preliminary judgment according to the voltage values and the waveforms acquired by the signal acquisition module, and judges whether the current pin may be CAN data based on the voltage volatility of the CAN channel pin.

[0063] Input to the CAN controller: When the CAN waveform characteristics are met, according to the CAN channel pins known to appear in vehicle diagnosis, the binary data, i.e., the digital signal, is obtained by taking the difference between CANH and CANL respectively and input to the CAN controller. After receiving this set of binary data, the CAN controller analyzes the data according to the CAN protocol. If it conforms to the CAN protocol, a normal parsing result is fed back; if it does not conform to the CAN protocol, an abnormal parsing result is returned. When the CAN waveform characteristics are not met, return to execute the step of the signal acquisition module to acquire the voltage values on the corresponding pins.

[0064] Judge whether the data conforms to the CAN protocol: The processor decides whether to switch the impedance according to the parsing result returned by the CAN controller. When the parsing result conforms to the CAN protocol, the current impedance is retained as the target impedance adapted to the pin. When the parsing result does not conform to the CAN protocol, the impedance setting module is controlled to switch the impedance, and return to execute the step of the signal acquisition module to acquire the voltage values on the corresponding pins.

[0065] In this embodiment, a processor + signal acquisition module + CAN controller + impedance setting module are used to form an impedance adaptive device. The signal acquisition module collects the pin voltages of the vehicle or vehicle diagnostic instrument for preliminary fluctuation judgment, anticipates possible CAN pin combinations, converts the digital signals after the signal acquisition module, inputs them into the CAN controller, checks whether they meet the CAN protocol standard through the CAN controller, and notifies the MCU after passing. When the CAN data is successfully parsed and the impedance matching is successful, conversely, when the CAN controller verification does not conform to the CAN protocol, the MCU controls the impedance setting module to perform impedance switching. Repeat the above steps until the data reception is normal or there is no data on the bus to stop the detection. Through the above steps, compared with the traditional method of simply judging whether a certain path of CAN bus data is based on the voltage on a certain pin, it can automatically adapt to a variety of vehicles or vehicle diagnostic instruments, and the obtained impedance is more accurate.

[0066] It should be understood that although each step in the above Figure 2 and 4 flowcharts are shown in sequence according to the arrows, and each step from step a1 to step a6 is shown in sequence according to the label indication, but these steps are not necessarily executed in the order indicated by the arrows or numbers. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 4 at least a part of the steps in

[0067] In one embodiment, an impedance adaptive device includes an impedance setting module, a signal acquisition module, a CAN controller, and a processor and an impedance setting module connected in sequence; the impedance setting module is connected between the pins of the vehicle or vehicle diagnostic instrument;

[0068] The signal acquisition module is used to collect the output signal of the pin of the vehicle or vehicle diagnostic instrument passing through the impedance setting module and convert the output signal into a digital signal;

[0069] The CAN controller processor is used to parse the digital signal according to the CAN protocol to obtain a parsing result;

[0070] The processor is used to issue a control signal to control the impedance setting module to switch the impedance when the parsing result does not conform to the CAN protocol until the parsing result conforms to the CAN protocol, and obtain the target impedance adapted to the pin.

[0071] The above impedance adaptive device analyzes digital signals according to the CAN protocol to obtain an analysis result. When the analysis result does not conform to the CAN protocol, it issues a control signal to control the impedance setting module to switch the impedance, and verifies whether it is adapted to the pins of the vehicle or the vehicle diagnostic instrument by switching the impedance. It can achieve impedance adaptation for a variety of vehicle-related CAN buses in the vehicle scenario, and because the target impedance is not only determined by the voltage value, but obtained through actual verification, the accuracy is high.

[0072] In one embodiment, the CAN controller is further configured to retain the current set impedance in the impedance setting module as the target impedance adapted to the pin when the analysis result conforms to the CAN protocol.

[0073] In this embodiment, when the analysis result directly conforms to the CAN protocol, the current set impedance in the impedance setting module is retained, and the target impedance is obtained without switching, which improves the switching efficiency.

[0074] In one embodiment, the processor is further connected to the output end of the signal acquisition module; the processor is configured to verify according to the voltage value and waveform of the output signal collected by the signal acquisition module, and when the voltage value and waveform of the output signal conform to the CAN waveform characteristics, analyze the digital signal according to the CAN protocol.

[0075] In this embodiment, first verify according to the voltage value and waveform of the output signal. When the CAN waveform characteristics are met, control the signal acquisition module to transmit the digital signal to the CAN controller, which can filter out some waveforms that do not meet the requirements in the front stage, avoid frequent impedance switching, and improve the switching accuracy.

[0076] In one embodiment, the device further includes a CAN transceiver, one end of the CAN transceiver is connected to the processor, and the other end is connected to the impedance setting module;

[0077] The processor is further configured to send an acknowledgment character to the CAN transceiver after obtaining the target impedance;

[0078] The CAN transceiver is configured to send the acknowledgment character to the vehicle or the vehicle diagnostic instrument;

[0079] The vehicle or the vehicle diagnostic instrument is configured to stop sending data according to the acknowledgment character.

[0080] In this embodiment, the acknowledgment character is sent to the vehicle or the vehicle diagnostic instrument through the CAN transceiver, which can convert the character format and prevent the vehicle or the vehicle diagnostic instrument from continuously sending data.

[0081] In one embodiment, the processor is configured to determine the CAN bus type according to the output signal;

[0082] The processor sends an acknowledgment character to the CAN transceiver corresponding to the CAN bus type.

[0083] In this embodiment, the CAN bus type is determined according to the voltage value of the output signal; an acknowledgment character is sent to the CAN transceiver corresponding to the CAN bus type, and data transmission is performed according to the data of different CAN bus types to ensure that the vehicle or the vehicle diagnostic instrument can receive the acknowledgment character and stop sending data. For the specific definition of the impedance adaptation device, reference can be made to the definition of the impedance adaptation method in the above text, which will not be elaborated here. Each module in the above impedance adaptation device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0084] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method embodiments are implemented.

[0085] In one embodiment, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the above method embodiments.

[0086] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes in the method embodiments as described above. Among them, any reference to the memory, storage, database, or other media used in the various embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0087] The above are only the preferred embodiments of the present invention, and thus do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall similarly be included within the patent protection scope of the present invention.

Claims

1. An impedance adaptive method, characterized in that, The method includes: Parsing the digital signal according to the CAN protocol to obtain a parsing result; the digital signal is the output signal collected by the signal acquisition module and converted from the output signal; the output signal is sent by a vehicle or a vehicle diagnostic instrument and obtained through an impedance setting module; the impedance setting module is connected between the pins of the vehicle or the vehicle diagnostic instrument; When the parsing result fails to pass the CRC check of the CAN protocol, a control signal is sent to control the impedance setting module to switch the impedance until the parsing result conforms to the CAN protocol, and a target impedance adapted to the pin is obtained.

2. The method according to claim 1, characterized in that, The method further includes: When the parsing result conforms to the CAN protocol, the current set impedance in the impedance setting module is retained as the target impedance adapted to the pin.

3. The method according to claim 1, characterized in that, The parsing the digital signal according to the CAN protocol to obtain a parsing result includes: Verifying according to the voltage value and waveform of the output signal collected by the signal acquisition module, and when the voltage value and waveform of the output signal conform to the CAN waveform characteristics, parsing the digital signal according to the CAN protocol to obtain a parsing result.

4. The method according to claim 1, characterized in that, After obtaining the target impedance adapted to the pin, the method further includes: Sending a confirmation character to the CAN transceiver, so that the CAN transceiver sends the confirmation character to the vehicle or the vehicle diagnostic instrument, and the vehicle or the vehicle diagnostic instrument stops sending data according to the confirmation character.

5. The method according to claim 4, characterized in that, The sending the confirmation character to the CAN transceiver includes: Determining the CAN bus type according to the voltage value of the output signal; Sending a confirmation character to the CAN transceiver corresponding to the CAN bus type.

6. An impedance adaptive device, characterized in that, It includes an impedance setting module, a signal acquisition module and a processor connected in sequence; the impedance setting module is connected between the pins of the vehicle or the vehicle diagnostic instrument; The vehicle or the vehicle diagnostic instrument is used to send an output signal passing through the impedance setting module to the signal acquisition module; The signal acquisition module is used to convert the output signal into a digital signal; The processor is used to parse the digital signal according to the CAN protocol to obtain a parsing result; The processor is used to send a control signal to control the impedance setting module to switch the impedance when the parsing result fails to pass the CRC check of the CAN protocol until the parsing result conforms to the CAN protocol, and obtain a target impedance adapted to the pin.

7. The device according to claim 6, characterized in that, The processor is further used to retain the current set impedance in the impedance setting module as the target impedance adapted to the pin when the parsing result conforms to the CAN protocol.

8. The device according to claim 6, characterized in that, The processor is further connected to the output end of the signal acquisition module; The processor is used to verify according to the voltage value and waveform of the output signal collected by the signal acquisition module, and when the voltage value and waveform of the output signal conform to the CAN waveform characteristics, parse the digital signal according to the CAN protocol.

9. The device according to claim 6, characterized in that, The device further includes a CAN transceiver, one end of the CAN transceiver is connected to the processor, and the other end is connected to the impedance setting module; The processor is further configured to send an acknowledgement character to the CAN transceiver after obtaining the target impedance; The CAN transceiver is configured to send the acknowledgement character to the vehicle or the vehicle diagnostic instrument; The vehicle or the vehicle diagnostic instrument is configured to stop sending data according to the acknowledgement character.

10. The device according to claim 9, characterized in that, The processor is configured to determine the CAN bus type according to the output signal; The processor sends an acknowledgement character to the CAN transceiver corresponding to the CAN bus type.

11. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Controller area network (CAN) bus signal transmission device and test system

    CN103067241A

  • Controller area network (CAN) bus data transceiver

    CN103200062A

  • High-speed CAN bus self-adaptive impedance matching module, method and system

    CN105278411A