CN101211506B - Remote control coding method - Google Patents

Remote control coding method Download PDF

Info

Publication number
CN101211506B
CN101211506B CN2007101257361A CN200710125736A CN101211506B CN 101211506 B CN101211506 B CN 101211506B CN 2007101257361 A CN2007101257361 A CN 2007101257361A CN 200710125736 A CN200710125736 A CN 200710125736A CN 101211506 B CN101211506 B CN 101211506B
Authority
CN
China
Prior art keywords
remote control
emission
code
coding method
control coding
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.)
Expired - Fee Related
Application number
CN2007101257361A
Other languages
Chinese (zh)
Other versions
CN101211506A (en
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.)
Konka Group Co Ltd
Original Assignee
Konka Group 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 Konka Group Co Ltd filed Critical Konka Group Co Ltd
Priority to CN2007101257361A priority Critical patent/CN101211506B/en
Publication of CN101211506A publication Critical patent/CN101211506A/en
Application granted granted Critical
Publication of CN101211506B publication Critical patent/CN101211506B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Selective Calling Equipment (AREA)
  • Details Of Television Systems (AREA)

Abstract

The invention discloses a remote control coding method which is applicable to the remote control technical field. The method comprises the following steps: initializing the mode of an I/O port of a remote control coding system, carrier wave emitting numbers or vacancy numbers of a timer, and a counter; detecting the validity of key in the remote control system and emitting remote control carrier wave signal; recording the current state of remote control carrier wave emission. The remote control coding method provided by the invention prolongs the responding time of a processor for infrared ray decoding, thus avoiding the mutual interfere phenomenon among the electronic products of different types, and greatly improving the anti-jamming capability of products and reliability of products.

Description

A kind of remote control coding method
Technical field
The present invention relates to a kind of coding method, relate in particular to a kind of remote control coding method.
Background technology
Infrared remote controller has been widely used on various types of household appliances, and its appearance is made electrical appliance that a lot of facilities is provided.In the remote control circuit of same IR remote controller, will use usually and realize different distant control function districts or distinguish different Machine Types, so just require signal to transmit by certain coding, coding is then accomplished by coding chip or circuit.
At present, be used to realize that the infrared remote control agreement of infrared remote coding reaches tens kinds, such as, agreements such as Rcs, SIRCS, Sony, RECS80, Denon, NEC, Motorola.For these infrared remote control agreements, the manufacturer of the IR remote controller of most of household electrical appliance adopts the NEC agreement to encode; Like this, possibly there is the phenomenon that interferes with each other in the infrared remote controller of the different product of same producer, and perhaps also can there be the phenomenon of phase mutual interference in the dissimilar electronic product of different manufacturers.
Therefore, prior art awaits improving and development.
Summary of the invention
Problem to be solved by this invention is to provide a kind of remote control coding method, and this method can solve the no longer problem of phase mutual interference of the dissimilar telepilot of different manufacturers.
In order to solve the problems of the technologies described above, technical scheme of the present invention is following:
A kind of remote control coding method, it comprises the steps:
A, the carrier transmit pulse number of the pattern of I/O port in the remote control coding system, timer or idle pulse number and counter are carried out the initialization setting, this setting up procedure comprises following processing:
A1, each frame data of remote signal are defined as preamble code, user code, key set code and synchronous code, and the group/cording quantity that said user code and key set code be set is respectively 8, and the bits of coded of said user code and key set code is defined as 0 or 1 yard sequence;
Corresponding transponder pulse time and free time are obtained in 0 or 1 yard of A2, emission;
A3, through counter, said transponder pulse time and free time are multiplied each other with said infrared frequency respectively, obtain said carrier transmit pulse number and idle pulse number;
A4, the carrier transmit pulse number that defines said preamble code, user code, key set code and synchronous code or idle pulse number.
The validity of button in B, the detection telechirics, and emission remote control carrier signal;
Emission remote control each frame data signals of carrier wave and with the current emission state recording on emission state register and button numerical value register, and setting data frame period delay value;
The current state of C, the said remote control carrier transmit of record.
Said remote control coding method, wherein, in the steps A, the setting of said I/O port comprises the setting of key scan port, crystal oscillator port and infrared ray output port.
Said remote control coding method, wherein, the pattern of said key scan port is set to 3 output ports, 4 input port patterns.
Said remote control coding method, wherein, in the steps A, the initialization setting of said counter comprises the setting of mode of operation and the setting of interrupt mode.
Said remote control coding method wherein, comprises following processing among the step C:
C1, the zero clearing of emission state register;
C2, utilize the current emission state information of emission state register tagging.
Said remote control coding method, wherein, said emission state information comprises the wait of delaying time at interval of transmit steering sign indicating number, emission user code, emission key set code, emission synchronous code and Frame; Said transmit steering sign indicating number, emission user code, emission key set code, emission synchronous code and Frame are delayed time at interval and are waited for and be marked at said emission state register successively.
A kind of remote control coding method provided by the invention; This method is through increasing the interval time of each code element; Prolonged the response time of the processor of decoding infrared ray; Thereby avoid the mutual interference phenomenon that exists between dissimilar electronic product, improved the antijamming capability and the reliability of products of product widely.
Description of drawings
Fig. 1 is the realization flow figure of remote control coding method of the present invention;
Fig. 2 is in the remote control coding method of the present invention, each frame data structure synoptic diagram;
Fig. 3 is in the remote control coding method of the present invention, the code structure synoptic diagram of each frame data definition;
Fig. 4 is in the remote control coding method of the present invention, preamble code, synchronous code, 0 and 1 yard structural representation;
Fig. 5 is in the remote control coding method of the present invention, the interval time-delay structure synoptic diagram of adjacent two frames;
Fig. 6 is in the remote control coding method of the present invention, the infrared ray structural representation.
Embodiment
Below in conjunction with accompanying drawing, further explain is done in preferred embodiment of the present invention.
As shown in Figure 1, the invention provides a kind of remote control coding method, it is realized flowing out and comprises the steps:
110, the remote control coding system is carried out the initialization setting, comprise the I/O port, be i.e. the setting of I/O pattern, the carrier transmit number of timer or the setting of idle number and the setting of counter;
Wherein, the setting of said counter comprises the setting of mode of operation (addition, subtraction etc., 8/16 etc.) and the setting of interrupt mode (overflowing/zero clearing/interrupt when equating), and when not having other vital tasks, the interrupt mode that counter can be set is for highest;
120, detect the button of remote control coding system;
130, judge whether button is effective, and being then changes step 140; Otherwise go to step 120;
140, each frame data signals of emission remote control carrier wave, and with the current emission state recording on emission state register and button numerical value register;
150, the time-delay of setting data frame period is 23ms, and its waveform is as shown in Figure 5;
160, judge that button discharges, and is then to go to step 120, otherwise goes to step 140.
Wherein, in the said step 110, the setting of said I/O port comprises the setting of key scan port, crystal port and infrared ray output port; Said key scan port is set to the I/O pattern, such as, need to realize 3 * 4 buttons, i.e. 3 output ports, 4 input ports are provided with; Simultaneously, other port such as crystal oscillator, is provided with according to the specification requirement of remote control coding chip, and the infrared ray output port then is set to output mode, is used to carry out the output emission of signal.
In the initialization setting up procedure of said timer carrier transmit pulse number or idle pulse number, comprise following processing:
111, each frame data with remote signal are defined as preamble code, user code, key set code and synchronous code; And the group/cording quantity that said user code and key set code are set is respectively 8; Such as 8 user codes (C7~C0), 8 key set codes (D1~D0), as shown in Figure 2; Wherein, 8 user codes are used to distinguish different electric equipments, prevent interfering with each other of different machine remote control modes, and said preamble code, user code, key set code and synchronous code are and are defined as high-order first signaling; And be to adopt pulse modulated serial code, as shown in Figure 3; Simultaneously, the bits of coded of said user code and key set code is defined as 0 or 1 yard, and the pulsewidth that said preamble code is set is 3ms, is spaced apart 3ms, the cycle is 6ms; 0 yard pulsewidth is 500us, is spaced apart 1.5ms; Cycle is 2ms; 1 yard pulsewidth is 500us, is spaced apart 2.5ms; Cycle is 3ms; The pulsewidth of synchronous code is 500us, is spaced apart 4ms; Cycle is 4.5ms, and is as shown in Figure 4.
For the carrier frequency of above-mentioned 0 and 1 16 binary codes forming through 38kHz, need carry out secondary modulation, as shown in Figure 5, in order to improve emission efficiency, reach the purpose that reduces power supply power consumption; And then pass through infrared-emitting diode generation infrared ray to spatial emission.
112, operating and remote controlling system launches 0 or 1 yard, obtains corresponding transponder pulse time and free time;
113, through counter, said transponder pulse time and free time are multiplied each other with said infrared frequency respectively, obtain said carrier transmit number and idle number;
For example, when the infrared ray frequency f IR=38kHz, and when launching 0 yard, this ultrared waveform is as shown in Figure 6; Transponder pulse time t 0CODE=500us; Free time t 0SPACE=1500us, then corresponding carrier transmit pulse number is PN 0CODE=500us/ (1/38kHZ)=19, idle pulse number PN 0SPACE=1500us/ (1/38kHZ)=57; In like manner can calculate preamble code, synchronous code, 1 yard carrier transmit and idle pulse number;
114, the carrier transmit pulse number or the idle pulse number of said preamble code, user code, key set code and the synchronous code of gained calculated in definition.
When the carrier transmit pulse number of timer or idle pulse number being carried out initialization be provided with; Also need be according to the frequency requirement of infrared excitation and the frequency of crystal oscillation; Frequency dividing ratio to the frequency division register is carried out relative set, and the procurement process of frequency dividing ratio is following:
At first, confirm infrared frequency f IR=38kHz, and crystal oscillation frequency f XTAL=455kHz;
Secondly, crystal oscillation frequency divided by infrared frequency, is obtained frequency dividing ratio N, promptly
N=f XTAL/f IR=455/38=11.9737;
Wherein, round numbers N=12;
Then, the frequency dividing ratio that calculates 12 is arranged on the corresponding frequency division register.
At last, the output terminal that the frequency division register is set is connected to counter and infrared ray output terminal, and this moment, the infrared ray output terminal was an input pattern, does not have pulse output.
In the said method, in the step 140, during the remote control carrier transmit, the concrete operations flow process of current emission state recording on emission state register and button numerical value register comprises step:
141, when carrying out the emission of remote control carrier signal, emission state register/key value register etc. clear 0;
142, utilize the emission state register current emission state information of mark successively; Such as the wait (5) etc. of delaying time at interval of idle (0), transmit steering sign indicating number (1), emission user code (2), emission key set code (3), emission synchronous code (4) and Frame; Concrete labeling process is following:
When the emission state register equaled 0, if effectively button is detected, then the emission state register added 1, and this moment, the emission state register equaled 1;
When the emission state register equals 1, call preamble code emission subroutine, after the preamble code battery has fired, the emission state register continues to add 1, and this moment, the emission state register equaled 2;
When the emission state register equals 2, invoke user sign indicating number emission subroutine, after the user code battery has fired, the emission state register continues to add 1, and this moment, the emission state register equaled 3;
When the emission state register equals 3, call key set code emission subroutine, after the key set code battery has fired, the emission state register continues to add 1, and this moment, the emission state register equaled 4;
When the emission state register equals 4, invoke synchronous sign indicating number emission subroutine, after the synchronous code battery has fired, the emission state register continues to add 1, and this moment, the emission state register equaled 5;
When the emission state register equals 5, call at interval time delay subroutine of Frame, carry out delay process, and after the time-delay process finished, if button is still effective, then the emission state register equaled 1; If button discharges, emission state register=0 then returns to the original state of emission state register.
Wherein, in remote control carrier signal emission process, suppose that counter works with the subtraction mode, interrupt when counter empties, and when the emission lead code, opened and interrupt or allow interrupting, such as:
0 yard of emission, and with PN 0CODE=19 insert counter, and the infrared ray output port is set to output mode simultaneously, when infrared pulse will export output port to; If counter interrupt to take place, 19 of pulse numbers that then show the infra-red carrier emission have sent and have finished, and the infrared ray output port is made as input pattern, close infrared ray output;
0 yard of emission, and with PN 0SPACE=57 when inserting counter, if counter interrupts taking place, shows then that 57 of infrared pulses have been delayed time to finish.
And for example, after carrier signal emission is accomplished, the relevant information of current emission state is marked on the emission state register; Wherein said relevant information is current carrier transmit state, idle pulse number, transmit steering sign indicating number, emission user code and emission key set code etc.
In sum; A kind of remote control coding method provided by the invention; This method is through increasing the interval time of each code element; Prolong the response time of the processor of decoding infrared ray, thereby avoid the mutual interference phenomenon that exists between dissimilar electronic product, improved the antijamming capability and the reliability of products of product widely.
Should be understood that, concerning those of ordinary skills, can improve or conversion, and all these improvement and conversion all should belong to the protection domain of accompanying claims of the present invention according to above-mentioned explanation.

Claims (6)

1. remote control coding method, it comprises the steps:
A, the carrier transmit pulse number of the pattern of I/O port in the remote control coding system, timer or idle pulse number and counter are carried out the initialization setting, this setting up procedure comprises following processing:
A1, each frame data of remote signal are defined as preamble code, user code, key set code and synchronous code, and the group/cording quantity that said user code and key set code be set is respectively 8, and the bits of coded of said user code and key set code is defined as 0 or 1 yard sequence;
Corresponding transponder pulse time and free time are obtained in 0 or 1 yard of A2, emission;
A3, through counter, said transponder pulse time and free time are multiplied each other with infrared frequency respectively, obtain said carrier transmit pulse number and idle pulse number;
A4, the carrier transmit pulse number that defines said preamble code, user code, key set code and synchronous code or idle pulse number;
The validity of button in B, the detection telechirics, and emission remote control carrier signal;
Emission remote control each frame data signals of carrier wave and with the current emission state recording on emission state register and button numerical value register, and setting data frame period delay value;
The current state of C, the said remote control carrier transmit of record.
2. remote control coding method according to claim 1 is characterized in that, in the steps A, the setting of said I/O port comprises the setting of key scan port, crystal oscillator port and infrared ray output port.
3. remote control coding method according to claim 2 is characterized in that, the pattern of said key scan port is set to 3 output ports, 4 input port patterns.
4. remote control coding method according to claim 1 is characterized in that, in the steps A, the initialization setting of said counter comprises the setting of mode of operation and the setting of interrupt mode.
5. remote control coding method according to claim 1 is characterized in that, comprises following processing among the step C:
C1, the zero clearing of emission state register;
C2, utilize the current emission state information of emission state register tagging.
6. remote control coding method according to claim 5 is characterized in that, said emission state information comprises the wait of delaying time at interval of transmit steering sign indicating number, emission user code, emission key set code, emission synchronous code and Frame; Said transmit steering sign indicating number, emission user code, emission key set code, emission synchronous code and Frame are delayed time at interval and are waited for and be marked at said emission state register successively.
CN2007101257361A 2007-12-25 2007-12-25 Remote control coding method Expired - Fee Related CN101211506B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101257361A CN101211506B (en) 2007-12-25 2007-12-25 Remote control coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101257361A CN101211506B (en) 2007-12-25 2007-12-25 Remote control coding method

Publications (2)

Publication Number Publication Date
CN101211506A CN101211506A (en) 2008-07-02
CN101211506B true CN101211506B (en) 2012-01-25

Family

ID=39611506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101257361A Expired - Fee Related CN101211506B (en) 2007-12-25 2007-12-25 Remote control coding method

Country Status (1)

Country Link
CN (1) CN101211506B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729192B (en) * 2008-10-30 2013-08-07 杭州士兰微电子股份有限公司 Encoding and decoding method for wireless radio frequency remote control
CN103383804A (en) * 2012-05-03 2013-11-06 珠海格力电器股份有限公司 Transmission method for remote control signal, and remote controller and receiving unit thereof
CN105261199A (en) * 2015-09-21 2016-01-20 深圳市天海基业科技有限公司 Infrared data coding and decoding method and apparatus thereof
CN115050368B (en) * 2022-08-12 2023-06-20 北京探境科技有限公司 Equipment control method and device, intelligent equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0956550A1 (en) * 1997-01-31 1999-11-17 Thomson Consumer Electronics, Inc. Communications system for remote control systems
CN1719488A (en) * 2005-08-03 2006-01-11 四川长虹电器股份有限公司 Infrared remote control anti interference detection method
CN1961507A (en) * 2004-05-28 2007-05-09 皇家飞利浦电子股份有限公司 UART-encoded pulse-modulation technique

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0956550A1 (en) * 1997-01-31 1999-11-17 Thomson Consumer Electronics, Inc. Communications system for remote control systems
CN1961507A (en) * 2004-05-28 2007-05-09 皇家飞利浦电子股份有限公司 UART-encoded pulse-modulation technique
CN1719488A (en) * 2005-08-03 2006-01-11 四川长虹电器股份有限公司 Infrared remote control anti interference detection method

Also Published As

Publication number Publication date
CN101211506A (en) 2008-07-02

Similar Documents

Publication Publication Date Title
CN101211506B (en) Remote control coding method
CN101388142B (en) Instruction recognizing method of remote controller, recognizing apparatus and household appliances
CN101719311B (en) Method for infrared remote control of computer
CN101719310B (en) Long-distance infrared remote-controlled device and method used for embedded equipment
CN104010354B (en) Sensor, telemeter and wireless sensor system and its application method
CN101419748B (en) Universal remote control and distant control code searching method thereof
CN100573563C (en) A kind of contactless IC card universal encoding-decoding and read-write equipment and method
CN104332045A (en) Intelligent infrared remote controlsystem based on wireless network and method
CN100373418C (en) Infrared remote control anti interference detection method
CN207440315U (en) A kind of photoelectric detection system
CN201166975Y (en) Hard disk CD-rewritable with infrared remote-control forwarding function
CN101155278A (en) Electrical equipment with multi-remote controller control function and implementing method thereof
Lv et al. A new USB home appliances based on PC and infrared remote control protocol
CN105005751A (en) RFID tag chip signal reflecting method
CN101127156B (en) Universal code identifying device for universal remote control receiver
CN201751920U (en) Computer infrared remote control system
CN204440628U (en) wireless remote control coding chip and application circuit thereof
EP0133474B1 (en) A data processing system including an infra-red coupled remote data entry device
CN201311709Y (en) Universal remote controller
CN205451471U (en) Multifunctional remote controlller based on singlechip
CN103186978B (en) Control the circuit structure of Infrared Remote-Control Sending
CN212171680U (en) Device for modulating multi-path external photoelectric trigger signals into one path
CN109857027A (en) Low-power-consumptiodormancy dormancy system key and infrared remote control combine wake-up circuit
Rudrappa et al. Implementing RC5 protocol for remote control applications
CN201549069U (en) Keystroke code circuit and remote control transmitting circuit using the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120125

Termination date: 20151225

EXPY Termination of patent right or utility model