CN108233939A - A kind of Manchester code coding method and system - Google Patents
A kind of Manchester code coding method and system Download PDFInfo
- Publication number
- CN108233939A CN108233939A CN201611160908.4A CN201611160908A CN108233939A CN 108233939 A CN108233939 A CN 108233939A CN 201611160908 A CN201611160908 A CN 201611160908A CN 108233939 A CN108233939 A CN 108233939A
- Authority
- CN
- China
- Prior art keywords
- manchester code
- manchester
- microcontroller
- code
- decoding
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M5/00—Conversion of the form of the representation of individual digits
- H03M5/02—Conversion to or from representation by pulses
- H03M5/04—Conversion to or from representation by pulses the pulses having two levels
- H03M5/06—Code representation, e.g. transition, for a given bit cell depending only on the information in that bit cell
- H03M5/12—Biphase level code, e.g. split phase code, Manchester code; Biphase space or mark code, e.g. double frequency code
Abstract
The present invention provides a kind of Manchester code coding method and system, includes the following steps:Manchester code is filtered, filters out the noise of high and low frequency;Waveform inversion is carried out to filtered Manchester code;Manchester code after waveform inversion is converted into 4 20mA current signals;Transformed Manchester code is coupled;Using microcontroller to the Manchester code after coupling into row decoding.Manchester code coding method and system of the present invention uses microcontroller into row decoding again after waveform integration is carried out to Manchester code, so as to improve the decoding efficiency of Manchester code and accuracy.
Description
Technical field
The present invention relates to a kind of digit translation method, more particularly to a kind of Manchester code coding method and system.
Background technology
Manchester code (Manchester Encoding), also referred to as phase code (Phase Encode, PE), are one
Kind synchronised clock coding techniques is encoded the clock and data of a synchronous bit stream by physical layer use.Manchester code with
Application too in net medium system belongs to the self-synchronizing method in two kinds of bit synchronization methods in data communication, i.e. recipient utilizes packet
Specific coding containing synchronizing signal extracts synchronizing signal to lock the clock pulse frequency of oneself, so as to reach from signal itself
Synchronous purpose.
Specifically, Manchester code is usually used in local network transport, and clock and data are included in data flow, transmitted
While code information, clock sync signal is also transferred to other side together.There is a saltus step in every coding, there is no direct currents point
Amount, therefore with self-synchronization and good interference free performance.But each symbol is transferred to two level, so data
Transmission rate only has the 1/2 of modulation rate.
Therefore, Manchester code is a kind of coding method of beyond tradition Digital Transmission, and which solve transmission data not to have
The problem of clock.In transmission process, Manchester code can not include start bit and suspension in clock bit and serial transmission
Position, so as to improve the speed of transmission and efficiency.
In receiving terminal, need to the Manchester code received into row decoding, to obtain transmitted data.The prior art
In, the Manchester code decoding circuit that generally use integrates realizes the decoding of Manchester code, the HD- produced such as HARRIS companies
The products such as the HM9215 of 6409, HUALON companies production.But integrated Manchester code decoding circuit is all as coding
Device/decoder is used at the same time.Since the frame structure of encoder/decoder is fixed, and synchronous head is generated by internal circuit, use
Family can not be generated from outside or change.Therefore for cannot not be individually with this kind of decoding using the receiving terminal of this kind of encoder
Device causes versatility poor into row decoding.
Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of Manchester code coding methods
And system, microcontroller is used again into row decoding after waveform integration is carried out to Manchester code, so as to improve Manchester code
Decoding efficiency and accuracy.
In order to achieve the above objects and other related objects, the present invention provides a kind of Manchester code coding method, including with
Lower step:Manchester code is filtered, filters out the noise of high and low frequency;Waveform is carried out to filtered Manchester code
It is inverted;Manchester code after waveform inversion is converted into 4-20mA current signals;Coupling is carried out to transformed Manchester code
It closes;Using microcontroller to the Manchester code after coupling into row decoding.
In one embodiment of the invention, when being filtered to Manchester code, using the RC band logicals being made of capacitance resistance
Wave filter, centre frequency are f=1/2 π RC.
In one embodiment of the invention, the coupling is exactly after the output terminal of Manchester code previous stage is directly connected to
The input terminal of level-one.
In one embodiment of the invention, the microcontroller is according to following principle into row decoding:
Manchester code by low transition to high level when, export binary number 0;
When Manchester code jumps to high level by high level, binary number 1 is exported.
In one embodiment of the invention, the microcontroller carries out translating for Manchester code using the data transfer mode of DMA
Code.
Meanwhile the present invention also provides a kind of Manchester code decoding system, including filter module, inversion module, modulus of conversion
Block, coupling module and microcontroller;
The filter module filters out the noise of high and low frequency for being filtered to Manchester code;
The inversion module is used to carry out waveform inversion to filtered Manchester code;
The modular converter is used to the Manchester code after waveform inversion being converted to 4-20mA current signals;
The coupling module is used to couple transformed Manchester code;
The microcontroller is used for the Manchester code after coupling into row decoding.
In one embodiment of the invention, the filter module uses the RC bandpass filters being made of capacitance resistance, center
Frequency is f=1/2 π RC.
In one embodiment of the invention, the coupling is exactly after the output terminal of Manchester code previous stage is directly connected to
The input terminal of level-one.
In one embodiment of the invention, the microcontroller is according to following principle into row decoding:
Manchester code by low transition to high level when, export binary number 0;
When Manchester code jumps to high level by high level, binary number 1 is exported.
In one embodiment of the invention, the microcontroller carries out translating for Manchester code using the data transfer mode of DMA
Code.
As described above, Manchester code coding method and system of the present invention, have the advantages that:
(1) waveform integration is carried out to Manchester code by receiving circuit first, to obtain regular waveform, then using single
Piece machine is into row decoding, so as to improve decoding efficiency and accuracy;
(2) it is easily operated easy, it is at low cost, there is stronger flexibility;
(3) Manchester code of 200KHz can accurately be translated.
Description of the drawings
Fig. 1 is shown as the flow chart of Manchester code coding method of the present invention;
Fig. 2 is shown as the structure diagram of the Manchester code decoding system of the present invention.
Component label instructions
1 filter module,
2 inversion modules
3 modular converters
4 coupling modules
5 microcontrollers
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.
It should be noted that the diagram provided in the present embodiment only illustrates the basic conception of the present invention in a schematic way,
Then in schema only display with it is of the invention in related component rather than component count, shape and size during according to actual implementation paint
System, kenel, quantity and the ratio of each component can be a kind of random change, and its assembly layout kenel also may be used during actual implementation
It can be increasingly complex.
With reference to Fig. 1, Manchester code coding method of the invention includes the following steps:
Step S1, Manchester code is filtered, filters out the noise of high and low frequency.
Specifically, using the RC bandpass filters being made of capacitance resistance, centre frequency is f=1/2 π RC.
Step S2, waveform inversion is carried out to filtered Manchester code.
Specifically, it is 0V when inputting, exports as 5V;When input is 5V, export as 0V, so as to fulfill Synchronization
Waveform inversion.
Step S3, the Manchester code after waveform inversion is converted into 4-20mA current signals.
Step S4, transformed Manchester code is coupled.
Specifically, coupling is exactly that the output terminal of Manchester code previous stage is directly connected to the input terminal of rear stage.
Step S5, using microcontroller to the Manchester code after coupling into row decoding.
Microcontroller is a kind of IC chip, is with data-handling capacity using very large scale integration technology
Central processor CPU, random access memory ram, read only memory ROM, it is a variety of I/O mouthfuls and interrupt system, timer/counter
Etc. functions (circuits such as display driver circuit, pulse-width modulation circuit, analog multiplexer, A/D converter may be further included) collection
Into to the small and perfect microcomputer system formed on one piece of silicon chip.
Specifically, microcontroller according to following principle into row decoding:
1) when Manchester code jumps to high level (1) by low level (0), binary number 0 is exported;
2) when Manchester code jumps to high level (0) by high level (1), binary number 1 is exported.
According to above-mentioned decoding principle, the Manchester code after coupling is decoded as binary coding by microcontroller, so as to obtain
Decoded Manchester code.
Specifically, the Manchester code after coupling is sent to the I/O mouths of microcontroller, is passed by microcontroller using the data of DMA
Defeated mode carries out the decoding of Manchester code.Wherein, DMA is between peripheral hardware and memory or between memory and memory
High speed data transfer channel.Internal storage access is directly carried out, is a kind of without CPU and directly from the number of memory access data
According to switch mode.In dma mode, CPU need only assign instruction to dma controller, allow dma controller to handle the biography of data
It send, information is fed back to CPU by Data Transfer Done again, thus largely alleviates cpu resource occupation rate, can be significantly
Save system resource.
With reference to Fig. 2, Manchester code decoding system of the invention include the filter module 1 being sequentially connected, inversion module 2,
Modular converter 3, coupling module 4 and microcontroller 5.
Filter module 1 filters out the noise of high and low frequency for being filtered to Manchester code.
Specifically, using the RC bandpass filters being made of capacitance resistance, centre frequency is f=1/2 π RC.
Inversion module 2 is used to carry out waveform inversion to filtered Manchester code.
Specifically, it is 0V when inputting, exports as 5V;When input is 5V, export as 0V, so as to fulfill Synchronization
Waveform inversion.
Modular converter 3 is used to the Manchester code after waveform inversion being converted to 4-20mA current signals.
Coupling module 4 is used to couple transformed Manchester code.
Specifically, coupling is exactly that the output terminal of Manchester code previous stage is directly connected to the input terminal of rear stage.
Microcontroller 5 is used for the Manchester code after coupling into row decoding.
Microcontroller is a kind of IC chip, is with data-handling capacity using very large scale integration technology
Central processor CPU, random access memory ram, read only memory ROM, it is a variety of I/O mouthfuls and interrupt system, timer/counter
Etc. functions (circuits such as display driver circuit, pulse-width modulation circuit, analog multiplexer, A/D converter may be further included) collection
Into to the small and perfect microcomputer system formed on one piece of silicon chip.
Specifically, microcontroller according to following principle into row decoding:
1) when Manchester code jumps to high level (1) by low level (0), binary number 0 is exported;
2) when Manchester code jumps to high level (0) by high level (1), binary number 1 is exported.
According to above-mentioned decoding principle, the Manchester code after coupling is decoded as binary coding by microcontroller, so as to obtain
Decoded Manchester code.
Specifically, the Manchester code after coupling is sent to the I/O mouths of microcontroller, is passed by microcontroller using the data of DMA
Defeated mode carries out the decoding of Manchester code.Wherein, DMA is between peripheral hardware and memory or between memory and memory
High speed data transfer channel.Internal storage access is directly carried out, is a kind of without CPU and directly from the number of memory access data
According to switch mode.In dma mode, CPU need only assign instruction to dma controller, allow dma controller to handle the biography of data
It send, information is fed back to CPU by Data Transfer Done again, thus largely alleviates cpu resource occupation rate, can be significantly
Save system resource.
In conclusion the present invention Manchester code coding method and system first by receiving circuit to Manchester code
Waveform integration is carried out, to obtain regular waveform, then using microcontroller into row decoding, so as to improve decoding efficiency and accurate
Property;It is easily operated easy, it is at low cost, there is stronger flexibility;The Manchester code of 200KHz can accurately be translated.So
The present invention effectively overcomes various shortcoming of the prior art and has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as
Into all equivalent modifications or change, should by the present invention claim be covered.
Claims (10)
1. a kind of Manchester code coding method, it is characterised in that:Include the following steps:
Manchester code is filtered, filters out the noise of high and low frequency;
Waveform inversion is carried out to filtered Manchester code;
Manchester code after waveform inversion is converted into 4-20mA current signals;
Transformed Manchester code is coupled;
Using microcontroller to the Manchester code after coupling into row decoding.
2. Manchester code coding method according to claim 1, it is characterised in that:Manchester code is filtered
When, using the RC bandpass filters being made of capacitance resistance, centre frequency is f=1/2 π RC.
3. Manchester code coding method according to claim 1, it is characterised in that:The coupling is exactly by Manchester
The output terminal of code previous stage is directly connected to the input terminal of rear stage.
4. Manchester code coding method according to claim 1, it is characterised in that:The microcontroller is according to following principle
Into row decoding:
Manchester code by low transition to high level when, export binary number 0;
When Manchester code jumps to high level by high level, binary number 1 is exported.
5. Manchester code coding method according to claim 1, it is characterised in that:The microcontroller uses the number of DMA
The decoding of Manchester code is carried out according to transmission mode.
6. a kind of Manchester code decoding system, it is characterised in that:Including filter module, inversion module, modular converter, coupled mode
Block and microcontroller;
The filter module filters out the noise of high and low frequency for being filtered to Manchester code;
The inversion module is used to carry out waveform inversion to filtered Manchester code;
The modular converter is used to the Manchester code after waveform inversion being converted to 4-20mA current signals;
The coupling module is used to couple transformed Manchester code;
The microcontroller is used for the Manchester code after coupling into row decoding.
7. Manchester code decoding system according to claim 6, it is characterised in that:The filter module is used by capacitance
The RC bandpass filters of resistance composition, centre frequency are f=1/2 π RC.
8. Manchester code decoding system according to claim 6, it is characterised in that:The coupling is exactly by Manchester
The output terminal of code previous stage is directly connected to the input terminal of rear stage.
9. Manchester code decoding system according to claim 6, it is characterised in that:The microcontroller is according to following principle
Into row decoding:
Manchester code by low transition to high level when, export binary number 0;
When Manchester code jumps to high level by high level, binary number 1 is exported.
10. Manchester code decoding system according to claim 6, it is characterised in that:The microcontroller uses the number of DMA
The decoding of Manchester code is carried out according to transmission mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611160908.4A CN108233939A (en) | 2016-12-15 | 2016-12-15 | A kind of Manchester code coding method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611160908.4A CN108233939A (en) | 2016-12-15 | 2016-12-15 | A kind of Manchester code coding method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108233939A true CN108233939A (en) | 2018-06-29 |
Family
ID=62650469
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611160908.4A Pending CN108233939A (en) | 2016-12-15 | 2016-12-15 | A kind of Manchester code coding method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108233939A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1108866A (en) * | 1993-04-29 | 1995-09-20 | 艾利森·Ge·流动通讯有限公司 | Demodulator for manchester-coded FM signals |
CN1557079A (en) * | 2001-09-24 | 2004-12-22 | �ʼҷ����ֵ��ӹɷ�����˾ | Infrared communications system comprising a coding function to reduce the maximum number of consecutive spaces in the signal sent |
US7821428B2 (en) * | 2004-06-03 | 2010-10-26 | Silicon Laboratories Inc. | MCU with integrated voltage isolator and integrated galvanically isolated asynchronous serial data link |
CN102231182A (en) * | 2010-07-28 | 2011-11-02 | 广东顶固集创家居股份有限公司 | Radio frequency induction lock and reading card module |
-
2016
- 2016-12-15 CN CN201611160908.4A patent/CN108233939A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1108866A (en) * | 1993-04-29 | 1995-09-20 | 艾利森·Ge·流动通讯有限公司 | Demodulator for manchester-coded FM signals |
CN1557079A (en) * | 2001-09-24 | 2004-12-22 | �ʼҷ����ֵ��ӹɷ�����˾ | Infrared communications system comprising a coding function to reduce the maximum number of consecutive spaces in the signal sent |
US7821428B2 (en) * | 2004-06-03 | 2010-10-26 | Silicon Laboratories Inc. | MCU with integrated voltage isolator and integrated galvanically isolated asynchronous serial data link |
CN102231182A (en) * | 2010-07-28 | 2011-11-02 | 广东顶固集创家居股份有限公司 | Radio frequency induction lock and reading card module |
Non-Patent Citations (4)
Title |
---|
吴小钧: "《计算机网络应用教程》", 28 February 2013, 西安电子科技大学 * |
李杏春等: "《8098单片机原理及使用接口技术》", 31 May 1996, 北京航空航天大学出版社 * |
王德强: "《电路分析基础(第2版)》", 31 March 2013, 国防工业出版社 * |
董福强: "《STM32的曼彻斯特编译码系统设计》", 《单片机与嵌入式系统应用》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102681971B (en) | A kind of method of carrying out high-speed interconnect between FPGA plate based on aurora agreement | |
CN104935311B (en) | A kind of data signal isolator and corresponding pulsewidth decoding method | |
KR20150121724A (en) | Transcoding method for multi-wire signaling that embeds clock information in transition of signal state | |
CN104808966B (en) | The method and apparatus of efficient coding | |
EP3147943B1 (en) | Multi-level signaling for on-package chip-to-chip interconnect through silicon bridge | |
CN107534548B (en) | Clock and data recovery for a pulse-based multiline | |
CN103870421B (en) | A kind of serial line interface based on FPGA and PWM combination application IP kernel device | |
CN204256732U (en) | The high-speed data transmission apparatus of Based PC I-Express interface | |
CN107436851A (en) | The line shielding system of Serial Peripheral Interface (SPI) four and its control method | |
CN105072058B (en) | A kind of positive and negative phase coding method of data and data transmission method based on optical fiber transmission | |
CN104796653B (en) | The method and apparatus that MIPI signals are transmitted under LPDT patterns realized based on FPGA | |
CN102098055A (en) | Data baud rate adaptive digital-analogue conversion device | |
CN108233939A (en) | A kind of Manchester code coding method and system | |
CN202495998U (en) | Digital television and system capable of realizing serial communication using mini USB interface | |
CN103279442A (en) | Message filtering system and message filtering method of high-speed interconnection bus | |
CN106533613A (en) | Novel high-speed 8B/10B coding circuit technology | |
CN203722673U (en) | Controller using audio line for communication with intelligent terminal | |
CN202500555U (en) | Data transmission system in petroleum logger | |
CN202632782U (en) | Multi-channel SSI (Small Scale Integration) data acquisition module based on MicroBlaze soft core | |
CN206260018U (en) | A kind of LED reception card hardware circuit platform based on domestic fpga chip | |
CN103685640A (en) | Controller communicated with intelligent terminal based on audio cable and communication method of controller and intelligent terminal | |
CN103684473A (en) | High-speed serial-parallel conversion circuit based on FPGA | |
CN102594358A (en) | Code system conversion circuit for converting binary-coded decimal (BCD) codes to Lee restrict competition count codes | |
CN107548183A (en) | LED driving light modulation chips based on radio communication | |
CN203376748U (en) | Single-bus receiving logical structure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180629 |
|
RJ01 | Rejection of invention patent application after publication |