CN102006083B - Method for decoding phase code - Google Patents
Method for decoding phase code Download PDFInfo
- Publication number
- CN102006083B CN102006083B CN 201010582983 CN201010582983A CN102006083B CN 102006083 B CN102006083 B CN 102006083B CN 201010582983 CN201010582983 CN 201010582983 CN 201010582983 A CN201010582983 A CN 201010582983A CN 102006083 B CN102006083 B CN 102006083B
- Authority
- CN
- China
- Prior art keywords
- trailing edge
- logical value
- time interval
- bit
- occur
- 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.)
- Active
Links
Images
Landscapes
- Dc Digital Transmission (AREA)
Abstract
The invention relates to a method for decoding a phase code. A previous waveform logic value and a time difference value between two adjacent falling edges are used and the logic value(s) of the next one or two bits is resolved by one of the following two methods: (1) the time of each code element is set as 2a; a falling edge exists in the middle of the previous waveform when the previous bit is 0, and the next bit is 0 when the time interval between the falling edge and the next falling edge is 2a; if the time interval between the two falling edges is 3a, the next two bits are 11; and if the time interval between the two falling edges is 4a, the next two bits are 10; and (2) when the previous bit is 1 and the logic value of the next bit cannot be resolved by the method (2), a falling edge surely exists at the start position of the previous waveform; if the time interval between the falling edge and the next falling edge is 2a, the next bit is 1; and if the time interval between the two falling edges is 3a, the next bit is 0. The method makes decoding easy, has high error correction performance and good using effect and is easy to implement.
Description
Technical field
The present invention relates to a kind of coding/decoding method of phase code, can be applicable to the decoding occasion that RC agreement etc. adopts phase-coded waveform.
Background technology
In the prior art, the decoding of all kinds of RC5 remote controllers mainly contains following method: the first is to utilize the decoding of chip (hardware) function, and the method needs hardware to cooperate decoding, and the chip cost is high; The second is to fix time to read waveform high-low level value, and the method anti-interference is poor, easily separates error code; The third is to read high-low level time and judge the high-low level sequencing, and the method utilizes timer to finish, and takies a large amount of timer system, is not suitable for the long decoding such as RC5 of yardage, the wrong ability of holding concurrently, and software is realized complexity.
The RC5 agreement adopts Manchester's code, and namely phase code comprises 3 start bit, 5 address bit, and 6 command bit, and every time is a constant.Manchester's code is that clock and data are included in the data flow, and each code element is transferred to two level, and a saltus step is arranged in every coding, in transmission code information, also clock sync signal is transferred to the other side together.
Summary of the invention
The object of the present invention is to provide a kind of coding/decoding method of phase code, the method is not only decoded simply, better error-correcting performance, and be easy to realize, result of use is good.
For achieving the above object, technical scheme of the present invention is: a kind of coding/decoding method of phase code, it is characterized in that: the time difference that utilizes last digit wave form logical value and adjacent two trailing edges to occur solves one of as follows next bit or lower two logical value:
(101) establishing each symbol time is 2a, when last digit wave form logical value is 0, then in the middle of the last digit wave form trailing edge is arranged, if the time interval that described trailing edge and next trailing edge occur is 2a, then the logical value of next bit is 0; If the time interval that described trailing edge and next trailing edge occur is 3a, then lower two logical value is 11; If the time interval that described trailing edge and next trailing edge occur is 4a, then lower two logical value is 10;
(102) establishing each symbol time is 2a, when last digit wave form logical value is 1 and can't solve the logical value of next bit by method (101) time, then must there be a trailing edge starting position of last digit wave form, if the time interval that described trailing edge and next trailing edge occur is 2a, then the logical value of next bit is 1; If the time interval that described trailing edge and next trailing edge occur is 3a, then the logical value of next bit is 0.
The invention has the beneficial effects as follows the time difference that utilizes last digit wave form logical value and adjacent two trailing edges to occur, solve next bit or lower two logical value, not only decoding is simple, better error-correcting performance, and be easy to realize, can be widely used in various decodings with RC5 agreement remote controller and similar waveform.
The present invention is described in further detail below in conjunction with drawings and the specific embodiments.
Description of drawings
Fig. 1 is the oscillogram of method among the present invention (101) decoding.
Fig. 2 is the oscillogram of method among the present invention (102) decoding.
Fig. 3 is the oscillogram of method in the derivation of the present invention (202) decoding.
Fig. 4 is the oscillogram of method in the derivation of the present invention (203) decoding.
Embodiment
The coding/decoding method of phase code of the present invention, the time difference that utilizes last digit wave form logical value and adjacent two trailing edges to occur solves one of as follows next bit or lower two logical value:
(101) establishing each symbol time is 2a, when last digit wave form logical value is 0, then in the middle of the last digit wave form trailing edge is arranged, if the time interval that described trailing edge and next trailing edge occur is 2a, then the logical value of next bit is 0; If the time interval that described trailing edge and next trailing edge occur is 3a, then lower two logical value is 11; If the time interval that described trailing edge and next trailing edge occur is 4a, then lower two logical value is 10;
(102) establishing each symbol time is 2a, when last digit wave form logical value is 1 and can't solve the logical value of next bit by method (101) time, then must there be a trailing edge starting position of last digit wave form, this be because: if the starting position of last digit wave form without trailing edge, then last digit wave form logical value is 0 again, then according to method (101), can solve simultaneously the logical value of last position and next bit, therefore, front two waveform logic value is 1, a trailing edge must be arranged between the two; At this moment, if the time interval that described trailing edge and next trailing edge occur is 2a, then the logical value of next bit is 1; If the time interval that described trailing edge and next trailing edge occur is 3a, then the logical value of next bit is 0.
Because the numerical value of first Bit of RC5 agreement is fixing, when the first bit value of whole coding is defined as 0, solves next bit or lower two logical value by method (101); When the first bit value of whole coding was defined as 1, if the time interval that the original position of whole coding and first trailing edge occur is 2a, then the logical value of next bit was 1; If the time interval that the original position of whole coding and first trailing edge occur is 3a, then the logical value of next bit is 0.
The below does corresponding explanation to the derivation of above-mentioned coding/decoding method.
According to the rule of phase code, the time difference that can utilize last position or front two waveform logic value and adjacent two trailing edges to occur solves one of as follows next bit or lower two logical value:
(201) establishing each symbol time is 2a, when last digit wave form logical value is 0, then in the middle of the last digit wave form trailing edge is arranged, if the time interval that described trailing edge and next trailing edge occur is 2a, then the logical value of next bit is 0; If the time interval that described trailing edge and next trailing edge occur is 3a, then lower two logical value is 11; If the time interval that described trailing edge and next trailing edge occur is 4a, then lower two logical value is 10;
When last digit wave form logical value is 1, owing to can't determine the position of previous trailing edge, therefore, need to get again one forward, can be divided into following two kinds of situations:
(202) establishing each symbol time is 2a, and current two digit wave form logical values are 11 o'clock, and a trailing edge is then arranged between the front two waveform, if the time interval that described trailing edge and next trailing edge occur is 2a, then the logical value of next bit is 1; If the time interval that described trailing edge and next trailing edge occur is 3a, then the logical value of next bit is 0;
(203) establishing each symbol time is 2a, and current two digit wave form logical values are 01 o'clock, and a trailing edge is then arranged between the front two waveform, if the time interval that described trailing edge and next trailing edge occur is 3a, then the logical value of next bit is 1; If the time interval that described trailing edge and next trailing edge occur is 4a, then the logical value of next bit is 0.
Associated methods (201), (202), (203) can find, current two digit wave form logical values are 01 o'clock, then can adopt method (201), solve simultaneously the logical value of last position and next bit.Therefore, during decoding, as long as employing method (201) judges first and decode, just the described situation of method (203) can not occur, therefore, method (203) be simplified, thereby obtained coding/decoding method of the present invention.
More than be preferred embodiment of the present invention, all changes of doing according to technical solution of the present invention when the function that produces does not exceed the scope of technical solution of the present invention, all belong to protection scope of the present invention.
Claims (1)
1. the coding/decoding method of a phase code is characterized in that: the time difference that utilizes last digit wave form logical value and adjacent two trailing edges to occur solves one of as follows next bit or lower two logical value:
(101) establishing each symbol time is 2a, when last digit wave form logical value is 0, then in the middle of the last digit wave form trailing edge is arranged, if the time interval that described trailing edge and next trailing edge occur is 2a, then the logical value of next bit is 0; If the time interval that described trailing edge and next trailing edge occur is 3a, then lower two logical value is 11; If the time interval that described trailing edge and next trailing edge occur is 4a, then lower two logical value is 10;
(102) establishing each symbol time is 2a, when last digit wave form logical value is 1 and can't solve the logical value of next bit by method (101) time, then must there be a trailing edge starting position of last digit wave form, if the time interval that described trailing edge and next trailing edge occur is 2a, then the logical value of next bit is 1; If the time interval that described trailing edge and next trailing edge occur is 3a, then the logical value of next bit is 0;
When the first bit value of whole coding is defined as 0, solve next bit or lower two logical value by method (101); When the first bit value of whole coding was defined as 1, if the time interval that the original position of whole coding and first trailing edge occur is 2a, then the logical value of next bit was 1; If the time interval that the original position of whole coding and first trailing edge occur is 3a, then the logical value of next bit is 0.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010582983 CN102006083B (en) | 2010-12-10 | 2010-12-10 | Method for decoding phase code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010582983 CN102006083B (en) | 2010-12-10 | 2010-12-10 | Method for decoding phase code |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102006083A CN102006083A (en) | 2011-04-06 |
CN102006083B true CN102006083B (en) | 2013-01-16 |
Family
ID=43813199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010582983 Active CN102006083B (en) | 2010-12-10 | 2010-12-10 | Method for decoding phase code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102006083B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105262565B (en) * | 2015-09-11 | 2018-10-09 | 烽火通信科技股份有限公司 | A kind of coding method and system for transmitting clock and data based on phase-modulation |
CN105703885B (en) * | 2015-12-08 | 2019-01-22 | 重庆川仪自动化股份有限公司 | Analysis method and device based on Manchester code |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1008316B (en) * | 1985-05-08 | 1990-06-06 | 索尼公司 | Decoding method and system for error correcting codes |
US5359606A (en) * | 1992-02-12 | 1994-10-25 | Storage Technology Corporation | Data quality analysis in a data signal processing channel |
-
2010
- 2010-12-10 CN CN 201010582983 patent/CN102006083B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN102006083A (en) | 2011-04-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
ES2705045T3 (en) | Clock recovery circuit for multi-wire data signals | |
US10216690B2 (en) | Single-wire interface bus transceiver system based on I2C-bus, and associated method for communication of single-wire interface bus | |
JP6878300B2 (en) | Improved virtual GPIO with multi-mode modulation | |
US10511406B1 (en) | Power saving in a twisted wire pair communication network | |
CN101320516B (en) | Method for decoding infrared ray by waveshape learning circuit | |
CN105187070A (en) | Manchester encoding signal decoding method and device | |
WO2015155242A1 (en) | 2-wire differential-end bus transceiver system based on 12c-bus, and associated method for communication of 2-wire differential-end bus | |
CA2926832A1 (en) | Devices and methods for facilitating data inversion to limit both instantaneous current and signal transitions | |
CN105591716B (en) | A kind of serial data communication method, apparatus and system based on single carrier | |
CN102006083B (en) | Method for decoding phase code | |
JP2018506915A (en) | Multi-modulation to reduce data link power and improve throughput | |
CN102868482A (en) | Method and device for multi-level coding modulation | |
CN101841393A (en) | PWM (Pulse Width Modulation) input module and MVB (Multifunction Vehicle Bus) equipment based on MVB interface | |
CN102932103B (en) | A kind of message transmission rate adaptive reception method based on digital transformer substation | |
JP2008193576A (en) | Radio tag reader | |
CN104202312A (en) | Rapid and stable data transmission method based on mobile phone audio channels | |
US10585844B1 (en) | Reliable asynchronous baseband protocol with clock and data recovery by correlation | |
CN104242950A (en) | Synchronous decoder for low-speed BPSK signal | |
CN104598421A (en) | Serial port communication method | |
CN203406971U (en) | DCA bit signal encoding circuit in FPD-LINK LVDS video transmission | |
CN203596816U (en) | BCH coding and decoding circuit | |
CN108667558B (en) | Coding method suitable for transmitting short content | |
CN104427343A (en) | Circuit and method for encoding DCA (dynamic channel allocation) bit signal in FPD-LINK LVDS (flat panel display-LINK low voltage differential signaling) video transmission | |
CN203813768U (en) | BCH coding and decoding circuit with reliable data transmission | |
CN117424675A (en) | Passive transmission method and device, electronic equipment and storage medium |
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 | ||
CP03 | Change of name, title or address |
Address after: 350300 Fuqing City, Fuzhou, Fujian, the reunification of overseas Chinese economic and Technological Development Zone Patentee after: TPV Electronic Technology (Fujian) Co., Ltd Address before: 350301 Fujian JIELIAN Electronics Co., Ltd Patentee before: Fujian Jielian Electronic Co Ltd |
|
CP03 | Change of name, title or address |