CN103745590B - A kind of infrared remote coding method - Google Patents

A kind of infrared remote coding method Download PDF

Info

Publication number
CN103745590B
CN103745590B CN201410009369.9A CN201410009369A CN103745590B CN 103745590 B CN103745590 B CN 103745590B CN 201410009369 A CN201410009369 A CN 201410009369A CN 103745590 B CN103745590 B CN 103745590B
Authority
CN
China
Prior art keywords
agreement
frame
coding
protocol
infrared remote
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
CN201410009369.9A
Other languages
Chinese (zh)
Other versions
CN103745590A (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.)
WUXI THINGTEK TECHNOLOGY Co Ltd
Original Assignee
WUXI THINGTEK TECHNOLOGY 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 WUXI THINGTEK TECHNOLOGY Co Ltd filed Critical WUXI THINGTEK TECHNOLOGY Co Ltd
Priority to CN201410009369.9A priority Critical patent/CN103745590B/en
Publication of CN103745590A publication Critical patent/CN103745590A/en
Application granted granted Critical
Publication of CN103745590B publication Critical patent/CN103745590B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of infrared remote coding method, comprise the following steps: (1) analyzes the configuration file of existing infrared remote coding agreement, relevant database constructs protocol attribute table, constructs protocol frame table, construct agreement segment table;(2) the protocol attribute table in incidence relation type data base, protocol frame table and agreement segment table;(3) remote controller key sends characteristic signal;(4) controlled device receives characteristic signal and sends feedback signal;(5) coding unit receives feedback signal and judges the infrared remote coding agreement belonging to controlled device according to feedback signal;(6) coding unit in remote controller receives the command code that remote controller key sends, and according to data configuration configuration file corresponding in affiliated infrared remote coding agreement invocation protocol attribute list, protocol frame table and agreement segment table, then according to configuration file encodes.The present invention can compatible existing different infrared remote coding agreements.

Description

A kind of infrared remote coding method
Technical field
The present invention relates to a kind of coded method, be specifically related to a kind of infrared remote coding method.
Background technology
Infra-red remote control is currently used widest a kind of communication and remote control means.Owing to infrared remote controller has The features such as volume is little, low in energy consumption, function strong, low cost, thus, after colour TV, videocorder, at recorder, stereo set, sky Wither and use infra-red remote control the most one after another on other compact electric apparatus device such as machine and toy.In industrial equipment, high pressure, radiation, Under the environment such as toxic gas, dust, use infra-red remote control not only the most reliable but also electrical Interference can be effectively isolated.
There is an i.e. communication rule of communications protocol in the communication between IR remote controller and controlled device, the most unidirectional Communications protocol.This unidirectional communications protocol is referred to as infrared remote coding agreement.Infrared remote coding agreement is typically all producer Self-defining, such as NEC, there is the infrared coding agreement of self-defining in the company such as SONY, TOSHIBA, PHILIPS.Any electricity Device exploitation and manufacturer also can define the infrared coding agreement of oneself.
The waveform basic feature of infrared remote coding agreement is: the waveform of a string low and high level composition.For remote controller, If high level makes infrared transmitting tube turn on, then high level makes infrared transmitting tube send infrared light, at electrical equipment receiving terminal Just can receive infrared light.Between low period, infrared transmitting tube is not turned on, and infrared transmitting tube stops sending infrared light, at electrical equipment Receiving terminal does not just receive infrared light.
Infrared coding agreement in early days has without carrier wave.Due to environment mid-infrared light signal everywhere, so, in nothing When carrier remote control device is launched, often mix some interference signals so that electrical equipment reaction is insensitive, so, carrierfree coding one As the shortest in order to avoid interference, but, extraneous infrared light interference also can make electrical equipment misoperation.Thus, no-load Ripple coding is day by day eliminated.Infrared coding with carrier wave is accomplished by electrical equipment receiving terminal with band filter.There is this band logical Wave filter, the most thoroughly avoids the shortcoming being easily disturbed of carrierfree coding.
The coded system of infrared coding agreement typically has 2 kinds, and one is pulse width modulation mode (PWM), and another kind is pulse-phase Modulation system (PPM).The definition logical bit of pulse width modulation mode (PWM) is :+one section of low level of a string carrier wave, with low level Width difference is as the difference distinguishing logical bit.The definition logical bit of pulse-phase modulation mode (PPM) is: a string carrier wave and one section low Before and after level, order is different distinguishes different logical bit, if+one section of low level of a string carrier wave is logical zero, one section of low level+ A string carrier wave is logic 1.
Common logical bit only has 2 logical bit.Each logical bit is made up of a carrier wave string and a low level.Derivative Logical bit have: a string carrier wave or one section of low level are exactly logical bit, or, multiple carrier wave strings and low level form one and patrol Collect position.The quantity of logical bit is not 2, has 3,4 ..., 16, the most.
One complete infrared coding agreement, often has basic waveform string (we term it basic frame Frame), repeating frame And end frame.Some infrared coding agreements only have basic frame, do not have repeating frame and end frame;Most of infrared coding agreements have base This frame and repeating frame.Such as NEC6122 coding protocol, a frame of 9ms carrier wave string+4.5ms low level beginning is basic frame, basic frame Regular length is 108ms, and 9ms carrier wave string+2.25ms beginning below is exactly repeating frame.
Owing to infrared remote coding agreement is typically all producer's self-defining, therefore red between the equipment of different manufacturers Outer remote control coding agreement is the most incompatible, and the infrared remote coding agreement between the distinct device of same producer is likely to the most not Identical.
For compatible different types of infrared remote coding agreement, it is common practice to existing infrared protocol is collected also Storage, then carries out adaptive one by one by the mode classification such as manufacturer, model.At present, there is not yet a kind of infrared remote coding side Method can compatible existing different infrared remote coding agreements.
Summary of the invention
Goal of the invention: in order to overcome the deficiencies in the prior art, the present invention provides a kind of infrared remote coding method, Can compatible existing different infrared remote coding agreements.
For solving above-mentioned technical problem, the technical solution used in the present invention is:
A kind of infrared remote coding method, comprises the following steps:
(1) analyze the configuration file of existing infrared remote coding agreement, extract the protocol name in configuration file, carrier wave Frequency/modulating frequency, dutycycle, logical bit, big small end, type of coding and number of repetition construct agreement in relevant database Attribute list, extracts the frame title in configuration file, frame pattern, frame reference, frame regular length and frame and fixes duration at relationship type number According to storehouse constructs protocol frame table, extract the name section in configuration file, segment type, section time series waveform, the bit length of section, section The code value of bit pattern, section reference and section in relevant database, construct agreement segment table;
(2) the protocol attribute table in incidence relation type data base, protocol frame table and agreement segment table;
(3) remote controller key sends characteristic signal;
(4) controlled device receives characteristic signal and sends feedback signal;
(5) coding unit receives feedback signal and judges the infrared remote coding association belonging to controlled device according to feedback signal View;
(6) coding unit in remote controller receives the command code that remote controller key sends, and according to affiliated infrared remote control Corresponding data configuration configuration file in coding protocol invocation protocol attribute list, protocol frame table and agreement segment table, then according to join Put file to encode.
Described existing infrared remote coding agreement includes NEC agreement, RC-5/6 agreement and SONY SIRC agreement.
Beneficial effects of the present invention: the present invention, by analyzing the configuration file of existing infrared remote coding agreement, constructs Be mutually related protocol attribute table, protocol frame table and agreement segment table, and coding unit is compiled according to the infrared remote control belonging to controlled device Corresponding data configuration configuration file in code agreement invocation protocol attribute list, protocol frame table and agreement segment table, then according to configuration File encodes, and described infrared remote coding method can compatible existing different infrared remote coding agreements.
Accompanying drawing explanation
Fig. 1 is the flow chart of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawings the present invention is further described.
As it is shown in figure 1, a kind of infrared remote coding method, comprise the following steps:
(1) configuration file of existing infrared remote coding agreement, the most existing infrared remote coding protocol package are analyzed Include NEC agreement, RC-5/6 agreement and SONY SIRC agreement etc., extract the protocol name in configuration file, carrier frequency/modulation Frequency, dutycycle, logical bit, big small end, type of coding and number of repetition construct protocol attribute table in relevant database, carry Take the frame title in configuration file, frame pattern, frame reference, frame regular length and frame to fix duration and construct in relevant database Protocol frame table, extract the name section in configuration file, segment type, section time series waveform, the bit length of section, the bit pattern of section, The code value of section reference and section constructs agreement segment table in relevant database.
(2) the protocol attribute table in incidence relation type data base, protocol frame table and agreement segment table;The following institute of table after association Show:
Protocol attribute table includes with properties:
A): protocol number, it is the major key of protocol attribute table and is integer;
B): protocol name, the common infrared remote control having company's self-definings such as NEC, SONY, TOSHIBA, PHILIPS is compiled Code agreement;
C): carrier frequency/modulating frequency, for representing the carrier wave that infrared signal modulation is used when sending or receive decoding Frequency, that most commonly seen is 38KHz;
D): dutycycle, the dutycycle of infrared signal carrier wave, it is simply that high level accounts for the ratio of one high and one low time, is usually 1/3,1/4;
E): logical bit, each logical bit is made up of a high level (carrier wave string) and a low level, common logical bit Only 2, i.e. logical zero and logic 1;
F): big small end;Hold greatly pattern, refer to a high position for data, be saved in the low address of internal memory, and the low level of data, It is saved in the high address of internal memory;Little endian mode, refers to that a high position for data is saved in the high address of internal memory, and the low level of data It is saved in the low address of internal memory;The different definition of big small end, influences whether the order that infrared data is received and dispatched;
G): type of coding, including combination type and stand alone type;Such as due to air-conditioning equipment generally at an infrared remote coding Bag contains all of control information, therefore its combination that infrared coding is all states of equipment sent, we term it Combination type;And the infrared remote coding bag that other equipment send every time generally only comprises certain controlled state, we term it Stand alone type;
H): number of repetition, such as some infrared remote coding agreement needs ability after identical data content repeated combination Becoming an effective infrared remote coding packet, major part infrared protocol is then without repeating.
Protocol frame table includes with properties:
A): protocol number, for the external key of protocol attribute table;
B): frame sequence is numbered, the sequence number of this frame is represented and for integer;The set of properties of protocol number and frame sequence numbering is protocol frame The major key of table;
C): frame title, for the ease of understanding and reading, the title taken to this frame;
D): frame pattern, represent that this frame is independent frame, repeating frame, radix-minus-one complement frame;
E): frame reference, if the frame pattern of this frame is independent frame, then this attribute is meaningless;If the frame pattern of this frame It is repeating frame or radix-minus-one complement frame, then this attribute represents repetition or the reference frame sequence number negated;
F): frame regular length, represent whether this frame is fixing duration;
G): frame fixes duration, if frame regular length is effective, this attribute represents that frame fixes duration;If frame is fixing long When spending invalid, this attribute is invalid.
Agreement segment table includes with properties:
A): protocol number, for the external key of protocol attribute table;
B): frame number, for the external key of protocol frame table;
C): section sequence is numbered, representing this section sequence number in protocol frame and for integer, protocol number, frame number and section sequence are compiled Number the major key that set of properties is agreement segment table;
D): name section, for the ease of understanding and reading, the title taken to this section;
E): segment type, represent that this section is logically position, or according to time series waveform;
F): section time series waveform, if segment type is according to time series waveform, then this attribute represents this time series The definition of waveform, data CSV;
G): the bit length of section, representing the length of this section, during segment type logically position, this attribute is just effective;
H): the bit pattern of section, represent that this section is independent segment, repeated segments, radix-minus-one complement section;
I): section reference, if the stage mode of this section is independent segment, then this attribute is meaningless, if the stage mode of this section It is repeated segments or radix-minus-one complement section, then this attribute represents repetition or the reference field sequence number negated;
J): the code value of section, representing the value of this section, during segment type logically position, this attribute is just effective.
(3) remote controller key sends characteristic signal.
(4) controlled device receives characteristic signal and sends feedback signal.
(5) coding unit receives feedback signal and judges the infrared remote coding association belonging to controlled device according to feedback signal View.
(6) coding unit in remote controller receives the command code that remote controller key sends, and according to affiliated infrared remote control Corresponding data configuration configuration file in coding protocol invocation protocol attribute list, protocol frame table and agreement segment table, then according to join Put file to encode.
Below as a example by modal NEC agreement, it is illustrated.
NEC agreement, is developed by NEC Corporation the earliest, and is widely used in various electrical equipment control, is characterized in: 8 bit address and 8 order of the bit, address and order all transmit 2 times, pulse interval modulation, 38kHz carrier frequency, each time be 1.12ms or 2.25ms, modulation uses length interpulse period to modulate each, and each pulse is the 38kHz carrier wave of 560us length Pulse, dutycycle is about 21 cycles of 1/3().It is to be started by the pulse of 9ms that one common guidance command sends, and is followed by 4.5ms is idle, followed by address, order, and address and order all transmit 2 times, and secondary address and order are radix-minus-one complements, Ke Yiyong Verifying the information received, total transmission time is fixing, because each has radix-minus-one complement transmission, an order only to send Once, though the button on remote controller always according to.But a code can be sent by every 110ms, until remote controller key discharges. Duplication code is fairly simple: the pulse beginning of a 9ms, 2.25ms interval, 560us pulse.
Protocol attribute table in relevant database is as shown in Table 1
Table one protocol attribute table
Name Describe NEC infrared protocol
protocal_id Unique number 1(self-propagation integer)
protocal_name Protocol name NEC
protocal_modulefreq Carrier frequency 38000
protocal_dutyratio Dutycycle 3
protocal_bitswave Logical bit waveform 560,-560;560,-1690
protocal_endian Big small end 0(small end)
protocal_type Type of coding 0(non-air-conditioning stand alone type)
protocal_repeat Repeat 0(is without repeating)
Protocol frame table is as shown in Table 2
Table two protocol frame table
Name Describe
frame_protocalid Affiliated infrared protocol ID
frame_seq Frame number
frame_name Frame title
frame_mode Frame pattern
frame_compare Frame reference
frame_fixlen Frame regular length
frame_fixtime Frame fixes duration
Agreement segment table is as shown in Table 3
Table three agreement segment table
Name Describe
segment_protocalid Affiliated infrared protocol ID
segment_frameseq Affiliated infrared portion ID
segment_seq Section sequence number
segment_name Name section
segment_wavetype Type of waveform
segment_wavearray Waveform array
segment_bitlength The bit length of section
segment_bitmode The bit pattern of section
segment_bitcompare The position reference of section
segment_bits The code value of section
Feature according to above-mentioned NEC agreement, it is possible to obtain as shown in Table 4, agreement section is as shown in Table 5 for protocol frame
Table four protocol frame
Table five agreement section
The producer of any employing NEC agreement only need to be according to functions of the equipments definition command code, and the coding module of remote controller is permissible Call the data configuration configuration file in above-mentioned protocol attribute table, protocol frame table and agreement segment table, then according to configuration file Encode, get final product combination producing and meet the complete infrared code of form.Here we are as a example by common television set, below definition Command code is as shown in Table 6.
Table six television set command code
Button Command code (8 binary systems)
Switch 00101010
Quiet 00111111
Volume adds 00101111
Volume down 00101110
Channel adds 00101101
Channel down 00101100
On 01011001
Under 01011000
Left 01010110
Right 01010111
Existing infrared remote coding agreement that three described tables are compatible, coding module can be by inquiry relationship type number Protocol attribute table according to storehouse obtains the base attribute of certain infrared remote coding agreement, obtains protocol frame data by protocol frame table and believes Breath, obtains agreement segment data information by agreement segment table, can construct configuration file then in conjunction with the mutual relation between table, so Rear combination command code can generate the complete infrared code meeting form.
The present invention is by analyzing the configuration file of existing infrared remote coding agreement in sum, and structure is mutually related Protocol attribute table, protocol frame table and agreement segment table, coding unit calls according to the infrared remote coding agreement belonging to controlled device Corresponding data configuration configuration file in protocol attribute table, protocol frame table and agreement segment table, then according to configuration file is compiled Code, described infrared remote coding method can compatible existing different infrared remote coding agreements.
The above is only the preferred embodiment of the present invention, it should be pointed out that: for the ordinary skill people of the art For Yuan, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (2)

1. an infrared remote coding method, it is characterised in that: comprise the following steps:
(1) analyze the configuration file of existing infrared remote coding agreement, extract the protocol name in configuration file, carrier frequency Rate/modulating frequency, dutycycle, logical bit, big small end, type of coding and number of repetition, construct agreement in relevant database Attribute list, extracts the frame title in configuration file, frame pattern, frame reference, frame regular length and frame and fixes duration, at relationship type number According to storehouse constructs protocol frame table, extract the name section in configuration file, segment type, section time series waveform, the bit length of section, section Bit pattern, section reference and the code value of section, in relevant database construct agreement segment table;
(2) the protocol attribute table in incidence relation type data base, protocol frame table and agreement segment table;
(3) pressing remote controller key sends characteristic signal;
(4) controlled device receives characteristic signal and sends feedback signal;
(5) coding unit receives feedback signal and judges the infrared remote coding agreement belonging to controlled device according to feedback signal;
(6) pressing remote controller key sends command code, and coding unit in remote controller receives command code, and according to affiliated infrared In remote control coding agreement invocation protocol attribute list, protocol frame table and agreement segment table, corresponding data configuration configuration file, then presses Encode according to configuration file.
A kind of infrared remote coding method the most according to claim 1, it is characterised in that: described existing infrared remote control is compiled Code agreement includes NEC agreement, RC-5/6 agreement and SONY SIRC agreement.
CN201410009369.9A 2014-01-08 2014-01-08 A kind of infrared remote coding method Expired - Fee Related CN103745590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410009369.9A CN103745590B (en) 2014-01-08 2014-01-08 A kind of infrared remote coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410009369.9A CN103745590B (en) 2014-01-08 2014-01-08 A kind of infrared remote coding method

Publications (2)

Publication Number Publication Date
CN103745590A CN103745590A (en) 2014-04-23
CN103745590B true CN103745590B (en) 2016-08-17

Family

ID=50502604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410009369.9A Expired - Fee Related CN103745590B (en) 2014-01-08 2014-01-08 A kind of infrared remote coding method

Country Status (1)

Country Link
CN (1) CN103745590B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104240491B (en) * 2014-09-24 2017-10-13 恬家(上海)信息科技有限公司 The digitizing solution of infrared signal
CN105139634B (en) * 2015-09-21 2019-11-08 深圳小佳科技有限公司 A kind of method and system automatically parsing different vendor's remote command in receiving end
CN105869383A (en) * 2016-04-13 2016-08-17 北京精益理想科技有限公司 Infrared data processing method, infrared instruction calling method and infrared instruction calling system
CN105915989A (en) * 2016-04-29 2016-08-31 镇江惠通电子有限公司 Infrared data transmission method and system, and remote control terminal
CN106297264A (en) * 2016-08-31 2017-01-04 杭州赫智电子科技有限公司 The coded method of the multiple ultra-red order of a kind of compatibility and system
CN108924615A (en) * 2018-07-20 2018-11-30 深圳创维-Rgb电子有限公司 A kind of method responding different ultra-red orders, storage medium and smart television
CN110286599B (en) * 2019-06-28 2023-03-17 高斯贝尔数码科技股份有限公司 Intelligent household appliance remote control method and system based on voice recognition
CN112863162A (en) * 2020-12-29 2021-05-28 Tcl王牌电器(惠州)有限公司 Infrared signal transmitting device and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5386251A (en) * 1993-06-03 1995-01-31 Zilog, Inc. Television receiver with learning remote control system capable of being controlled by a remote control device manufactured by different companies
CN1808512A (en) * 2005-01-20 2006-07-26 Lg电子株式会社 Remote controller code format(s), transmitting/receiving apparatus thereof, and transmitting/receiving method(s) thereof
CN101354830A (en) * 2007-07-25 2009-01-28 杭州士兰微电子股份有限公司 Remote controller code type general-purpose coding method
EP2276009A1 (en) * 1999-06-16 2011-01-19 Universal Electronics, Inc. Digital interconnection of electronics entertainment equipment
CN102129769A (en) * 2011-01-14 2011-07-20 利尔达科技有限公司 Universal remote control method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5386251A (en) * 1993-06-03 1995-01-31 Zilog, Inc. Television receiver with learning remote control system capable of being controlled by a remote control device manufactured by different companies
EP2276009A1 (en) * 1999-06-16 2011-01-19 Universal Electronics, Inc. Digital interconnection of electronics entertainment equipment
CN1808512A (en) * 2005-01-20 2006-07-26 Lg电子株式会社 Remote controller code format(s), transmitting/receiving apparatus thereof, and transmitting/receiving method(s) thereof
CN101354830A (en) * 2007-07-25 2009-01-28 杭州士兰微电子股份有限公司 Remote controller code type general-purpose coding method
CN102129769A (en) * 2011-01-14 2011-07-20 利尔达科技有限公司 Universal remote control method

Also Published As

Publication number Publication date
CN103745590A (en) 2014-04-23

Similar Documents

Publication Publication Date Title
CN103745590B (en) A kind of infrared remote coding method
CN202904845U (en) Infrared household electric appliance management system based on intelligent cell phone
CN101158867A (en) Remote control method of household electrical appliance and alarm capable of controlling household electrical appliance
CN1219361C (en) Bluetooth adaptor for infrared interface and communication method therefor
US20110117850A1 (en) Apparatus and Methods for Enabling Smart Portable Device to be Universal Remote Control
CN103699097A (en) Intelligent home control system and method
CN104332045A (en) Intelligent infrared remote controlsystem based on wireless network and method
CN101881948A (en) Remote air conditioner control starter design method based on wireless mobile communication network
CN107481504A (en) A kind of method that home wiring control linkage is realized based on infrared transponder
CN108964997A (en) Intercom wirelessly writes frequency method
CN203135915U (en) Intelligent household gateway
CN110167193A (en) WiFi matches network method and WiFi equipment automatically
CN203872292U (en) Wireless cloud monitor with infrared forwarding function
CN102339529A (en) Radio frequency remote control device with infrared learning function
CN105472782A (en) Wireless communication terminal
CN101465047B (en) Intelligent remote controller and control method thereof
CN204305007U (en) A kind of handheld device infrared communication system
CN100511314C (en) Wireless transmitting/receiving device and method based on synthesis medium apparatus scene controlling
CN203732953U (en) Intelligent home control system
CN203386343U (en) Learning infrared remote controller based on WIFI (wireless fidelity)
CN201965746U (en) Remote control encoding circuit based on FPGA (Field Programmable Gate Array)
CN205751226U (en) Learning type infrared remote control device based on intelligent mobile terminal
CN204089795U (en) The learning-oriented superhet band decoding receiver of built-in aerial
WO2015000391A1 (en) Infrared transmitting and receiving circuit and implementation method thereof
CN203325203U (en) Infrared remote controller module, and intelligent terminal and remote control device with 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: 20160817

Termination date: 20170108

CF01 Termination of patent right due to non-payment of annual fee