CN104503595A - PS/2 keyboard-mouse switching device - Google Patents
PS/2 keyboard-mouse switching device Download PDFInfo
- Publication number
- CN104503595A CN104503595A CN201410783252.6A CN201410783252A CN104503595A CN 104503595 A CN104503595 A CN 104503595A CN 201410783252 A CN201410783252 A CN 201410783252A CN 104503595 A CN104503595 A CN 104503595A
- Authority
- CN
- China
- Prior art keywords
- keyboard
- mouse
- external
- signal
- main control
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/0202—Constructional details or processes of manufacture of the input device
- G06F3/021—Arrangements integrating additional peripherals in a keyboard, e.g. card or barcode reader, optical scanner
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0354—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of two-dimensional [2D] relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
- G06F3/03541—Mouse/trackball convertible devices, in which the same ball is used to track the 2D relative movement
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/038—Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
一种PS/2键盘鼠标切换装置,涉及计算机领域,解决了现有涉及多个计算机或服务器的场合中每台计算机都需要配备一套键盘、鼠标存在的浪费资源、成本高、空间受限的问题。该装置由外部PS/2键盘输入接口、外部PS/2鼠标输入接口、PS/2键盘信号接收与处理单元、PS/2鼠标信号接收与处理单元、切换控制开关、输出通道指示单元、两个5V电源半导体开关、多个RS232信号输出接口组成。本发明可将外部键盘和外部鼠标的PS/2信号转换为RS232信号,在一定程度上延长了传输距离,配合计算机近端的多个“PS/2键盘鼠标模拟器”使用,实现多台计算机共用一套外部PS/2键盘和外部PS/2鼠标,在任何时候、场合外部PS/2键盘、鼠标断开都不会影响计算机工作,提高了资源利用率,成本低,易实现。
A PS/2 keyboard and mouse switching device, which relates to the field of computers, and solves the problems of wasting resources, high cost, and limited space in which each computer needs to be equipped with a set of keyboards and mice in the existing occasions involving multiple computers or servers. question. The device consists of an external PS/2 keyboard input interface, an external PS/2 mouse input interface, a PS/2 keyboard signal receiving and processing unit, a PS/2 mouse signal receiving and processing unit, a switching control switch, an output channel indicating unit, two Composed of 5V power semiconductor switch and multiple RS232 signal output interfaces. The present invention can convert PS/2 signals of external keyboard and external mouse into RS232 signals, prolong the transmission distance to a certain extent, cooperate with multiple "PS/2 keyboard and mouse simulators" near the computer, and realize multiple computers Share a set of external PS/2 keyboard and external PS/2 mouse, disconnecting the external PS/2 keyboard and mouse at any time and place will not affect the computer work, improves resource utilization, low cost, and easy to implement.
Description
技术领域technical field
本发明涉及计算机技术领域,具体涉及一种PS/2键盘鼠标切换装置。The invention relates to the technical field of computers, in particular to a PS/2 keyboard and mouse switching device.
背景技术Background technique
RS232接口作为个人计算机上的通讯接口之一,是电子工业协会制定的异步传输标准接口,具有传输线少、易于布线等特点。目前通过RS232接口以及通信技术的改进,RS232通信距离已大大增加。As one of the communication interfaces on personal computers, the RS232 interface is an asynchronous transmission standard interface formulated by the Electronics Industry Association. It has the characteristics of less transmission lines and easy wiring. At present, through the improvement of RS232 interface and communication technology, the communication distance of RS232 has been greatly increased.
伴随计算机应用领域的逐步发展以及网络应用的不断增多,很多应用场合中计算机与服务器的数量也不断增加,而对计算机的管理涉及到对每台计算机的操作,尤其是对于BIOS级别的管理,此时如果每台计算机配备一套键盘、鼠标,不仅浪费资源提高了成本,同时在有空间限制的应用中难于实现。With the gradual development of the computer application field and the continuous increase of network applications, the number of computers and servers in many applications is also increasing, and the management of computers involves the operation of each computer, especially for the management of the BIOS level. If each computer is equipped with a set of keyboards and mice, it will not only waste resources and increase costs, but also be difficult to implement in applications with limited space.
发明内容Contents of the invention
为了解决现有涉及多个计算机或服务器的场合中每台计算机都需要配备一套键盘、鼠标存在的浪费资源、成本高、空间受限的问题,本发明提供一种能将外部PS/2键盘信号和外部PS/2鼠标信号分别转换为RS232键盘信号和RS232鼠标信号输出,同时可以配合计算机近端的多个“PS/2键盘鼠标模拟器”使用,实现多台计算机共用一套外部PS/2键盘和外部PS/2鼠标的PS/2键盘鼠标切换装置。In order to solve the existing problems involving multiple computers or servers, each computer needs to be equipped with a set of keyboards, mouse waste of resources, high cost, and limited space, the present invention provides an external PS/2 keyboard Signal and external PS/2 mouse signal are respectively converted to RS232 keyboard signal and RS232 mouse signal output, and can be used with multiple "PS/2 keyboard and mouse simulators" near the computer to realize multiple computers sharing a set of external PS/2 PS/2 keyboard mouse switcher for 2 keyboards and external PS/2 mouse.
本发明为解决技术问题所采用的技术方案如下:The technical scheme that the present invention adopts for solving technical problems is as follows:
本发明的一种PS/2键盘鼠标切换装置,包括:A kind of PS/2 keyboard and mouse switching device of the present invention comprises:
由第一主控芯片和RS232键盘信号输出通道选通芯片组成的PS/2键盘信号接收与处理单元、与第一主控芯片相连的外部PS/2键盘输入接口、分别与第一主控芯片和外部PS/2键盘输入接口相连的一个5V电源半导体开关、由第二主控芯片和RS232鼠标信号输出通道选通芯片组成的PS/2鼠标信号接收与处理单元、与第二主控芯片相连的外部PS/2鼠标输入接口、分别与第二主控芯片和外部PS/2鼠标输入接口相连的另一个5V电源半导体开关、分别与第一主控芯片和第二主控芯片相连的切换控制开关、与切换控制开关相连的输出通道指示单元、多个RS232信号输出接口;每个RS232信号输出接口均与RS232键盘信号输出通道选通芯片和RS232鼠标信号输出通道选通芯片相连;The PS/2 keyboard signal receiving and processing unit composed of the first main control chip and the RS232 keyboard signal output channel gating chip, the external PS/2 keyboard input interface connected with the first main control chip, and the first main control chip respectively A 5V power semiconductor switch connected to the external PS/2 keyboard input interface, a PS/2 mouse signal receiving and processing unit composed of the second main control chip and the RS232 mouse signal output channel gating chip, connected to the second main control chip The external PS/2 mouse input interface, another 5V power semiconductor switch connected to the second main control chip and the external PS/2 mouse input interface, and the switch control switch connected to the first main control chip and the second main control chip respectively A switch, an output channel indicating unit connected to the switching control switch, a plurality of RS232 signal output interfaces; each RS232 signal output interface is connected with the RS232 keyboard signal output channel gating chip and the RS232 mouse signal output channel gating chip;
外部PS/2键盘通过外部PS/2键盘输入接口接入系统,所述第一主控芯片初始化后延时590ms通过控制5V电源半导体开关给外部PS/2键盘供电,模拟计算机释放外部PS/2键盘的时钟线与数据线,读取外部PS/2键盘上传的自检通过指令与设备ID,完成外部PS/2键盘的初始化设置并发送相应命令使能外部PS/2键盘,使其进入正常的工作状态;在触发外部PS/2键盘后,第一主控芯片读取外部PS/2键盘上传的PS/2键盘信号并存储,同时循环检查切换控制开关的状态并判断切换位,通过RS232键盘信号输出通道选通芯片选通相应的RS232信号输出接口同时通过输出通道指示单元进行选通状态指示,第一主控芯片将接收到的PS/2键盘信号进行判断,如果判断为有效的PS/2键盘信号则对其进行编码,加入通信校验字节和数据统计字节后转换为RS232键盘信号发送到该RS232信号输出接口,如果判断为无效的PS/2键盘信号则通过控制5V电源半导体开关给外部PS/2键盘重新上电,重复上述过程直到输出有效的PS/2键盘信号;The external PS/2 keyboard is connected to the system through the external PS/2 keyboard input interface. After the first main control chip is initialized, it delays 590ms to supply power to the external PS/2 keyboard by controlling the 5V power semiconductor switch, and the analog computer releases the external PS/2 keyboard. The clock line and data line of the keyboard, read the self-test uploaded by the external PS/2 keyboard and pass the instruction and device ID, complete the initialization setting of the external PS/2 keyboard and send the corresponding command to enable the external PS/2 keyboard to make it enter the normal state After triggering the external PS/2 keyboard, the first main control chip reads the PS/2 keyboard signal uploaded by the external PS/2 keyboard and stores it. The keyboard signal output channel strobe chip strobes the corresponding RS232 signal output interface and at the same time indicates the strobe status through the output channel indicator unit. The first main control chip judges the received PS/2 keyboard signal. If it is judged to be a valid PS The /2 keyboard signal is encoded, and after adding the communication check byte and data statistics byte, it is converted into an RS232 keyboard signal and sent to the RS232 signal output interface. If it is judged to be an invalid PS/2 keyboard signal, it will be controlled by the 5V power supply. The semiconductor switch powers on the external PS/2 keyboard again, and repeats the above process until a valid PS/2 keyboard signal is output;
外部PS/2鼠标通过外部PS/2鼠标输入接口接入系统,所述第二主控芯片初始化后延时590ms通过控制5V电源半导体开关给外部PS/2鼠标供电,模拟计算机释放外部PS/2鼠标的时钟线与数据线,读取外部PS/2鼠标上传的自检通过指令与设备ID,完成外部PS/2鼠标的初始化设置并发送相应命令使能外部PS/2鼠标,使其进入正常的工作状态;在触发外部PS/2鼠标后,第二主控芯片读取外部PS/2鼠标上传的PS/2鼠标信号并存储,同时循环检查切换控制开关的状态并判断切换位,通过RS232鼠标信号输出通道选通芯片选通相应的RS232信号输出接口同时通过输出通道指示单元进行选通状态指示,第二主控芯片将接收到的PS/2鼠标信号进行判断,如果判断为有效的PS/2鼠标信号则对其进行编码,加入通信校验字节和数据统计字节后转换为RS232鼠标信号发送到该RS232信号输出接口,如果判断为无效的PS/2鼠标信号则通过控制5V电源半导体开关给外部PS/2鼠标重新上电,重复上述过程直到输出有效的PS/2鼠标信号。The external PS/2 mouse is connected to the system through the external PS/2 mouse input interface, and the second main control chip delays 590ms after initialization to supply power to the external PS/2 mouse by controlling the 5V power semiconductor switch, and the analog computer releases the external PS/2 mouse. The clock line and data line of the mouse, read the self-test uploaded by the external PS/2 mouse, pass the command and device ID, complete the initialization setting of the external PS/2 mouse and send the corresponding command to enable the external PS/2 mouse to make it enter the normal state After triggering the external PS/2 mouse, the second main control chip reads the PS/2 mouse signal uploaded by the external PS/2 mouse and stores it. The mouse signal output channel strobe chip strobes the corresponding RS232 signal output interface and at the same time indicates the strobe status through the output channel indicator unit. The second main control chip judges the received PS/2 mouse signal. If it is judged to be a valid PS /2 mouse signal is coded, after adding communication check byte and data statistics byte, it is converted into RS232 mouse signal and sent to the RS232 signal output interface. If it is judged as invalid PS/2 mouse signal, it will be controlled by 5V power supply The semiconductor switch powers on the external PS/2 mouse again, and repeats the above process until an effective PS/2 mouse signal is output.
所述输出通道指示单元由多个LED指示灯组成,多个LED指示灯均与切换控制开关相连,每个LED指示灯对应指示一个RS232信号输出接口。The output channel indication unit is composed of a plurality of LED indicator lights, which are all connected to the switching control switch, and each LED indicator light corresponds to an RS232 signal output interface.
所述第一主控芯片和第二主控芯片均采用微控制器芯片。Both the first main control chip and the second main control chip are microcontroller chips.
所述RS232键盘信号输出通道选通芯片和RS232鼠标信号输出通道选通芯片均采用5V总线开关芯片。Both the RS232 keyboard signal output channel gating chip and the RS232 mouse signal output channel gating chip are 5V bus switch chips.
本发明的有益效果是:本发明的PS/2键盘鼠标切换装置可以将外部键盘和外部鼠标的PS/2信号转换为RS232信号输出,在实现键盘、鼠标切换的同时,使输出信号转换为RS232信号,便于布线与接收,并可在一定程度上延长传输距离。本发明的PS/2键盘鼠标切换装置配合计算机近端的多个“PS/2键盘鼠标模拟器”使用,实现多台计算机共用一套外部PS/2键盘和外部PS/2鼠标,并且任何时候任何场合外部PS/2键盘和外部PS/2鼠标断开都不会影响计算机工作,不仅提高了资源利用率,降低了成本,而且在有空间限制的应用场合操作简单方便,容易实现。本发明的PS/2键盘鼠标切换装置适用于键盘、鼠标需要离计算机相对较远的特殊应用场合。The beneficial effects of the present invention are: the PS/2 keyboard and mouse switching device of the present invention can convert the PS/2 signals of the external keyboard and external mouse into RS232 signal output, and convert the output signal into RS232 signal while realizing the switching of keyboard and mouse. The signal is convenient for wiring and reception, and can extend the transmission distance to a certain extent. The PS/2 keyboard and mouse switching device of the present invention is used in conjunction with a plurality of "PS/2 keyboard and mouse simulators" near the computer, so that multiple computers share a set of external PS/2 keyboards and external PS/2 mice, and at any time Disconnection of the external PS/2 keyboard and external PS/2 mouse in any occasion will not affect the work of the computer, which not only improves resource utilization and reduces costs, but also is simple and convenient to operate and easy to implement in applications with limited space. The PS/2 keyboard and mouse switching device of the present invention is suitable for special application occasions where the keyboard and the mouse need to be relatively far away from the computer.
附图说明Description of drawings
图1为本发明的一种PS/2键盘鼠标切换装置的组成结构框图。FIG. 1 is a structural block diagram of a PS/2 keyboard and mouse switching device of the present invention.
图2为本发明的一种PS/2键盘鼠标切换装置的软件流程示意图。Fig. 2 is a schematic diagram of the software flow of a PS/2 keyboard and mouse switching device of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明作进一步详细说明。The present invention will be described in further detail below in conjunction with the accompanying drawings.
如图1所示,本发明的一种PS/2键盘鼠标切换装置,由外部PS/2键盘输入接口、外部PS/2鼠标输入接口、PS/2键盘信号接收与处理单元、PS/2鼠标信号接收与处理单元、切换控制开关、输出通道指示单元、两个5V电源半导体开关、多个RS232信号输出接口组成。As shown in Figure 1, a kind of PS/2 keyboard and mouse switching device of the present invention, by external PS/2 keyboard input interface, external PS/2 mouse input interface, PS/2 keyboard signal receiving and processing unit, PS/2 mouse It consists of a signal receiving and processing unit, a switching control switch, an output channel indicating unit, two 5V power semiconductor switches, and multiple RS232 signal output interfaces.
PS/2键盘信号接收与处理单元包括第一主控芯片和RS232键盘信号输出通道选通芯片,PS/2鼠标信号接收与处理单元包括第二主控芯片和RS232鼠标信号输出通道选通芯片;输出通道指示单元包括多个LED指示灯,LED指示灯的个数根据RS232信号输出接口的个数而定,每个LED指示灯对应指示一个RS232信号输出接口。The PS/2 keyboard signal receiving and processing unit includes a first main control chip and an RS232 keyboard signal output channel gating chip, and the PS/2 mouse signal receiving and processing unit includes a second main control chip and an RS232 mouse signal output channel gating chip; The output channel indication unit includes a plurality of LED indicator lights. The number of LED indicator lights depends on the number of RS232 signal output interfaces. Each LED indicator light corresponds to an RS232 signal output interface.
外部PS/2键盘与外部PS/2键盘输入接口相连,外部PS/2键盘输入接口与PS/2键盘信号接收与处理单元中的第一主控芯片相连,第一主控芯片与RS232键盘信号输出通道选通芯片相连;外部PS/2鼠标与外部PS/2鼠标输入接口相连,外部PS/2鼠标输入接口与PS/2鼠标信号接收与处理单元中的第二主控芯片相连,第二主控芯片与RS232鼠标信号输出通道选通芯片相连;每个RS232信号输出接口均与RS232键盘信号输出通道选通芯片和RS232鼠标信号输出通道选通芯片相连。The external PS/2 keyboard is connected with the external PS/2 keyboard input interface, the external PS/2 keyboard input interface is connected with the PS/2 keyboard signal receiving and the first main control chip in the processing unit, and the first main control chip is connected with the RS232 keyboard signal The output channel gating chip is connected; the external PS/2 mouse is connected with the external PS/2 mouse input interface, and the external PS/2 mouse input interface is connected with the second main control chip in the PS/2 mouse signal receiving and processing unit, and the second The main control chip is connected with the RS232 mouse signal output channel selection chip; each RS232 signal output interface is connected with the RS232 keyboard signal output channel selection chip and the RS232 mouse signal output channel selection chip.
两个5V电源半导体开关中的一个分别与外部PS/2键盘输入接口和PS/2键盘信号接收与处理单元中第一主控芯片相连,两个5V电源半导体开关中的另一个分别与外部PS/2鼠标输入接口和PS/2鼠标信号接收与处理单元中第二主控芯片相连。One of the two 5V power semiconductor switches is respectively connected to the external PS/2 keyboard input interface and the first main control chip in the PS/2 keyboard signal receiving and processing unit, and the other of the two 5V power semiconductor switches is respectively connected to the external PS The /2 mouse input interface and the PS/2 mouse signal receiver are connected to the second main control chip in the processing unit.
切换控制开关分别与PS/2键盘信号接收与处理单元中的第一主控芯片、PS/2鼠标信号接收与处理单元中的第二主控芯片相连。The switching control switch is respectively connected with the first main control chip in the PS/2 keyboard signal receiving and processing unit and the second main control chip in the PS/2 mouse signal receiving and processing unit.
输出通道指示单元中的多个LED指示灯均与切换控制开关相连。A plurality of LED indicator lights in the output channel indication unit are all connected with the switching control switch.
本实施方式中,PS/2键盘信号接收与处理单元中的第一主控芯片、PS/2鼠标信号接收与处理单元中的第二主控芯片均采用微控制器(MCU)芯片。In this embodiment, the first main control chip in the PS/2 keyboard signal receiving and processing unit and the second main control chip in the PS/2 mouse signal receiving and processing unit all use microcontroller (MCU) chips.
本实施方式中,PS/2键盘信号接收与处理单元中的RS232键盘信号输出通道选通芯片、PS/2鼠标信号接收与处理单元中的RS232鼠标信号输出通道选通芯片均采用5V总线开关芯片。In this embodiment, the RS232 keyboard signal output channel gating chip in the PS/2 keyboard signal receiving and processing unit, and the RS232 mouse signal output channel gating chip in the PS/2 mouse signal receiving and processing unit all use 5V bus switch chips .
如图2所示,上电之后,PS/2键盘信号接收与处理单元中的第一主控芯片初始化后延时590ms通过控制5V电源半导体开关给外部PS/2键盘供电,第一主控芯片模拟计算机通过外部PS/2键盘输入接口对外部PS/2键盘进行初始化与使能操作,释放外部PS/2键盘的时钟线与数据线,同时读取外部PS/2键盘上传的自检通过指令与设备ID,完成外部PS/2键盘的初始化设置并发送相应命令使能外部PS/2键盘,使其进入正常的工作状态;在触发外部PS/2键盘后,第一主控芯片读取外部PS/2键盘上传的PS/2键盘信号并存储,同时循环检查切换控制开关的状态并判断切换位,通过RS232键盘信号输出通道选通芯片选通相应的RS232信号输出接口同时点亮该RS232信号输出接口对应的LED指示灯,此时,第一主控芯片将接收到的PS/2键盘信号进行判断,如果判断为有效的PS/2键盘信号则对其进行编码,加入通信校验字节和数据统计字节后转换为RS232键盘信号通过该RS232信号输出接口输出,在发送之前拉低外部PS/2键盘的时钟线来抑制其通信,并在发送之后释放时钟线,如果判断为无效的PS/2键盘信号则通过控制5V电源半导体开关给外部PS/2键盘重新上电,重复上述过程,直到输出有效的PS/2键盘信号,保证发送给计算机的RS232键盘信号的正确性,输出的RS232键盘信号带有通信校验字节和数据统计字节。As shown in Figure 2, after power-on, the first main control chip in the PS/2 keyboard signal receiving and processing unit initializes and delays 590ms to supply power to the external PS/2 keyboard by controlling the 5V power semiconductor switch, and the first main control chip The analog computer initializes and enables the external PS/2 keyboard through the external PS/2 keyboard input interface, releases the clock line and data line of the external PS/2 keyboard, and reads the self-test pass instruction uploaded by the external PS/2 keyboard and device ID, complete the initial setting of the external PS/2 keyboard and send corresponding commands to enable the external PS/2 keyboard to make it enter the normal working state; after triggering the external PS/2 keyboard, the first main control chip reads the external The PS/2 keyboard signal uploaded by the PS/2 keyboard is stored, and at the same time, the state of the switching control switch is checked cyclically and the switching position is judged. The corresponding RS232 signal output interface is gated through the RS232 keyboard signal output channel strobe chip and the RS232 signal is lit at the same time. The LED indicator corresponding to the output interface. At this time, the first main control chip will judge the received PS/2 keyboard signal. If it is judged to be a valid PS/2 keyboard signal, it will be encoded and added to the communication check byte. And data statistics bytes are converted to RS232 keyboard signals and output through the RS232 signal output interface. Before sending, pull down the clock line of the external PS/2 keyboard to suppress its communication, and release the clock line after sending. If it is judged to be invalid The PS/2 keyboard signal controls the 5V power supply semiconductor switch to power on the external PS/2 keyboard again, and repeats the above process until an effective PS/2 keyboard signal is output to ensure the correctness of the RS232 keyboard signal sent to the computer. RS232 keyboard signal has communication check byte and data statistics byte.
同理,上电之后,PS/2鼠标信号接收与处理单元中的第二主控芯片初始化后延时590ms通过控制5V电源半导体开关给外部PS/2鼠标供电,第二主控芯片模拟计算机通过外部PS/2鼠标输入接口对外部PS/2鼠标进行初始化与使能操作,释放外部PS/2鼠标的时钟线与数据线,同时读取外部PS/2鼠标上传的自检通过指令与设备ID,完成外部PS/2鼠标的初始化设置并发送相应命令使能外部PS/2鼠标,使其进入正常的工作状态;在触发外部PS/2鼠标后,第二主控芯片读取外部PS/2鼠标上传的PS/2鼠标信号并存储,同时循环检查切换控制开关的状态并判断切换位,通过RS232鼠标信号输出通道选通芯片选通相应的RS232信号输出接口同时点亮该RS232信号输出接口对应的LED指示灯,此时,第二主控芯片将接收到的PS/2鼠标信号进行判断,如果判断为有效的PS/2鼠标信号则对其进行编码,加入通信校验字节和数据统计字节后转换为RS232鼠标信号通过该RS232信号输出接口输出,在发送之前拉低外部PS/2鼠标的时钟线来抑制其通信,并在发送之后释放时钟线,如果判断为无效的PS/2鼠标信号则通过控制5V电源半导体开关给外部PS/2鼠标重新上电,重复上述过程,直到输出有效的PS/2鼠标信号,保证发送给计算机的RS232鼠标信号的正确性,输出的RS232鼠标信号带有通信校验字节和数据统计字节。Similarly, after power-on, the second main control chip in the PS/2 mouse signal receiving and processing unit initializes and delays 590ms to supply power to the external PS/2 mouse by controlling the 5V power semiconductor switch, and the second main control chip simulates the computer through The external PS/2 mouse input interface initializes and enables the external PS/2 mouse, releases the clock line and data line of the external PS/2 mouse, and reads the self-test pass command and device ID uploaded by the external PS/2 mouse at the same time , complete the initialization settings of the external PS/2 mouse and send corresponding commands to enable the external PS/2 mouse to enter the normal working state; after triggering the external PS/2 mouse, the second main control chip reads the external PS/2 The PS/2 mouse signal uploaded by the mouse is stored, and at the same time, the status of the switching control switch is checked cyclically and the switching position is judged. The corresponding RS232 signal output interface is gated through the RS232 mouse signal output channel and the corresponding RS232 signal output interface is lit. At this time, the second main control chip will judge the received PS/2 mouse signal, if it is judged to be a valid PS/2 mouse signal, it will be encoded, and the communication check byte and data statistics will be added. After the byte is converted to RS232 mouse signal output through the RS232 signal output interface, pull down the clock line of the external PS/2 mouse to suppress its communication before sending, and release the clock line after sending, if it is judged as invalid PS/2 The mouse signal is to re-power the external PS/2 mouse by controlling the 5V power semiconductor switch, and repeat the above process until an effective PS/2 mouse signal is output to ensure the correctness of the RS232 mouse signal sent to the computer, and the output RS232 mouse signal With communication check bytes and data statistics bytes.
本发明的PS/2键盘鼠标切换装置配合计算机近端的多个“PS/2键盘鼠标模拟器”使用,实现多台计算机共用一套外部PS/2键盘和外部PS/2鼠标,并且任何时候任何场合外部PS/2键盘和外部PS/2鼠标断开都不会影响计算机工作。本发明的PS/2键盘鼠标切换装置中每个RS232信号输出接口分别对应连接一个PS/2键盘鼠标模拟器,PS/2键盘鼠标模拟器可以采用现有技术,PS/2键盘鼠标模拟器用于接收本发明的PS/2键盘鼠标切换装置中RS232信号输出接口输出的RS232键盘信号和RS232鼠标信号,同时将接收到的RS232键盘信号转换成仿真的PS/2键盘信号、将RS232鼠标信号转换成仿真的PS/2鼠标信号输出给对应的计算机。The PS/2 keyboard and mouse switching device of the present invention is used in conjunction with a plurality of "PS/2 keyboard and mouse simulators" near the computer, so that multiple computers share a set of external PS/2 keyboards and external PS/2 mice, and at any time In any case, the disconnection of the external PS/2 keyboard and external PS/2 mouse will not affect the computer work. In the PS/2 keyboard and mouse switching device of the present invention, each RS232 signal output interface is correspondingly connected with a PS/2 keyboard and mouse simulator respectively, and the PS/2 keyboard and mouse simulator can adopt the prior art, and the PS/2 keyboard and mouse simulator is used for Receive the RS232 keyboard signal and the RS232 mouse signal output by the RS232 signal output interface in the PS/2 keyboard and mouse switching device of the present invention, simultaneously convert the received RS232 keyboard signal into an emulated PS/2 keyboard signal, convert the RS232 mouse signal into The simulated PS/2 mouse signal is output to the corresponding computer.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410783252.6A CN104503595A (en) | 2014-12-16 | 2014-12-16 | PS/2 keyboard-mouse switching device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410783252.6A CN104503595A (en) | 2014-12-16 | 2014-12-16 | PS/2 keyboard-mouse switching device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104503595A true CN104503595A (en) | 2015-04-08 |
Family
ID=52944997
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410783252.6A Pending CN104503595A (en) | 2014-12-16 | 2014-12-16 | PS/2 keyboard-mouse switching device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104503595A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115344128A (en) * | 2022-09-08 | 2022-11-15 | 天津津航计算技术研究所 | Multi-host PS/2 keyboard and mouse interface hot switching implementation method based on FPGA |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1677325A (en) * | 2004-03-31 | 2005-10-05 | 联想(北京)有限公司 | Method and device for two-way communication between virtual PS/2 apparatus and host machine |
| CN101634904A (en) * | 2008-07-25 | 2010-01-27 | 宏正自动科技股份有限公司 | Keyboard-screen-mouse switching system, device and signal extension device thereof |
| CN201532612U (en) * | 2009-05-08 | 2010-07-21 | 沈雷 | Controlled end of digital type KVM switcher |
| US7793019B1 (en) * | 2004-08-25 | 2010-09-07 | American Megatrends, Inc. | Redirecting input and output for multiple computers |
| CN202018635U (en) * | 2011-04-02 | 2011-10-26 | 浪潮电子信息产业股份有限公司 | Device capable of realizing switching of PS (personal system)/2 signals in KVM (kernel-based virtual machine) |
-
2014
- 2014-12-16 CN CN201410783252.6A patent/CN104503595A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1677325A (en) * | 2004-03-31 | 2005-10-05 | 联想(北京)有限公司 | Method and device for two-way communication between virtual PS/2 apparatus and host machine |
| US7793019B1 (en) * | 2004-08-25 | 2010-09-07 | American Megatrends, Inc. | Redirecting input and output for multiple computers |
| CN101634904A (en) * | 2008-07-25 | 2010-01-27 | 宏正自动科技股份有限公司 | Keyboard-screen-mouse switching system, device and signal extension device thereof |
| CN201532612U (en) * | 2009-05-08 | 2010-07-21 | 沈雷 | Controlled end of digital type KVM switcher |
| CN202018635U (en) * | 2011-04-02 | 2011-10-26 | 浪潮电子信息产业股份有限公司 | Device capable of realizing switching of PS (personal system)/2 signals in KVM (kernel-based virtual machine) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115344128A (en) * | 2022-09-08 | 2022-11-15 | 天津津航计算技术研究所 | Multi-host PS/2 keyboard and mouse interface hot switching implementation method based on FPGA |
| CN115344128B (en) * | 2022-09-08 | 2024-11-05 | 天津津航计算技术研究所 | Multi-host PS/2 keyboard and mouse interface hot switching implementation method based on FPGA |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN207367115U (en) | A kind of server master board and server based on Feiteng processor | |
| CN104503594A (en) | PS/2 keyboard-mouse remote switching system | |
| CN101303680B (en) | Method and apparatus for expanding multiple serial ports of terminal | |
| CN203930811U (en) | A kind of IO board of supporting NCSI | |
| CN103019368A (en) | Method for intelligently switching local IO (input/output) node and KVM (K virtual machine) module | |
| CN109799933B (en) | Multi-point touch and display system supporting multiple hosts | |
| CN204990234U (en) | Many system control device based on touch -sensitive screen | |
| CN104503595A (en) | PS/2 keyboard-mouse switching device | |
| CN203133754U (en) | KVM board card based on server provided with CPCI framework | |
| CN203166858U (en) | Analog switch cascade structure | |
| CN204462752U (en) | A signal acquisition and processing system | |
| CN203366045U (en) | A digital quantity input-output device based on a CAN bus | |
| CN202677389U (en) | Serial port expansion structure | |
| CN102176589A (en) | Concentrator for universal serial bus (USB)-8 serial port RS422 | |
| CN104503822A (en) | PS/2 keyboard and mouse simulator | |
| CN205942360U (en) | USB bus interface's extensions card based on PCI E structure | |
| CN206022836U (en) | A kind of Signals Transfer Board | |
| CN204189085U (en) | A kind of Novel server computing module | |
| CN205721225U (en) | A kind of electric power data acquisition and communication system | |
| CN216561775U (en) | Equipment system for realizing PC control MCU low-speed IO by using UART | |
| CN208061198U (en) | The connecting line used is cooperateed between slave | |
| CN218243547U (en) | A gateway and industrial equipment | |
| CN104360969A (en) | On-site wireless networking system supporting big data transmission | |
| CN205193738U (en) | Support PS2 and USB double nip keyboard of special function key | |
| CN205051952U (en) | Light control system output interface expanding unit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150408 |