CN104793759A - A Simulation and Monitoring Equipment Based on PS2 Interface Mouse Signal - Google Patents
A Simulation and Monitoring Equipment Based on PS2 Interface Mouse Signal Download PDFInfo
- Publication number
- CN104793759A CN104793759A CN201410020370.1A CN201410020370A CN104793759A CN 104793759 A CN104793759 A CN 104793759A CN 201410020370 A CN201410020370 A CN 201410020370A CN 104793759 A CN104793759 A CN 104793759A
- Authority
- CN
- China
- Prior art keywords
- mouse
- signal
- simulation
- module
- mouse signal
- 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
Links
- 238000004088 simulation Methods 0.000 title claims abstract description 20
- 238000012544 monitoring process Methods 0.000 title description 3
- 230000005540 biological transmission Effects 0.000 claims abstract 3
- 239000011800 void material Substances 0.000 claims description 9
- 238000000034 method Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 claims description 4
- 238000001514 detection method Methods 0.000 claims description 2
- 230000015572 biosynthetic process Effects 0.000 claims 1
- 238000004364 calculation method Methods 0.000 claims 1
- 238000012806 monitoring device Methods 0.000 abstract description 7
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000007474 system interaction Effects 0.000 description 1
Landscapes
- Selective Calling Equipment (AREA)
Abstract
Description
技术领域 technical field
一种PS2接口鼠标信号的多路模拟与监控设备,属于计算机外部设备领域。 The utility model relates to a multi-channel simulation and monitoring device for mouse signals of a PS2 interface, which belongs to the field of computer peripheral devices.
背景技术 Background technique
PS2接口鼠标在各类控制系统中广泛使用,然而这些系统设备制造商没有统一标准,使用的硬件平台也不相同,操作系统的差异较大,通过系统内部实现与其他系统的交互非常困难,因此,需要寻找一种能够与不同厂家生产的各类控制系统交互的办法。 PS2 interface mouse is widely used in various control systems. However, there is no unified standard for these system equipment manufacturers, and the hardware platforms used are also different. The operating systems are quite different. It is very difficult to realize the interaction with other systems through the system. , It is necessary to find a way to interact with various control systems produced by different manufacturers.
发明内容 Contents of the invention
本发明的目的是提供一种能够与不同厂家生产的各类控制系统都能够交互的设备,通过这台设备,任意一台计算机就能够通过鼠标操作其他没有提供系统软件接口的控制系统。 The purpose of the present invention is to provide a device capable of interacting with various control systems produced by different manufacturers. Through this device, any computer can operate other control systems that do not provide system software interfaces through the mouse.
发明内容:一种基于PS2接口鼠标信号的模拟与监控设备,主要包括鼠标信号模拟模块,通信模块,鼠标信号调度模块;通信模块是通过wifi网络无线传输;模拟与监控设备一端通过信号线与控制计算机相连,另一端通过wifi网络与远程控制系统或远程控制设备相连,实现在控制计算机上操作鼠标,就能够对远程控制系统或远程控制设备的操作。 Summary of the invention: a mouse signal simulation and monitoring device based on the PS2 interface, mainly including a mouse signal simulation module, a communication module, and a mouse signal dispatching module; the communication module is wirelessly transmitted through a wifi network; The computer is connected, and the other end is connected to the remote control system or remote control equipment through the wifi network, so that the remote control system or remote control equipment can be operated by operating the mouse on the control computer.
所述的鼠标信号模拟模块内嵌单片机,通过单片机完成RS232串口信号到鼠标信号的转换过程;控制指令部分,鼠标的指令部分根据手工操作鼠标的特点分为按键、移动等几个指令,两者形成一一对应的关系;鼠标信号的输出部分,通过单片机软件模拟成符合PS2协议的信号,这些模拟鼠标信号实际传递到远程控制系统或远程控制设备后,其效果与硬件鼠标效果完全相同,同时该设备能够模拟鼠标对计算机发出的各种控制指令进行响应。 The mouse signal simulation module is embedded with a single-chip microcomputer, and the conversion process from the RS232 serial port signal to the mouse signal is completed by the single-chip microcomputer; the control command part, the mouse command part is divided into several commands such as keystrokes and movement according to the characteristics of the manual mouse operation. Form a one-to-one correspondence relationship; the output part of the mouse signal is simulated by the single-chip computer software into a signal conforming to the PS2 protocol. After these simulated mouse signals are actually transmitted to the remote control system or remote control device, the effect is exactly the same as that of the hardware mouse. The device can simulate a mouse to respond to various control commands issued by the computer.
通信模块中设有STM32芯片,首先系统调用STM32芯片的初始化函数System_Initialization(void),初始化通信模块,同时开放USART1,Wi-Fi 与STM32 之间通过USART1相连,并在函数UART_Configuration(void)中设置波特率、中断类型等;然后调用函数void WI-FISetNetPara(IN unsigned char cPb, IN struct NetParaBuffer*cNetParaBuffer, IN unsigned char AckFlag)中的函数SendDataToWi-Fi 通过USART1将参数传递给 Wi-Fi 模块,实现数据的发送;其中cPb 为组号,AckFlag 代表配置成功后是否返回ACK,1 返回,0 不返回。 There is an STM32 chip in the communication module. First, the system calls the initialization function System_Initialization(void) of the STM32 chip to initialize the communication module. At the same time, USART1 is opened. Wi-Fi and STM32 are connected through USART1, and the waveform is set in the function UART_Configuration(void). Baud rate, interrupt type, etc.; then call the function SendDataToWi-Fi in the function void WI-FISetNetPara(IN unsigned char cPb, IN struct NetParaBuffer*cNetParaBuffer, IN unsigned char AckFlag) to pass the parameters to the Wi-Fi module through USART1 to realize data where cPb is the group number, AckFlag represents whether to return ACK after the configuration is successful, 1 is returned, 0 is not returned.
鼠标信号调度模块,接收到的无线数据在传输到主机过程中,可能会与计算机自带的鼠标信号发生冲突,为了避免信号发生冲突,在信号发送到主机之前,先检测信号的摆动值是否超过一定的门限值,若没有,则传输数据;若超过了门限值,则说明发生碰撞,再判断经无线接收的数据和自带鼠标的信号的优先级,优先级高的则先发送,优先级低的则等待。 The mouse signal scheduling module, the received wireless data may conflict with the mouse signal of the computer when it is transmitted to the host. In order to avoid signal conflicts, before the signal is sent to the host, first detect whether the signal swing value exceeds A certain threshold value, if not, then transmit data; if it exceeds the threshold value, it means a collision occurs, and then judge the priority of the data received by wireless and the signal with the mouse, the priority is sent first, Those with lower priority wait.
有益效果Beneficial effect
1、通过基于PS2接口鼠标信号的模拟与监控设备,能够与不同厂家生产的各类远程控制系统或远程控制设备实现交互,因此,任意一台计算机通过这台设备,就能够通过鼠标操作其他没有提供系统软件接口的远程控制系统或远程控制设备。 1. Through the simulation and monitoring equipment based on the mouse signal of the PS2 interface, it can interact with various remote control systems or remote control equipment produced by different manufacturers. Therefore, any computer can use the mouse to operate other unavailable A remote control system or remote control device that provides a system software interface.
附图说明 Description of drawings
图1是数据发射端流程图; Fig. 1 is a flow chart of the data transmitter;
图2是数据接收与检测的流程图; Fig. 2 is a flowchart of data receiving and detection;
图3是设备工作的总体结构; Fig. 3 is the overall structure of equipment work;
图4是接收端的电路结构图。 Figure 4 is a circuit diagram of the receiving end.
具体实施方式 Detailed ways
如图1到图4所示,一种基于PS2接口鼠标信号的模拟与监控设备,主要包括鼠标信号模拟模块,通信模块,鼠标信号调度模块;通信模块是通过wifi网络无线传输;模拟与监控设备一端通过信号线与控制计算机相连,另一端通过wifi网络与远程控制系统或远程控制设备相连,实现在控制计算机上操作鼠标,就能够对远程控制系统或远程控制设备的操作。 As shown in Figures 1 to 4, a simulation and monitoring device based on PS2 interface mouse signals mainly includes a mouse signal simulation module, a communication module, and a mouse signal dispatching module; the communication module is wirelessly transmitted through a wifi network; the simulation and monitoring device One end is connected to the control computer through the signal line, and the other end is connected to the remote control system or remote control equipment through the wifi network, so that the remote control system or remote control equipment can be operated by operating the mouse on the control computer.
由于远程控制系统或远程控制设备一般都具有标准IO接口,因此,基于PS2接口鼠标信号的模拟与监控设备将来自于控制计算机的标准鼠标信号转换成这些远程控制系统或远程控制设备能够识别的信号,再传递给远程控制系统或远程控制设备,就能够实现系统交互。 Since remote control systems or remote control devices generally have standard IO interfaces, the simulation and monitoring equipment based on PS2 interface mouse signals convert the standard mouse signals from the control computer into signals that these remote control systems or remote control devices can recognize , and then passed to the remote control system or remote control equipment, system interaction can be realized.
所述的鼠标信号模拟模块内嵌单片机,通过单片机完成RS232串口信号到鼠标信号的转换过程;控制指令部分,鼠标的指令部分根据手工操作鼠标的特点分为按键、移动等几个指令,两者形成一一对应的关系;鼠标信号的输出部分,通过单片机软件模拟成符合PS2协议的信号,这些模拟鼠标信号实际传递到远程控制系统或远程控制设备后,其效果与硬件鼠标效果完全相同,同时该设备能够模拟鼠标对计算机发出的各种控制指令进行响应。 The mouse signal simulation module is embedded with a single-chip microcomputer, and the conversion process from the RS232 serial port signal to the mouse signal is completed by the single-chip microcomputer; the control command part, the mouse command part is divided into several commands such as keystrokes and movement according to the characteristics of the manual mouse operation. Form a one-to-one correspondence relationship; the output part of the mouse signal is simulated by the single-chip computer software into a signal conforming to the PS2 protocol. After these simulated mouse signals are actually transmitted to the remote control system or remote control device, the effect is exactly the same as that of the hardware mouse. The device can simulate a mouse to respond to various control commands issued by the computer.
通信模块中设有STM32芯片,首先系统调用STM32芯片的初始化函数System_Initialization(void),初始化通信模块,同时开放USART1,Wi-Fi 与STM32 之间通过USART1相连,并在函数UART_Configuration(void)中设置波特率、中断类型等;然后调用函数void WI-FISetNetPara(IN unsigned char cPb, IN struct NetParaBuffer*cNetParaBuffer, IN unsigned char AckFlag)中的函数SendDataToWi-Fi 通过USART1将参数传递给 Wi-Fi 模块,实现数据的发送;其中cPb 为组号,AckFlag 代表配置成功后是否返回ACK,1 返回,0 不返回。 There is an STM32 chip in the communication module. First, the system calls the initialization function System_Initialization(void) of the STM32 chip to initialize the communication module. At the same time, USART1 is opened. Wi-Fi and STM32 are connected through USART1, and the waveform is set in the function UART_Configuration(void). Baud rate, interrupt type, etc.; then call the function SendDataToWi-Fi in the function void WI-FISetNetPara(IN unsigned char cPb, IN struct NetParaBuffer*cNetParaBuffer, IN unsigned char AckFlag) to pass the parameters to the Wi-Fi module through USART1 to realize data where cPb is the group number, AckFlag represents whether to return ACK after the configuration is successful, 1 is returned, 0 is not returned.
鼠标信号调度模块,接收到的无线数据在传输到主机过程中,可能会与计算机自带的鼠标信号发生冲突,为了避免信号发生冲突,在信号发送到主机之前,先检测信号的摆动值是否超过一定的门限值,若没有,则传输数据;若超过了门限值,则说明发生碰撞,再判断经无线接收的数据和自带鼠标的信号的优先级,优先级高的则先发送,优先级低的则等待。 The mouse signal scheduling module, the received wireless data may conflict with the mouse signal of the computer when it is transmitted to the host. In order to avoid signal conflicts, before the signal is sent to the host, first detect whether the signal swing value exceeds A certain threshold value, if not, then transmit data; if it exceeds the threshold value, it means a collision occurs, and then judge the priority of the data received by wireless and the signal with the mouse, the priority is sent first, Those with lower priority wait.
上述实施例仅是用来说明解释本发明的用途,而并非是对本发明的限制,本技术领域的普通技术人员,在本发明的实质范围内,做出各种变化或替代,也应属于本发明的保护范畴。 The above-mentioned embodiments are only used to illustrate and explain the purpose of the present invention, rather than to limit the present invention. Those of ordinary skill in the art may make various changes or substitutions within the essential scope of the present invention, which shall also belong to the present invention. scope of protection for inventions.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410020370.1A CN104793759A (en) | 2014-01-17 | 2014-01-17 | A Simulation and Monitoring Equipment Based on PS2 Interface Mouse Signal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410020370.1A CN104793759A (en) | 2014-01-17 | 2014-01-17 | A Simulation and Monitoring Equipment Based on PS2 Interface Mouse Signal |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104793759A true CN104793759A (en) | 2015-07-22 |
Family
ID=53558628
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410020370.1A Pending CN104793759A (en) | 2014-01-17 | 2014-01-17 | A Simulation and Monitoring Equipment Based on PS2 Interface Mouse Signal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104793759A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106445200A (en) * | 2016-08-25 | 2017-02-22 | 武汉科技大学 | Sound control mouse and control method thereof |
| CN106445201A (en) * | 2016-08-25 | 2017-02-22 | 武汉科技大学 | Sound control mouse and control method thereof |
| CN107748626A (en) * | 2017-10-31 | 2018-03-02 | 北京计算机技术及应用研究所 | The switching of PS/2 keyboard and mouses and monitoring device based on programmable system on chip |
| CN110012117A (en) * | 2019-05-08 | 2019-07-12 | 润电能源科学技术有限公司 | A kind of method remotely controlled, system and control equipment |
| CN110213013A (en) * | 2018-02-28 | 2019-09-06 | 中航光电科技股份有限公司 | A kind of telecommunication system and method based on PS/2 interface |
-
2014
- 2014-01-17 CN CN201410020370.1A patent/CN104793759A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106445200A (en) * | 2016-08-25 | 2017-02-22 | 武汉科技大学 | Sound control mouse and control method thereof |
| CN106445201A (en) * | 2016-08-25 | 2017-02-22 | 武汉科技大学 | Sound control mouse and control method thereof |
| CN107748626A (en) * | 2017-10-31 | 2018-03-02 | 北京计算机技术及应用研究所 | The switching of PS/2 keyboard and mouses and monitoring device based on programmable system on chip |
| CN110213013A (en) * | 2018-02-28 | 2019-09-06 | 中航光电科技股份有限公司 | A kind of telecommunication system and method based on PS/2 interface |
| CN110012117A (en) * | 2019-05-08 | 2019-07-12 | 润电能源科学技术有限公司 | A kind of method remotely controlled, system and control equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102281254B (en) | Server serial port design system and method | |
| CN105005280B (en) | A kind of industrial equipment man-machine interactive system and its control method based on intelligent wireless terminal | |
| CN104793759A (en) | A Simulation and Monitoring Equipment Based on PS2 Interface Mouse Signal | |
| TWI473473B (en) | Sequence data transmission system, method and recording medium thereof | |
| CN103332600B (en) | Fieldbus Based tower crane embedded intelligent monitoring system | |
| CN204823537U (en) | Elevator debug system based on wi -Fi communication and smart mobile phone | |
| CN102279827A (en) | Multifunctional communication transit box | |
| CN104834260A (en) | Double-channel CAN bus controller based on frequency conversion control and double-CAN arbitration method | |
| CN104511903A (en) | Robot remote control system and method | |
| CN105653461A (en) | System for converting single USB interface into plurality of UART debugging interfaces | |
| CN102445981B (en) | Data transmission system and data transmission method | |
| CN103823775A (en) | Serial port and Internet port smart converter | |
| JP2014003395A5 (en) | Remote operation controller, apparatus remote operation system, and apparatus remote operation method | |
| CN101763324A (en) | Method for realizing equipment simulating and device thereof | |
| CN203537414U (en) | Communication protocol conversion device based on embedded multi micro-control units | |
| CN203324982U (en) | Wireless communication system between field bus and field terminal equipment | |
| CN203276264U (en) | Equipment for conversion from UART interface to USB dual mode interface | |
| CN204089768U (en) | RS485 automatic reversing circuit | |
| CN201163783Y (en) | A Multi-serial Port Card Based on CAN Bus | |
| CN203084510U (en) | Remote control system for CNC (Computerized Numerical Control) machine tool operation panel | |
| CN204065790U (en) | A kind of wireless teaching control device | |
| CN104199379A (en) | PLC monitoring system based on mobile phone GPRS platform | |
| CN202916668U (en) | Injection molding machine separate HMI controller and injection molding machine control system based on Android system | |
| CN104898616A (en) | Portable power monitoring device | |
| CN202929435U (en) | RS232/RS485 monitoring system based on COM serial port of TPC1063K industrial computer |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150722 |
|
| WD01 | Invention patent application deemed withdrawn after publication |