CN104980186B - Echo interference removing method and relevant apparatus - Google Patents

Echo interference removing method and relevant apparatus Download PDF

Info

Publication number
CN104980186B
CN104980186B CN201410133872.5A CN201410133872A CN104980186B CN 104980186 B CN104980186 B CN 104980186B CN 201410133872 A CN201410133872 A CN 201410133872A CN 104980186 B CN104980186 B CN 104980186B
Authority
CN
China
Prior art keywords
bus
state
switched
data
bus driver
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
CN201410133872.5A
Other languages
Chinese (zh)
Other versions
CN104980186A (en
Inventor
邵起明
刘少勃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ULTRAPOWER INTERNATIONAL TECHNOLOGY DEVELOPMENT(BEIJING) Co Ltd
Original Assignee
ULTRAPOWER INTERNATIONAL TECHNOLOGY DEVELOPMENT(BEIJING) 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 ULTRAPOWER INTERNATIONAL TECHNOLOGY DEVELOPMENT(BEIJING) Co Ltd filed Critical ULTRAPOWER INTERNATIONAL TECHNOLOGY DEVELOPMENT(BEIJING) Co Ltd
Priority to CN201410133872.5A priority Critical patent/CN104980186B/en
Publication of CN104980186A publication Critical patent/CN104980186A/en
Application granted granted Critical
Publication of CN104980186B publication Critical patent/CN104980186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Bidirectional Digital Transmission (AREA)

Abstract

The present invention relates to half-duplex operation technical field, more particularly to a kind of echo interference removing method and device, the method is applied in terminal, when bus driver is switched to reception state by transmission state, the valid data in bus are obtained after the preset duration of interval again, wherein, preset duration is returned the time used more than echo reflection, while less than the response time that valid data are returned in bus;In this way, after terminal has sent data, after being spaced preset duration, the valid data in bus can be just received, the transmission time of echo error code can be avoided, avoid the wrong data that terminal by mistake returns bus reflections as valid data.Moreover, preset duration is limited to the time used of returning more than echo reflection, and it is less than in the range of the response time for returning to valid data in bus, can ensures that the valid data transmitted in bus will not be missed.In conclusion the echo interference in bus can be completely eliminated in the echo interference removing method.

Description

Echo interference removing method and relevant apparatus
Technical field
The present invention relates to half-duplex operation technical field, more particularly to a kind of echo interference removing method and related dress Put.
Background technology
Half-duplex transmission mode refer to receive with send share a carrier channel, but synchronization can only send data or Data can only be received.For example, RS485 serial bus standards are exactly half-duplex transmission mode.Terminal A and terminal B are total by RS485 Line communicates, it is assumed that terminal A first sends data, and the RS485 bus drivers of terminal A sides are first set as transmission state, terminal B The RS485 bus drivers of side are set as reception state.After terminal A has sent data, the bus driver switching of terminal A sides Bus driver to reception state, and terminal B sides is switched to transmission state, the data that terminal A receiving terminals B is sent.
Cause impedance discontinuity since the total built-in units of RS485 are more, and bus is long, when RS485 bus drivers Transmission state when closing, still surviving signal in RS485 buses, when terminal is preparing reception data after having sent data, The signal retained in RS485 buses can be reflected back, so that terminal receives the data of mistake, that is, generate echo error code.
Eliminating a kind of method of echo error code in the prior art is, using the RS485 industrial sidings of impedance matching, low decay Cable, the terminal resistance of 120 Ω is connected in the starting end that RS485 is communicated with end, and such a method can only be reduced to greatest extent The interference of echo error code, can not be completely eliminated the interference of echo error code.
The content of the invention
A kind of echo interference removing method and relevant apparatus are provided in the embodiment of the present invention, half-duplex string is completely eliminated Echo error code interference on row bus.
In order to realize above-mentioned goal of the invention, the embodiment of the invention discloses following technical solution:
In a first aspect, the present invention provides a kind of echo interference removing method, applied in terminal, including:
When data sending to be sent is complete, controlling bus driver is switched to reception state by transmission state;
Preset duration is spaced since when the bus driver is switched to reception state by transmission state, is controlled described total Line drive obtains the valid data in bus, wherein, the preset duration is more than echo reflection in bus when returning used Between, and less than the response time that valid data are returned in bus.
Alternatively, it is described when being spaced default when the bus driver is switched to reception state by transmission state It is long, control the bus driver to obtain the valid data in bus, including:
When controlling bus driver is switched to reception state by transmission state, start timing;
When timing duration reaches the preset duration, the number in buffer in the bus driver counterpart terminal is emptied According to receive the valid data in bus.
Alternatively, it is described when being spaced default when the bus driver is switched to reception state by transmission state It is long, control the bus driver to obtain the valid data in bus, including:
When controlling bus driver is switched to reception state by transmission state, closes and reception shape is switched to by transmission state The receive capabilities of the corresponding serial ports of bus driver of state, and start timing;
When timing duration reaches the preset duration, the receive capabilities of the serial ports are opened, to receive in bus Valid data.
Alternatively, after the data in the bus driver counterpart terminal in buffer are emptied, further include:Receive total The valid data transmitted on line.
Alternatively, the receive capabilities of the serial ports are closed, including:The level state of the reception data terminal of the terminal is turned Inactive level state is changed to, the inactive level state includes high level or low level.
Second aspect, the present invention also provides a kind of echo interference cancellation element, including:
State switch control unit, for when data sending to be sent is complete, controlling the bus driver by sending State is switched to reception state;
Acquiring unit, for when being spaced default when the bus driver is switched to reception state by transmission state It is long, control the bus driver to obtain the valid data in bus, wherein, the preset duration is more than echo reflection in bus Return the time used, and less than the response time that valid data are returned in bus.
Alternatively, the acquiring unit includes:
First timing unit, for when controlling bus driver is switched to reception state by transmission state, starting timing;
Data empty unit, for when timing duration reaches preset duration, emptying the bus driver counterpart terminal Data in interior buffer, to receive the valid data transmitted in bus.
Alternatively, the acquiring unit includes:
Closing unit is received, when controlling bus driver is switched to reception state by transmission state, is closed by transmission shape State is switched to the receive capabilities of the corresponding serial ports of bus driver of reception state;
Second timing unit, for when controlling bus driver is switched to reception state by transmission state, starting timing;
Opening unit is received, for when timing duration reaches preset duration, opening the receive capabilities of the serial ports, so as to Receive the valid data in bus.
Alternatively, the acquiring unit further includes:Data receipt unit, for when the data empty unit empty it is described In bus driver counterpart terminal during data in buffer, the valid data transmitted in bus are received.
The third aspect, the present invention also provides a kind of terminal, including:Processor;For storing processor-executable instruction Memory;Wherein, the processor is configured as:
When data sending to be sent is complete, the bus driver is controlled to be switched to reception state by transmission state;
Preset duration is spaced since when the bus driver is switched to reception state by transmission state, is controlled described total Line drive obtains the valid data in bus, wherein, the preset duration is more than echo reflection in bus when returning used Between, and less than the response time that valid data are returned in bus.
By above technical scheme as it can be seen that echo interference removing method provided in an embodiment of the present invention and device, the method Applied in terminal, when bus driver is switched to reception state by transmission state, bus is obtained again after being spaced preset duration On valid data, wherein, preset duration is more than echo reflection and returns the time used, while less than returning to significant figure in bus According to response time;In this way, after terminal has sent data, after being spaced preset duration, the valid data in bus can be just received, i.e., The transmission time of echo error code can be avoided, avoids the wrong data that terminal by mistake returns bus reflections as valid data.And And preset duration is limited to the time used of returning more than echo reflection, and less than the response that valid data are returned in bus It in the range of time, can ensure that the valid data transmitted in bus will not be missed.In conclusion the echo interference elimination side The echo interference in bus can be completely eliminated in method.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without having to pay creative labor, can also obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow diagram of echo interference removing method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another echo interference removing method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of another echo interference removing method provided in an embodiment of the present invention;
Fig. 4 is a kind of structure diagram of RS485 communication systems example;
Fig. 5 is flow diagram of the embodiment of the present invention based on a kind of Fig. 4 echo interference removing methods provided;
Fig. 6 is flow diagram of the embodiment of the present invention based on Fig. 4 another echo interference removing methods provided;
Fig. 7 is a kind of structure diagram of echo interference cancellation element provided in an embodiment of the present invention;
Fig. 8 is the structure diagram of another echo interference cancellation element provided in an embodiment of the present invention;
Fig. 9 is the structure diagram of another echo interference cancellation element provided in an embodiment of the present invention.
Embodiment
In order to make those skilled in the art more fully understand the technical solution in the present invention, below in conjunction with of the invention real The attached drawing in example is applied, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described implementation Example is only part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this area is common Technical staff's all other embodiments obtained without making creative work, should all belong to protection of the present invention Scope.
It is a kind of flow diagram of echo interference removing method provided in an embodiment of the present invention referring to Fig. 1.The method Terminal is can be applied to, the terminal can be microcontroller or PC machine etc..As shown in Figure 1, it the described method comprises the following steps:
In step s 11, when data sending to be sent is complete, the bus driver is controlled to be switched to by transmission state Reception state.
When transmitting terminal determines that data sending to be sent is complete, switching drives with the transmission drive end of bus driver and reception The level state of the I/O ports at end(Low level is switched to from high level;Or it is switched to high level from low level), realize that control is total The state switching of line drive.
If the transmission drive end of bus driver is that high level is effective, it is that low level is effective to receive drive end, then works as institute State I/O ports(That is the P1 ports in Fig. 4)Voltage signal when being changed into low level from high level, bus driver is by transmission state It is switched to reception state.When the voltage signal of the I/O ports is high level, bus driver is in transmission state;Work as institute When the voltage signal for stating I/O ports is low level, bus driver is in reception state.
In step s 12, when being spaced default when the bus driver is switched to reception state by transmission state It is long, the valid data in bus are obtained, wherein, the preset duration is more than echo reflection in bus and returns the time used, and Less than the response time that valid data are returned in bus.The preset duration is related with the length of transmission line in bus, this area skill Art personnel can be according to the enlightenment of the application, and the time used of returning to echo reflection in bus in practical application scene surveys Amount, and the response time to returning to valid data in bus measure, so that suitable preset duration is obtained, specific measurement Mode the application is not construed as limiting.
Due to half duplex series communication, echo can be just produced when bus driver is switched to reception state by transmission state Interference, therefore, when detecting bus driver and being switched to reception state by transmission state, it is necessary to take certain measure to avoid connecing Echo error code on to bus.
The valid data response time is returned since the turn around time of echo error code in bus is less than in bus, can be with When bus driver is switched to reception state by transmission state, the valid data in bus are obtained after the preset duration of interval, are kept away Exempt from the echo interference in bus.Wherein, preset duration should return the time used more than echo reflection, while less than in bus Return to the response time of valid data, wherein, in bus echo reflection time used of returning determined according to bus length.Bus is got over Long, echo reflection time used of returning is longer;Bus is shorter, and echo reflection time used of returning is shorter.
Alternatively, further included in the bus driver counterpart terminal after the data in its internal buffer are emptied The step of receiving the valid data transmitted in bus, so as to ensure that the terminal will not miss the valid data in bus.
Echo interference removing method provided in this embodiment, is detecting that bus driver is switched to reception by transmission state During state, it is spaced after preset duration and obtains valid data in bus again, preset duration is more than echo reflection when returning used Between.In this way, after terminal has sent data, after being spaced preset duration, the valid data in bus can be just received, so as to avoid The transmission time of echo error code, avoids the wrong data that terminal by mistake returns bus reflections as valid data.Moreover, when default It is long to be less than the response time that valid data are returned in bus, can ensure that the valid data transmitted in bus will not be missed.To sum up Described, the echo interference in bus can be completely eliminated in the echo interference removing method.
In one embodiment of the invention, when bus driver is switched to reception state by transmission state, interval is pre- If emptying the buffer of terminal after duration, the echo error code received is deleted.
Fig. 2 is referred to, shows another echo interference removing method flow chart provided in an embodiment of the present invention, this method Applied in terminal.As shown in Fig. 2, the method may include following steps:
S11, when data sending to be sent is complete, controls the bus driver to be switched to reception shape by transmission state State.
S121, when controlling bus driver is switched to reception state by transmission state, starts timing.
S122, when timing duration reaches preset duration, empties in the bus driver counterpart terminal in buffer Data, to receive the valid data in bus.The preset duration is more than echo reflection in bus and returns the time used, and Less than the response time that valid data are returned in bus.
Echo interference removing method provided in this embodiment, reception state is switched in bus driver by transmission state When, start timing, when timing duration reaches the preset duration, empty the buffer in terminal.Such a mode is bus driver After device is switched to reception state by transmission state, the serial ports of terminal can receive the data in bus, and be stored in buffer. When timing duration reaches preset duration, then empty buffer.I.e. terminal first have received echo error code(Wrong data), Ran Houzai Delete the echo error code received.Since preset duration is returned the time used much larger than the echo reflection in bus, and it is remote small In the response time that valid data are returned in bus, therefore, it is possible to the whole echo error codes that will be received(Wrong data)Delete, And the valid data in bus will not be deleted by mistake.To sum up, the echo interference removing method can be completely eliminated in bus Echo interference.
In another embodiment of the present invention, after bus driver is switched to reception state by transmission state, first will The receive capabilities of RS485 serial ports close preset duration in terminal, avoid receiving the echo error code in bus.
Fig. 3 is referred to, shows the flow chart of another echo interference removing method of the embodiment of the present invention, the method should For terminal.As shown in figure 3, the method may include following steps:
S11, when data sending to be sent is complete, controls the bus driver to be switched to reception shape by transmission state State.
S123, when controlling bus driver is switched to reception state by transmission state, closes and is switched to by transmission state The receive capabilities of serial ports in the bus driver counterpart terminal of reception state, and start timing.
For example, terminal A and terminal B are communicated by RS485 buses, after terminal A has sent data, terminal A is corresponding RS485 bus drivers are switched to reception state by transmission state, at this time, close the receive capabilities of RS485 serial ports on terminal A, Meanwhile start timing.The receive capabilities of the RS485 serial ports of terminal are closed, will exactly receive data terminal(RxD)Level state cut Change to inactive level state.It is assumed that it is that high level is effective to receive data terminal, then the level state for receiving data terminal is switched to low Level state.It is assumed that it is that low level is effective to receive data terminal, then the level state for receiving data terminal is switched to high level shape State.
S124, when timing duration reaches preset duration, opens the receive capabilities of the serial ports, to receive in bus Valid data.The preset duration is more than echo reflection in bus and returns the time used, and is less than in bus and returns to significant figure According to response time.
Examples detailed above is adopted, when timing duration reaches preset duration, opens the receive capabilities of RS485 serial ports on terminal A, That is terminal A just opens receive capabilities after data have been sent after being spaced preset duration, avoids receiving the echo error code in bus. Wherein, terminal A is received data terminal(RxD)Level state be converted to significant level state, it is assumed that it is high to receive data terminal Level is effective, then will receive data terminal and be switched to high level state, can receive the data in bus.
Echo interference removing method provided in this embodiment, reception state is switched in bus driver by transmission state When, the serial ports receive capabilities in the bus driver counterpart terminal, and timing are first closed, when timing duration reaches preset duration Afterwards, the serial ports receive capabilities are then turned on, avoid receiving the echo error code in bus.Since preset duration is much larger than in bus Echo reflection is returned the time used, and much smaller than the response time that valid data are returned in bus, therefore, will not be received Any echo error code(Wrong data), and will not miss and receive any valid data in bus.To sum up, the echo interference eliminates The echo interference in bus can be completely eliminated in method.
In one embodiment of the invention, voltage signal on the I/O port being connected with bus driver by detection terminal Level state judge the state of bus driver.
Fig. 4 is a kind of structure diagram of RS485 communication systems example.As shown in figure 4, the RS485 communication systems bag Include terminal A, terminal B, bus driver 1, bus driver 2 and RS485 buses.
The transmission drive end and reception drive end of the I/O ports P1 connections bus driver 1 of wherein terminal A, the hair of terminal A The input pin of data terminal TXD connections bus driver 1 is sent, terminal A's receives the defeated of data terminal RXD connections bus driver 1 Go out pin, the bus connection pin connection RS485 of bus driver 1.The connection mode of terminal B and bus driver 2 with it is above-mentioned Mode is identical, and details are not described herein again.
With reference to Fig. 4 and Fig. 5, wherein, Fig. 5 is a kind of flow of echo interference removing method in communication system shown in Fig. 4 Figure, the method are applied in terminal A, and similarly, the method that terminal B eliminates echo interference is identical with the method for terminal A, herein not Repeat again.
As shown in figure 5, the method may include following steps:
S110, after data to be sent have been sent, controlling bus driver 1 is switched to reception state by transmission state.
In the present embodiment, the transmission drive end of bus driver is that high level is effective, and it is that low level has to receive drive end Effect, then when the voltage signal of P1 ports is changed into low level from high level, bus driver is switched to reception shape by transmission state State.
S120, starts timing.Timing can be carried out by timer in terminal, can be countdown or just Timing, the application contrast are not limited.
S130, when timing duration reaches preset duration, empties in the bus driver counterpart terminal in buffer Data, to receive the valid data in bus.
Echo interference removing method provided in this embodiment, when the bus driver 1 of terminal A connections is switched by transmission state During to reception state, and start timing, when timing duration reaches preset duration, empty in the bus driver counterpart terminal Data in buffer, so as to delete the echo error code in buffer, avoid terminal using echo error code as valid data processing. Since preset duration is returned the time used much larger than the echo reflection in bus, and much smaller than return valid data in bus Response time, therefore, it is possible to the whole echo error codes that will be received(Wrong data)Delete, and will not delete by mistake in bus Valid data.To sum up, the echo interference in bus can be completely eliminated in the echo interference removing method.
With reference to Fig. 4 and Fig. 6, Fig. 6 is the flow chart of another echo interference removing method in communication system shown in Fig. 4, The method is applied in terminal A, and similarly, the method that terminal B eliminates echo interference is identical with the method for terminal A, herein no longer Repeat.
S210, after data to be sent have been sent, controlling bus driver 1 is switched to reception state by transmission state.
S220, closes the receive capabilities for the corresponding serial ports of bus driver that reception state is switched to by transmission state, and Start timing.
S230, when timing duration reaches the preset duration, opens the receive capabilities of the serial ports, to receive bus On valid data.
Echo interference removing method provided in this embodiment, when bus driver 1 is switched to reception state by transmission state, First close the serial ports receive capabilities in 1 counterpart terminal of bus driver, and timing;When timing duration reaches preset duration Afterwards, the serial ports receive capabilities are then turned on, avoid receiving the echo error code in bus.Since preset duration is much larger than in bus Echo reflection is returned the time used, and much smaller than the response time that valid data are returned in bus, therefore, will not be received Any echo error code, and will not miss and receive any valid data in bus.To sum up, the echo interference removing method can be complete It totally disappeared except the echo interference in bus.
Corresponding to above-mentioned echo interference removing method, present invention also offers echo interference cancellation element embodiment.
Fig. 7 is referred to, shows a kind of structure diagram of echo interference cancellation element provided by the embodiments of the present application, institute Device is stated applied in terminal.
As shown in fig. 7, described device can include state switch control unit 10 and acquiring unit 20.
State switch control unit 10 be configured as data sending to be sent it is complete when, control the bus driver by Transmission state is switched to reception state.
When transmitting terminal determines that data sending to be sent is complete, switching drives with the transmission drive end of bus driver and reception The level state of the I/O ports at end(Low level is switched to from high level;Or it is switched to high level from low level), realize that control is total The state switching of line drive.
Acquiring unit 20 is configured as being spaced since when the bus driver is switched to reception state by transmission state Preset duration, obtains the valid data in bus, wherein, the preset duration is more than echo reflection in bus when returning used Between, and less than the response time that valid data are returned in bus.
Echo interference cancellation element provided in this embodiment, is detecting that bus driver is switched to reception by transmission state During state, the valid data obtained again by acquiring unit after preset duration in bus are spaced.Preset duration is more than echo reflection Return the time used, in this way, after terminal has sent data, after being spaced preset duration, can just receive the valid data in bus. So as to avoid the transmission time of echo error code, the wrong data that terminal by mistake returns bus reflections is avoided as significant figure According to.Moreover, preset duration is less than the response time for returning to valid data in bus, can ensure miss what is transmitted in bus Valid data.In conclusion the echo interference in bus can be completely eliminated in the echo interference removing method.
Fig. 8 is referred to, shows another kind echo interference cancellation element of the embodiment of the present invention.Acquiring unit 20 in Fig. 8 It can include:First timing unit 21 and data empty unit 22.
State switch control unit 10 be configured as data sending to be sent it is complete when, control the bus driver by Transmission state is switched to reception state.
First timing unit 21 is configured as the state switch control unit controlling bus driver by transmission state When being switched to reception state, start timing.
When data empty unit 22 and are configured as the timing duration of the first timing unit and reach preset duration, empty described Data in bus driver counterpart terminal in buffer, to receive the valid data in bus.
Alternatively, as shown in figure 8, the acquiring unit can also include data receipt unit 23.
The data receipt unit 23 is used to empty in the bus driver counterpart terminal when the data empty unit 22 During data in buffer, the valid data transmitted in bus are received.
Echo interference cancellation element provided in this embodiment, when bus driver is switched to reception state by transmission state When, the timing by the first timing unit.When the timing duration of the first timing unit reaches preset duration, empty in terminal and delay Data in storage, so that terminal receives the valid data in bus.Since preset duration is much larger than the echo reflection in bus Return the time used, and much smaller than the response time that valid data are returned in bus, therefore, it is possible to which the whole received is returned Ripple error code(Wrong data)Delete, and the valid data in bus will not be deleted by mistake.To sum up, the echo interference removing method The echo interference in bus can be completely eliminated.
Fig. 9 is referred to, shows the structure diagram of another echo interference cancellation element of the embodiment of the present invention.Wherein, Acquiring unit in Fig. 8 is refined as receiving closing unit 24, the second timing unit 25 and receives opening unit 26.
State switch control unit 10 be configured as data sending to be sent it is complete when, control the bus driver by Transmission state is switched to reception state.
When receiving closing unit 24 and being configured as controlling bus driver and be switched to reception state by transmission state, close The receive capabilities of the corresponding serial ports of bus driver of reception state are switched to by transmission state.
Second timing unit 25 is configured as the state switch control unit controlling bus driver by transmission state When being switched to reception state, start timing;
When the timing duration that reception opening unit 26 is configured as the second timing unit reaches preset duration, described in unlatching The receive capabilities of serial ports, to receive the valid data in bus.
Echo interference cancellation element provided in this embodiment, reception state is switched in bus driver by transmission state When, first close serial ports receive capabilities in the bus driver counterpart terminal by receiving closing unit.Meanwhile by the second meter Shi Danyuan starts timing, after timing duration reaches preset duration, is then turned on the serial ports receive capabilities.Avoid receiving in bus Echo error code.Since preset duration is returned the time used much larger than the echo reflection in bus, and it is much smaller than in bus and returns The response time of valid data is returned, therefore, any echo error code that will not be received, and will not miss to receive and any have in bus Imitate data.To sum up, the echo interference in bus can be completely eliminated in the echo interference removing method.
On the other hand, the present invention also provides a kind of terminal, including processor;For storing depositing for processor-executable instruction Reservoir;Wherein, the processor is configured as:
When data sending to be sent is complete, the bus driver is controlled to be switched to reception state by transmission state;From Preset duration is spaced when the bus driver is switched to reception state by transmission state, controls the bus driver to obtain The valid data in bus are taken, wherein, the preset duration is more than echo reflection in bus and returns the time used, and less than total The response time of valid data is returned on line.
The description of embodiment of the method more than, it is apparent to those skilled in the art that the present invention can Realized by the mode of software plus required general hardware platform, naturally it is also possible to by hardware, but in many cases the former It is more preferably embodiment.Based on such understanding, technical scheme substantially makes tribute to the prior art in other words The part offered can be embodied in the form of software product, which is stored in a storage medium, bag Some instructions are included to use so that a computer equipment(Can be personal computer, server, or network equipment etc.)Perform The all or part of step of each embodiment the method for the present invention.And foregoing storage medium includes:Read-only storage (ROM), random access memory(RAM), magnetic disc or CD etc. are various can be with the medium of store program codes.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Especially for device or For system embodiment, since it is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to method The part explanation of embodiment.Apparatus and system embodiment described above is only schematical, wherein the conduct The unit that separating component illustrates may or may not be it is physically separate, can be as the component that unit is shown or Person may not be physical location, you can with positioned at a place, or can also be distributed in multiple network unit.Can root Factually border needs to select some or all of module therein realize the purpose of this embodiment scheme.Ordinary skill Personnel are without creative efforts, you can to understand and implement.
The present invention can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type Part, data structure etc..The present invention can also be put into practice in a distributed computing environment, in these distributed computing environment, by Task is performed and connected remote processing devices by communication network.In a distributed computing environment, program module can be with In the local and remote computer-readable storage medium including storage device.
It should be noted that herein, the relational terms of such as " first " and " second " or the like are used merely to one A entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operate it Between there are any actual relationship or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Cover non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only include those Key element, but also including other elements that are not explicitly listed, or further include as this process, method, article or set Standby intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Also there are other identical element in the process, method, article or apparatus that includes the element.
The above is only the embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (8)

  1. A kind of 1. echo interference removing method, applied in terminal, it is characterised in that including:
    When data sending to be sent is complete, controlling bus driver is switched to reception state by transmission state;
    Preset duration is spaced since when the bus driver is switched to reception state by transmission state, controls the bus to drive Dynamic device obtains the valid data in bus, wherein, the preset duration is more than echo reflection in bus and returns the time used, and Less than the response time that valid data are returned in bus;
    It is described that preset duration is spaced since when the bus driver is switched to reception state by transmission state, control described total Line drive obtains the valid data in bus, including:
    When controlling bus driver is switched to reception state by transmission state, closes and reception state is switched to by transmission state The receive capabilities of the corresponding serial ports of bus driver, and start timing;
    When timing duration reaches the preset duration, the receive capabilities of the serial ports are opened, it is effective in bus to receive Data.
  2. 2. according to the method described in claim 1, it is characterized in that, it is switched to reception from the bus driver by transmission state Start to be spaced preset duration during state, control the bus driver to obtain the valid data in bus, including:
    When controlling bus driver is switched to reception state by transmission state, start timing;
    When timing duration reaches the preset duration, the data in buffer in the bus driver counterpart terminal are emptied, To receive the valid data in bus.
  3. 3. according to the method described in claim 2, it is characterized in that, emptying buffer in the bus driver counterpart terminal In data after, further include:Receive the valid data transmitted in bus.
  4. 4. according to the method described in claim 1, it is characterized in that, close the receive capabilities of the serial ports, including:
    The level state of the reception data terminal of the terminal is converted into inactive level state, the inactive level state includes height Level or low level.
  5. A kind of 5. echo interference cancellation element, it is characterised in that including:
    State switch control unit, for when data sending to be sent is complete, controlling bus driver to be switched by transmission state To reception state;
    Acquiring unit, for being spaced preset duration since when the bus driver is switched to reception state by transmission state, The bus driver is controlled to obtain the valid data in bus, wherein, the preset duration is more than echo reflection in bus and returns Come the time used, and less than the response time that valid data are returned in bus;
    The acquiring unit includes:
    Closing unit is received, when controlling bus driver is switched to reception state by transmission state, closes and is cut by transmission state Change to the receive capabilities of the corresponding serial ports of bus driver of reception state;
    Second timing unit, for when controlling bus driver is switched to reception state by transmission state, starting timing;
    Opening unit is received, for when timing duration reaches preset duration, the receive capabilities of the serial ports being opened, to receive Valid data in bus.
  6. 6. device according to claim 5, it is characterised in that the acquiring unit includes:
    First timing unit, for when controlling bus driver is switched to reception state by transmission state, starting timing;
    Data empty unit, delay for when timing duration reaches preset duration, emptying in the bus driver counterpart terminal Data in storage, to receive the valid data transmitted in bus.
  7. 7. device according to claim 6, it is characterised in that the acquiring unit further includes:
    Data receipt unit, for being emptied when the data empty unit in the bus driver counterpart terminal in buffer During data, the valid data transmitted in bus are received.
  8. A kind of 8. terminal, it is characterised in that including:
    Processor;
    For storing the memory of processor-executable instruction;
    Wherein, the processor is configured as:
    When data sending to be sent is complete, controlling bus driver is switched to reception state by transmission state;
    Preset duration is spaced since when the bus driver is switched to reception state by transmission state, controls the bus to drive Dynamic device obtains the valid data in bus, wherein, the preset duration is more than echo reflection in bus and returns the time used, and Less than the response time that valid data are returned in bus;
    It is described that preset duration is spaced since when the bus driver is switched to reception state by transmission state, control described total Line drive obtains the valid data in bus, including:
    When controlling bus driver is switched to reception state by transmission state, closes and reception state is switched to by transmission state The receive capabilities of the corresponding serial ports of bus driver, and start timing;
    When timing duration reaches the preset duration, the receive capabilities of the serial ports are opened, it is effective in bus to receive Data.
CN201410133872.5A 2014-04-03 2014-04-03 Echo interference removing method and relevant apparatus Active CN104980186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410133872.5A CN104980186B (en) 2014-04-03 2014-04-03 Echo interference removing method and relevant apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410133872.5A CN104980186B (en) 2014-04-03 2014-04-03 Echo interference removing method and relevant apparatus

Publications (2)

Publication Number Publication Date
CN104980186A CN104980186A (en) 2015-10-14
CN104980186B true CN104980186B (en) 2018-05-15

Family

ID=54276339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410133872.5A Active CN104980186B (en) 2014-04-03 2014-04-03 Echo interference removing method and relevant apparatus

Country Status (1)

Country Link
CN (1) CN104980186B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111831604A (en) * 2020-07-14 2020-10-27 深圳开立生物医疗科技股份有限公司 SPI data transmission method, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573719A (en) * 2003-06-13 2005-02-02 国际商业机器公司 Serial bus interface and method for serially interconnecting time-critical digital devices
CN101719112A (en) * 2009-11-19 2010-06-02 北京东方信联科技有限公司 Half-duplex automatic receiving-transmitting switching circuit of RS485
CN102387012A (en) * 2011-10-12 2012-03-21 北京创毅视讯科技有限公司 Method for transmitting data on half-duplex bus and interface device
CN103455461A (en) * 2012-06-04 2013-12-18 江森自控空调冷冻设备(无锡)有限公司 Method for improving RS485 bus communication reliability

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573719A (en) * 2003-06-13 2005-02-02 国际商业机器公司 Serial bus interface and method for serially interconnecting time-critical digital devices
CN101719112A (en) * 2009-11-19 2010-06-02 北京东方信联科技有限公司 Half-duplex automatic receiving-transmitting switching circuit of RS485
CN102387012A (en) * 2011-10-12 2012-03-21 北京创毅视讯科技有限公司 Method for transmitting data on half-duplex bus and interface device
CN103455461A (en) * 2012-06-04 2013-12-18 江森自控空调冷冻设备(无锡)有限公司 Method for improving RS485 bus communication reliability

Also Published As

Publication number Publication date
CN104980186A (en) 2015-10-14

Similar Documents

Publication Publication Date Title
CN108197042B (en) Universal asynchronous serial port based on FPGA and response method thereof
CN103441948B (en) A kind of data access method, network interface card and storage system
CN108230574A (en) Object storage terminal pickup method and device and electronic equipment
CN104980186B (en) Echo interference removing method and relevant apparatus
CN106339302B (en) The test method and device of client
CN110365811A (en) A kind of MAC address learning method for limiting, device and equipment
CN111598739A (en) Meal taking grid distribution method and device and storage medium
CN107592430A (en) The method and terminal device of a kind of echo cancellor
CN108243115A (en) Message processing method and device
CN102508796A (en) Serial port redirection method and system
CN107231398A (en) Information interacting method and device
CN110300089A (en) Processing method, device, storage medium and the electronic device of target account number
CN108446063A (en) Processing method, device, storage medium and the electronic device of object
CN108235803A (en) Message record merging and displaying method and terminal equipment
CN104346460B (en) Carry out the method, apparatus and browser client of file download
CN109600273A (en) A kind of optimization method and system of UDP message transmission performance
CN105512008B (en) A kind of method and device for obtaining fault message
CN105991627A (en) Data connection establishing method and device
CN105827572A (en) Method and device for inheriting service content of user account
CN105992176B (en) A kind of rubbish short message interception method and device
CN108173950B (en) Data transmission method, device and system, image acquisition equipment and storage medium
CN109670016A (en) Skills tests method and system for speech production in voice dialogue platform
CN106817479A (en) The treating method and apparatus of instant communication information
CN109432799A (en) Electronic building blocks and its control method, control device and storage medium
CN109447750A (en) A kind of server, order processing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 100176 room 502-1, floor 5, building 2, courtyard 10, keguyi street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Patentee after: NEW SINGULARITY INTERNATIONAL TECHNICAL DEVELOPMENT Co.,Ltd.

Address before: 100081, Beijing, Haidian District sorghum Bridge oblique Street No. 34, building 212, room 19

Patentee before: NEW SINGULARITY INTERNATIONAL TECHNICAL DEVELOPMENT Co.,Ltd.