The utility model content
Technical problem to be solved in the utility model is, a kind of infrared and button receiving trap is provided, and does not need the multichannel input/output interface, only needs an input/output interface, does not need external special driving chip to carry out key scan.
In order to solve the problems of the technologies described above, the utility model provides a kind of infrared and button receiving trap, comprising:
Infrared remote receiver is for the infrared signal that receives remote-transmitter;
Pb receiver is for the push button signalling of receiving trap main body;
Processor, be connected with described pb receiver with described infrared remote receiver respectively by same input/output interface, be used for obtaining by described same input/output interface the push button signalling that infrared signal that described infrared remote receiver receives or pb receiver receive, and process.
Wherein, described processor comprises the signal identification module, be used for identifying the waveform of the signal that gets by described same input/output interface, if be the waveform that comprises preamble code, be identified as infrared signal, if for front and back shake, centre are the waveform of constant level value, be identified as push button signalling.Described preamble code is made of the continuous square wave of 9ms low level and 4.5ms high level.
Wherein, described processor comprises signal processing module, the infrared signal that gets by described same input/output interface is decoded, and the type of identification infrared signal; Or according to the type of the level voltage value key range signal of described push button signalling.
Wherein, described input/output interface comprises A/D converter, and the level voltage value of described push button signalling is by described A/D converter, be digital signal by analog signal conversion, described signal processing module is according to the type of described digital signal key range signal.
Wherein, described pb receiver is comprised of at least one road key circuit, and described key circuit comprises a button K at least
nWith a resistance R
n, described button K
nOne end is connected with described input/output interface, an end and described resistance R
nConnect described resistance R
nOne end and described button K
nConnect an end ground connection, power supply V
ccBy a resistance R
0Be connected the corresponding number of keys of n with described same input/output interface.
Implement the embodiment of the present invention, have following beneficial effect: only need an input/output interface, do not need external special driving chip to carry out key scan, and then simplify input/output interface, reduce the difficulty of typesetting wiring, economize on resources.
Embodiment
Below in conjunction with the accompanying drawing in the utility model embodiment, the technical scheme in the utility model embodiment is clearly and completely described, obviously, described embodiment is only the utility model part embodiment, rather than whole embodiment.Based on the embodiment in the utility model, those of ordinary skills are not making the every other embodiment that obtains under the creative work prerequisite, all belong to the scope of the utility model protection.
See also Fig. 1, Fig. 1 is a kind of infrared and button receiving trap structural representation that the utility model provides.As shown in Figure 1, in the utility model embodiment, a kind of infrared and button receiving trap comprises infrared remote receiver 110, pb receiver 120, input/output interface 130 and processor 140 at least, wherein:
Infrared remote receiver 110 is connected with processor 140 by same input/output interface (I/O interface) 130.In specific implementation, infrared remote receiver 110 is used for receiving the infrared signal of remote-transmitter, telepilot i.e. a signal generator with encoding function, when pressing some buttons, telepilot is first identified the coding of this button, calculate its launching code, then the infrared emission tube by the telepilot head sends the frequency that is generally 38KHz and adds this coding carrier wave in binary mode, infrared remote receiver 110 receives the coded signal of telepilot emission, sends processor 140 to by input/output interface 130.
Pb receiver 120 is connected with processor 140 by same input/output interface 130.In specific implementation, pb receiver 120 is used for the push button signalling of receiving trap main body, the button of apparatus main body, such as " broadcast " button of set-top box, " next song " button of DVD etc., pb receiver 120 receives push button signalling, push button signalling when namely receiving the user and pressing some buttons sends processor 140 to by same input/output interface 130.
Processor 140, be connected with described pb receiver 120 with described infrared remote receiver 110 respectively by same input/output interface 130, be used for obtaining by described same input/output interface 130 push button signalling that infrared signal that described infrared remote receiver 110 receives or pb receiver 120 receive, and process.In specific implementation, processor 140 comprises signal identification module 1401 and signal processing module 1402, and signal identification module 1401 is connected with signal processing module 1402.
Wherein, signal identification module 1401 is for the waveform of identifying the signal that gets by described same input/output interface 130.If the waveform of the signal that gets by described same input/output interface is the waveform that the beginning part comprises preamble code, be identified as infrared signal, 32 binary codes that the waveform of infrared signal is comprised of " 0 " and " 1 ", preamble code is made of the continuous square wave of 9ms low level and 4.5ms high level.If the waveform of the signal that gets by described same input/output interface 130 is the front and back shake, middlely is the waveform of constant level value, is identified as push button signalling.When carrying out button operation, the waveform that triggers, as shown in Figure 2, Fig. 2 is the waveform schematic diagram of a kind of push button signalling of the utility model, after unclamping with button before button is pressed, the waveform shake, the general shake time is about 10ms, and when button was pressed, key assignments was stable, waveform is a constant level value, and key assignments stabilization time is greater than 100ms.
Wherein, signal processing module 1402 is decoded to the infrared signal that gets by described same input/output interface 130, the type of identification infrared signal; Or according to the type of the level voltage value key range signal of described push button signalling.Processor 140 is an inner integrated IR demoder and interrupt function is arranged, 130 pairs of infrared signals that get by same input/output interface of processor are decoded, thus the type of identification infrared signal reads the operation of concrete which button of remote control.
Input/output interface 130 comprises A/D converter (ADC, Analog-to-Digital Converter), type according to the level voltage value key range signal of described push button signalling, it is the level voltage value of push button signalling, by A/D converter, be digital signal by analog signal conversion, signal processing module 1402 is according to the type of digital signal key range signal, and then identification is that concrete which button is supressed, the operation of the processor 140 corresponding buttons of response.According to the actual requirements, can connect the multichannel button, the maximum that can connect is by bond number, and by the resolution decision of IO interface ADC, in practical application, pressing bond number as set-top box, DVD etc. can be over 10.
Fig. 3 is the button receiving circuit figure of a kind of infrared and button receiving trap of the utility model, and circuit is by power supply V as shown in the figure
cc, resistance R
0, button K
1, button K
2, button K
3, button K
n, resistance R
1, resistance R
2, resistance R
3, resistance R
4, resistance R
nConsist of.Wherein, the button receiving circuit is connected with processor CPU by same IO interface, power supply V
ccBy a resistance R
0Be connected button K with same input/output interface
1, button K
2, button K
3With resistance R
0An end that is connected is connected with processor by same input/output interface, button K
1, button K
2, button K
3Other end contact resistance R respectively
1, resistance R
2, resistance R
3, resistance R
1, resistance R
2, resistance R
3Other end ground connection respectively.
Pb receiver 120 is comprised of at least one road key circuit, and key circuit comprises a button K at least
nWith a resistance R
n, described button K
nOne end is connected with described input/output interface, an end and described resistance R
nConnect described resistance R
nOne end and described button K
nConnect an end ground connection, the corresponding number of keys of n.When
pb receiver 120 only was comprised of one road key circuit, the magnitude of voltage of establishing the input/output interface place was U
0, as button K
1When pressing, resistance R
0With R
1Dividing potential drop, at this moment
When the two-way key circuit formed at least, every road key circuit was in parallel when
pb receiver 120, and the magnitude of voltage of establishing the input/output interface place is U
0, as button K
1When pressing, resistance R
0With the R1 dividing potential drop, at this moment
As button K
2When pressing, resistance R
0With R
2Dividing potential drop, at this moment
As button K
3When pressing, resistance R
0With R
3Dividing potential drop, at this moment
By that analogy, as button K
nWhen pressing, resistance R
0With R
nDividing potential drop, at this moment
Due to resistance R
1, R
2, R
3R
nResistance different, so different key is when pressing, U
0Magnitude of voltage different, be converted to different digital signals through A/D converter, processor carries out the operation of corresponding button according to different digital signals.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to complete by computer program, described program can be stored in a computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosed is only the utility model preferred embodiment, certainly can not limit with this interest field of the utility model, and the equivalent variations of therefore doing according to the utility model claim still belongs to the scope that the utility model is contained.