CN102325017A - Communication speed adaption method for ball machine - Google Patents

Communication speed adaption method for ball machine Download PDF

Info

Publication number
CN102325017A
CN102325017A CN201110262251A CN201110262251A CN102325017A CN 102325017 A CN102325017 A CN 102325017A CN 201110262251 A CN201110262251 A CN 201110262251A CN 201110262251 A CN201110262251 A CN 201110262251A CN 102325017 A CN102325017 A CN 102325017A
Authority
CN
China
Prior art keywords
baud rate
ball machine
signal
microprocessor
communication speed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201110262251A
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.)
TIANJIN HUISUN TECH Co Ltd
Original Assignee
TIANJIN HUISUN TECH 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 TIANJIN HUISUN TECH Co Ltd filed Critical TIANJIN HUISUN TECH Co Ltd
Priority to CN201110262251A priority Critical patent/CN102325017A/en
Publication of CN102325017A publication Critical patent/CN102325017A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a communication speed adaption method for a ball machine. The method comprises the following steps: a 485 level signal is converted into a TTL (Transistor-Transistor Logic) level signal through a 485 chip; a pulse width capture unit generates capture response when the input TTL level signal is in a failing edge, a numerical value of a timer is stored into a designated register, and an interrupt signal is generated; a microprocessor answers the interrupt signal, and reads numerical numbers of the timer and marks the numbers to be t1 to tn in sequence; the time interval among the failing edges is calculated, and a minimum value is found out from the time intervals; Tmin is different regarding different communication speeds, so that the Baud rate of a received communication signal can be determined by the Tmin; and the microprocessor sets the internal UART (Universal Asynchronous Receiver Transmitter) Baud rate, so that the internal UART Baud rate is in accordance with the Baud rate of the received control signal, when a system changes the Baud rate of the communication circuit, the ball machines can automatically detect the communication speed of the received control signal and regulate the own communication speed to be in accordance with that of the system. Therefore, the hardware of the site ball machine is avoided setting, and more flexibility is brought to site construction debugging, and labor cost is effectively reduced.

Description

The communication speed adaptive approach that is used for the ball machine
Technical field
The present invention relates to the intelligent video monitoring technical field, particularly a kind of communication speed adaptive approach that is used for the ball machine,
Be applied to safety monitoring, infrared ball monopod video camera and intelligent sphere monopod video camera.
Background technology
In safety defense monitoring system construction or escalation process, run into the situation of changing 485 communication line baud rates through regular meeting, general ball machine need be adjusted communication baud rate through the dial-up that equipment itself is set.This operation is relatively easy for placing indoor master control or memory device, and for being installed to the on-the-spot ball machine of monitoring, because the particularity of its operational environment, difficulty is compared in this set operation sometimes.Therefore, show important for the communication speed adaptive approach application of ball machine is just outstanding.
Summary of the invention
The object of the invention is exactly the deficiency that exists to prior art, to the problems referred to above, considers that monitoring is on-the-spot through the existing difficulty of hardware setting change ball machine baud rate; A kind of communication baud rate adaptive technique scheme is provided; Make the ball machine increase the communication baud rate adaptation function, promptly the ball machine can detect the baud rate of 485 communication lines automatically, when the communication system baud rate changes; The ball chance is adjusted self communication speed automatically, keeps consistent with whole system.
The present invention realizes through such technical scheme: be used for the communication speed adaptive approach of ball machine, it is characterized in that, said method comprises the steps:
A, microprocessor and 485 chips are constituted hardware circuit be connected to the ball machine circuit; 485 level signals that transmit ball machine circuit control end through 485 chips convert the discernible Transistor-Transistor Logic level signal of microprocessor into, and the Transistor-Transistor Logic level signal is transferred to the UART module and the pulsewidth capture unit of microprocessor internal simultaneously;
B, when the Transistor-Transistor Logic level signal of input when being in trailing edge; The pulsewidth capture unit produces catches response, and the timer count value was stored and specified in the register this moment, and produced interrupt signal; The microprocessor responds interrupt signal reads the timer count value and is labeled as t successively 1To t n
C, calculate the time interval between each trailing edge: T 1=t 2-t 1, T 2=t 3-t 2... T N-1=t n-t N-1; And therefrom find out minimum value: T Min=min{ T 1, T 2T N-1; For different communication speed T MinDifference therefore can be according to the T that obtains MinThe baud rate of the communication signal of confirming to receive;
D, microprocessor are provided with the baud rate of inner UART module, and the baud rate of the communication signal of the ball machine circuit that makes it and receive is consistent.
Beneficial effect: safety defense monitoring system is when changing the communication line baud rate, and the communication speed that the ball machine can detect the communication speed of the control signal that receives automatically and adjust self makes it consistent with whole system; Thereby avoided on-the-spot ball machine hardware is provided with, brought very big flexibility, and effectively reduced because the paying of the human cost that change communication line baud rate is brought to site operation debugging.
Description of drawings
Fig. 1, be used for the communication speed adaptive circuit structure chart of ball machine;
Fig. 2, Transistor-Transistor Logic level signal timing diagram.
Embodiment
Understand the present invention for clearer, describe the present invention in detail in conjunction with accompanying drawing and embodiment:
As shown in Figure 1: that microprocessor and 485 chips formation hardware circuit are connected to ball machine main circuit; As shown in Figure 2: Transistor-Transistor Logic level signal sequence, the time interval T between each trailing edge 1=t 2-t 1, T 2=t 3-t 2... T N-1=t n-t N-1; Minimum value T Min=min{ T 1, T 2T N-1; For different communication speed T MinDifference therefore can be according to the T that obtains MinThe baud rate of the communication signal of confirming to receive.
According to above-mentioned explanation, can realize scheme of the present invention in conjunction with art technology.

Claims (1)

1. be used for the communication speed adaptive approach of ball machine, it is characterized in that, said method comprises the steps:
A, microprocessor and 485 chips are constituted hardware circuit be connected to the ball machine circuit; 485 level signals that transmit ball machine circuit control end through 485 chips convert the discernible Transistor-Transistor Logic level signal of microprocessor into, and the Transistor-Transistor Logic level signal is transferred to the UART module and the pulsewidth capture unit of microprocessor internal simultaneously;
B, when the Transistor-Transistor Logic level signal of input when being in trailing edge; The pulsewidth capture unit produces catches response, and the timer count value was stored and specified in the register this moment, and produced interrupt signal; The microprocessor responds interrupt signal reads the timer count value and is labeled as t successively 1To t n
C, calculate the time interval between each trailing edge: T 1=t 2-t 1, T 2=t 3-t 2... T N-1=t n-t N-1; And therefrom find out minimum value: T Min=min{ T 1, T 2T N-1; For different communication speed T MinDifference therefore can be according to the T that obtains MinThe baud rate of the communication signal of confirming to receive;
D, microprocessor are provided with the baud rate of inner UART module, and the baud rate of the communication signal of the ball machine circuit that makes it and receive is consistent.
CN201110262251A 2011-09-06 2011-09-06 Communication speed adaption method for ball machine Pending CN102325017A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110262251A CN102325017A (en) 2011-09-06 2011-09-06 Communication speed adaption method for ball machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110262251A CN102325017A (en) 2011-09-06 2011-09-06 Communication speed adaption method for ball machine

Publications (1)

Publication Number Publication Date
CN102325017A true CN102325017A (en) 2012-01-18

Family

ID=45452692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110262251A Pending CN102325017A (en) 2011-09-06 2011-09-06 Communication speed adaption method for ball machine

Country Status (1)

Country Link
CN (1) CN102325017A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559164A (en) * 2013-11-05 2014-02-05 深圳市科曼医疗设备有限公司 Method and device for identifying serial port baud rate
CN105512068A (en) * 2015-11-27 2016-04-20 宁波三星医疗电气股份有限公司 UART simulation method achieving baud-rate self-adoption
CN108966251A (en) * 2018-07-12 2018-12-07 四川虹美智能科技有限公司 A kind of WiFi module baud rate collocation method, system and WiFi module

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848186A (en) * 2005-04-05 2006-10-18 北京国通创安信息技术有限公司 Video-frequency networking monitoring alarm and video networking monitoring system
CN201191371Y (en) * 2008-02-27 2009-02-04 武汉弗莱戈尔智能电子有限公司 Remote intelligent measuring and controlling instrument
CN201682520U (en) * 2010-05-11 2010-12-22 上海海事大学 Device for conversion of Ethernet to DMX512 network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848186A (en) * 2005-04-05 2006-10-18 北京国通创安信息技术有限公司 Video-frequency networking monitoring alarm and video networking monitoring system
CN201191371Y (en) * 2008-02-27 2009-02-04 武汉弗莱戈尔智能电子有限公司 Remote intelligent measuring and controlling instrument
CN201682520U (en) * 2010-05-11 2010-12-22 上海海事大学 Device for conversion of Ethernet to DMX512 network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《探测与控制学报》 20110228 方利缘 等 "基于迭代和修正的波特率自适应算法" 第33卷, 第1期 *
方利缘 等: ""基于迭代和修正的波特率自适应算法"", 《探测与控制学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559164A (en) * 2013-11-05 2014-02-05 深圳市科曼医疗设备有限公司 Method and device for identifying serial port baud rate
CN105512068A (en) * 2015-11-27 2016-04-20 宁波三星医疗电气股份有限公司 UART simulation method achieving baud-rate self-adoption
CN108966251A (en) * 2018-07-12 2018-12-07 四川虹美智能科技有限公司 A kind of WiFi module baud rate collocation method, system and WiFi module

Similar Documents

Publication Publication Date Title
CN102055633B (en) Satellite-borne double-CAN (Controller Area Network) bus node failure self-restoration system
CN102830247A (en) Method and device for detecting rotation state of rotation part
JP6372572B2 (en) Encoder system and sensor system
CN102325017A (en) Communication speed adaption method for ball machine
WO2007113766A2 (en) Method and system for i2c clock generation
WO2011146400A3 (en) Method and apparatus for implementing non-blocking priority based flow control
US10356494B2 (en) Wireless sensor system with dynamic heartbeat message rate
CN105824275B (en) A kind of method that slave station servo-driver is controlled to synchronize main website
CN104317762A (en) Method for adaptively controlling transmitting and receiving directions of RS485 chip by aid of FPGA (field programmable gate array)
JP5562502B1 (en) Control and monitoring signal transmission system
CN105426171A (en) Synchronization and switching method and system for multiple two-out-of-two systems
CN105807886A (en) Chip arousing system, chip arousing method and mobile terminal
JP2012243162A5 (en)
TW201510733A (en) Electronic device and method for reducing power consumption of electronic device
CN102647268B (en) Semi-duplex communication transmitting-receivicontrol control device and method thereof
CN106031077B (en) The method for avoiding unnecessarily switching TX/RX selection signal between frames
CN104503935A (en) IIC control device and control method capable of accurately controlling time sequence
EP2150000A3 (en) Optical communication device, optical communication system, optical output control method and program.
KR102495030B1 (en) A receiving apparatus for recovering clock failure and transmission system including the same
JP2009105549A (en) Communication apparatus and communication system
CN103577368B (en) A kind of IIC communication extension method and device based on SPI protocol
CN101526800A (en) Method and system for transmitting a plurality of parameters by utilizing multicycle PWM signals
CN105527918A (en) Method for realizing one-way single-wire communication between two PLCs through I/O port
CN112202573B (en) Two-wire system power supply and networking communication system
EP2674871A3 (en) Electronic systems, slave electronic devices and signal transmission methods

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120118