Background technology
At present, the equipment room technology of carrying out low coverage wireless transmission or control mainly contains Bluetooth, WAPI, Wi-Fi, NFC, Zigbee, Wireless USB, Wireless 1394 and IrDA etc.Wherein economic way is IrDA infrared transmission and control mode.Infrared technology is to utilize the near infrared ray between wavelength 0.76 μ m~1.5 μ m to transmit control signal, and the infrared communication process mainly comprises infrared emission and two processes of infrared reception.To reduce error probability, carrier frequency is between 30kHZ-60kHZ through ovennodulation for the signal demand of infrared transmission.Infra-red code method commonly used has NEC, Philips, Sony, Sharp, Panasonic, Nokia etc. several, different agreement based on technology mainly to be divided into " transform coding ", " space coding ", " pulse code " etc. several.Infra-red remote control is used for equipment such as TV, set-top box, air-conditioning more, and application on computers is fewer.But at hotel industry, the popular in the world small-size computer that utilizes connects televisor.By the powerful processing power of computing machine, the service quality in hotel is got a promotion.Existing computer infrared remote control apparatus and method all are based on traditional infrared remote coding method, its address code and numeric data code all are 8bit usually, thereby the problem that existing computer infrared remote control apparatus and method mainly exist is: the address code extendability is not strong, causes address code to repeat easily and causes the mutual interference of infrared remote-controlled signal phase, produces misoperation.The numeric data code extendability is not strong, 3C merges today Infrared Transmission equipment except transmission simple key-press information, in concrete the application, may also to transmit information such as state such as date, time, temperature, geographic position, existing infra-red code method code capacity extendability is not strong, can't transmit more data.
Summary of the invention
The objective of the invention is in order to solve existing computer infrared remote control its address code of system and the not strong defective of numeric data code dilatancy, proposed a kind of computer infrared remote control system.
In order to realize purpose of the present invention, the technical scheme of computer infrared remote control of the present invention system is:
A kind of computer infrared remote control system, comprise infrared signal transmitting terminal, infrared signal receiving end and computing machine, it is characterized in that, telepilot and infrared remote receiver are wireless connections, the employing infrared signal communicates, and connects and realization communication by USB interface between infrared remote receiver and the small-size computer; The infrared signal of described infrared signal transmitting terminal emission comprise full code and two kinds of forms of duplication code, described full code is by preamble code, numeric data code, address code and data address check code are formed, described data address check code is made up of the radix-minus-one complement of address code and numeric data code, preamble code is 8ms and free time to be that the pulse signal of 4ms is represented by the pulsewidth time, numeric data code and address code constitute by the information of 12bit, the information of each bit is that binary logical zero or logical one are represented, logical zero is 320us by the pulsewidth time, cycle is that the pulse signal of 1ms is represented, logical one is 320us by the pulsewidth time, cycle is that the pulse signal of 2ms is represented, the transmission cycle of described full code is 110ms; Described duplication code is 8ms and free time to be that the pulse signal of 2ms represents that the transmission cycle of described duplication code is 110ms by the pulsewidth time.
Above-mentioned a kind of computer infrared remote control system is characterized in that also comprise server, described server is connected with small-size computer with the broadband network interface by the internet.
The invention has the beneficial effects as follows: by the address code of expansion infrared remote-controlled signal full code and the coding figure place of numeric data code, it is expanded to 12bit by 8bit, make its data capacity increase by 16 times, the conflict of different remote control equipment address codes and mutual interference have mutually been avoided, the increase of numeric data code simultaneously, the complex operations process that has adapted to computing machine again makes household electrical appliances, integrated the obtaining of computer operation implement.
Description of drawings
Fig. 1 is a computer infrared remote control of the present invention system.
Fig. 2 is the hardware principle synoptic diagram of infrared signal transmitting terminal of the present invention and receiving end.
Fig. 3 is the hardware structure diagram of infrared signal transmitting terminal of the present invention.
Fig. 4 is the pulse code synoptic diagram of full code of the present invention.
The pulse code synoptic diagram of the preamble code of Fig. 5 full code of the present invention.
Fig. 6 is the pulse code synoptic diagram of logical zero of the present invention and logical one.
The pulse code synoptic diagram of the preamble code of Fig. 7 full code of the present invention, numeric data code and address code.
Fig. 8 is the pulse code synoptic diagram of duplication code of the present invention.
Fig. 9 is the transmission synoptic diagram of full code of the present invention and duplication code.
Figure 10 is a main flow chart of the present invention.
Figure 11 is the USB catenation principle figure of infrared signal receiving end of the present invention and computing machine.
Figure 12 is the decoding process figure of infrared signal receiving end of the present invention.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments.
Be illustrated in figure 1 as computer infrared remote control of the present invention system, in this system, mainly comprise infrared signal transmitting terminal (as telepilot), infrared signal receiving end (as infrared remote receiver, infrared adapter) and computing machine (as small-size computer) composition, telepilot and infrared remote receiver are wireless connections, the employing infrared signal communicates, and connects and realization communication by USB interface between infrared remote receiver and the small-size computer.Expansion as native system, televisor and server have also been comprised, televisor is connected with small-size computer by looking tone frequency channel wire, display device as small-size computer, server is made up of Portal server, movie and video programs server, game server, and is connected with small-size computer with the broadband network interface by the internet.Said system can be applied in hotel industry, as with in the hotel room after telepilot, infrared remote receiver, small-size computer and the televisor, server is placed the server room, just realized communicating by letter of telepilot and TV, computer network, infrared remote receiver inserts small-size computer by USB interface, and computer booting is visited remote server after moving corresponding software automatically automatically.The user can be by Infrared remote controller control computer visit remote server browser server content, carry out that video display are watched, online game fight etc.Because this system has more operational motion, thereby the coded format of original infrared remote control do not re-use, and need expand the coded format of infrared remote control.
As shown in Figures 2 and 3, general infrared remote control system is formed by transmitting and receiving the two large divisions.Application coding/decoding dedicated IC chip carries out control operation as the Code And Decode processor of system, and the infrared signal transmitting terminal comprises keyboard matrix, coded modulation, LED infrared transmitter; The infrared signal receiving end comprises light, electric switching amplifier, demodulation, decoding circuit.By after the PWM modulation, 38kHz pulse and I/O emission output through U1 with door, after the output modulated wave is amplified by triode Q1, thereby driving TSAL6200 infrarede emitting diode obtains the remote-control transmitting signal.
The infrared signal transmitting terminal of aforementioned calculation machine infrared remote control system can send out two kinds of infrared remote-controlled signals, and a kind of is full code, after pressing certain button, send the control signal corresponding with this button, a kind of is duplication code, and when pressing certain button, expression repeats to send full code always.
Fig. 4, Fig. 5, Fig. 6, show the form of full code of the present invention with Fig. 7 and Fig. 9, described full code is by preamble code, numeric data code, address code and data address check code are formed, described data address check code is made up of the radix-minus-one complement of address code and numeric data code, preamble code is 8ms and free time to be that the pulse signal of 4ms is represented by the pulsewidth time, numeric data code and address code constitute by the information of 12bit, the information of each bit is that binary logical zero or logical one are represented, logical zero is 320us by the pulsewidth time, cycle is that the pulse signal of 1ms is represented, logical one is 320us by the pulsewidth time, cycle is that the pulse signal of 2ms is represented, the transmission cycle of described full code is 110ms; Repeat to transmit an instruction after having transmitted address code and numeric data code 40ms, wherein address code is with original regular transmission, and command code adopts the radix-minus-one complement mode to transmit, and address code that repeats to transmit and numeric data code are the data address check code.The numeric data code of full code is made up of 4bit high position data sign indicating number and 8bit low data sign indicating number, and the address code of full code is made up of 4bit high address sign indicating number and 8bit low order address sign indicating number.
Fig. 8 and Fig. 9 show the form of duplication code of the present invention, and described duplication code is 8ms and free time to be that the pulse signal of 2ms represents that the transmission cycle of described duplication code is 110ms by the pulsewidth time.
As shown in figure 10, for being applied to the method for infrared remote control of computer of aforementioned calculation machine infrared remote control system.Comprise step: the S1. initialization: at first I/O port, timer, the counter to the computer infrared remote control system carries out initialization zero clearing and set and makes it enter emission state;
S2. keyboard scan: carry out key scan by the keyboard scan program;
S3. send the infrared remote-controlled signal of full code: if scanning sequence scans button and is pressed, promptly call the infrared remote-controlled signal that the encoded radio that presets in the storer sends the full code of this button correspondence, described full code is by preamble code, numeric data code, address code and data address check code are formed, described data address check code is made up of the radix-minus-one complement of address code and numeric data code, preamble code is 8ms and free time to be that the pulse signal of 4ms is represented by the pulsewidth time, numeric data code and address code constitute by the information of 12bit, the information of each bit is that binary logical zero or logical one are represented, logical zero is 320us by the pulsewidth time, cycle is that the pulse signal of 1ms is represented, logical one is 320us by the pulsewidth time, cycle is that the pulse signal of 2ms is represented, the transmission cycle of described full code is 110ms;
S4. judge whether to send the infrared remote-controlled signal of duplication code: check whether button is released, discharged and surpassed 0.1s release time as button and can reenter step S2 and carry out keyboard scan, do not discharge and then send the infrared remote-controlled signal of duplication code above 0.25s as button, described duplication code is 8ms and free time to be that the pulse signal of 2ms represents that the transmission cycle of described duplication code is 110ms by the pulsewidth time.
As shown in figure 11, provided infrared signal receiving end (as infrared remote receiver, infrared adapter) and computing machine (as small-size computer) and realized that the present invention proposes the USB catenation principle figure of method.Infrared adapter connects computing machine by USB interface, and the USB HID driver that computing machine provides in conjunction with Windows self by usb host controller calls bus apparatus and drives.
Among Figure 12, provided the decoding process figure of infrared signal receiving end of the present invention.。Infrared decoding program is judged according to the coding method that the present invention proposes.Program run is in this idle condition of IRIN_STATE_IDLE, receives that infrared signal enters IRIN_STATE_LEAD_IN and judges the opening code respective interrupt, and IRIN_STATE_LEAD_END judges whether end of transmission of opening code.Opening code satisfies the reception IRIN_STATE_ADDRESS software module that enters address code after the infrared coding method that the present invention proposes, and the correct back of checking address code receives infrared reception data I RIN_STATE_DATE software module and also decodes.
According to the described computer infrared remote control of present embodiment system.Infrared signal receiving end (as infrared remote receiver, infrared adapter) receives the infrared signal that telepilot sends.Infrared decoding and data-switching through embedded main board are sent in the computing machine.Infrared adapter is modeled as mouse, meets human interface device (HID) standard.Utilizing computing machine self to drive can be modeled as telepilot mouse moves, left button, right button, the global function operation such as double-click, click according to key assignments.
Those of ordinary skill in the art will appreciate that embodiment described here is in order to help reader understanding's principle of the present invention, should to be understood that protection scope of the present invention is not limited to such special statement and embodiment.Everyly make various possible being equal to according to foregoing description and replace or change, all be considered to belong to the protection domain of claim of the present invention.