CN107359964A - Data transmission method for uplink and device - Google Patents
Data transmission method for uplink and device Download PDFInfo
- Publication number
- CN107359964A CN107359964A CN201611053483.7A CN201611053483A CN107359964A CN 107359964 A CN107359964 A CN 107359964A CN 201611053483 A CN201611053483 A CN 201611053483A CN 107359964 A CN107359964 A CN 107359964A
- Authority
- CN
- China
- Prior art keywords
- sequence
- bit
- data
- wave sequence
- wave
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0006—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
- H04L1/0007—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0078—Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
- H04L1/0083—Formatting with frames or packets; Protocol or part of protocol for error control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
Abstract
The present invention, which provides a kind of data transmission method for uplink and device, wherein method, to be included:Obtain the bit sequence of data to be sent;According to the bit sequence of data to be sent, wave sequence corresponding to the bit in bit sequence is continuously transmitted;Wherein, first data bit is represented with first waveform sequence, the second data bit is represented with the second wave sequence and the 3rd wave sequence respectively, first data bit is one in bit 1 and bit 0, second data bit is another in bit 1 and bit 0, when at least two bits continuously transmitted are the second data bit, wave sequence is the second wave sequence corresponding to first bit at least two bits continuously transmitted, and wave sequence corresponding to second bit and follow-up bit is the 3rd wave sequence.By the data transmission method for uplink of the present invention, equipment can get electric energy as much as possible, on the premise of data transmission efficiency is not influenceed, improve power supplying efficiency.
Description
Technical field
The present invention relates to a kind of electronic technology field, more particularly to a kind of data transmission method for uplink and device.
Background technology
Communicating pair can pass through the change of level height under the occasion of wired electrical connection between sender and recipient
Change and transmit data, i.e. the level that sender can control between the two carrys out the transmission of control signal.Now, due to both it
Between necessarily maintain have the situation of high level, then it be that itself be charged that now a side, which can utilize the high level, logical so as to realize
The purpose that can also be charged while letter.However, in the prior art, bit is typically directly represented using high level and low level
1 or the coded system of bit 0, i.e. when sender will send bit 1, the level on the circuit is maintained high level;Sender will
When sending bit 0, the level on the circuit is maintained low level.Now necessarily there is a utilization when sending bit 1 or bit 0
For low level come the bit that represents, general low level is level for 0 or the magnitude of voltage of very little, is typically unable to reach the mesh of charging
's.It can be seen that the problem of charge efficiency is low be present in the coded system of prior art.
Although in addition, do not use high level and low level in existing some signal transmission technologies represent bit 1 or
The coded system of bit 0, and be changed to use and different bit values is distinguished using different time intervals, for example, bit 00 uses T+
T1 represents that bit 01 represents that bit 10 is represented with T+t3 with T+t2, and bit 11 is represented with T+t4, is passed using the existing signal
Transferring technology, the duration transmitted needed for different bit values is longer, and the code efficiency of data bit is relatively low, adds sender and connects
The burden and cost of debit.
The content of the invention
Present invention seek to address that one of above mentioned problem.
It is a primary object of the present invention to provide a kind of data transmission method for uplink.
A further object of the present invention is to provide a kind of data sending device.
To reach above-mentioned purpose, what technical scheme was specifically realized in:
The solution of the present invention 1 provides a kind of data transmission method for uplink, including:Obtain the bit sequence of data to be sent;According to
The bit sequence of the data to be sent, continuously transmits wave sequence corresponding to the bit in the bit sequence, wherein, it is described
Wave sequence includes one below:First waveform sequence, the second wave sequence and the 3rd wave sequence, with the first waveform sequence
Row represent the first data bit, represent the second data bit respectively with second wave sequence and the 3rd wave sequence,
First data bit is one in bit 1 and bit 0, and second data bit is in the bit 1 and bit 0
Another, is when at least two bits continuously transmitted are second data bit, at least two ratios continuously transmitted
Wave sequence corresponding to first bit in spy is second wave sequence, and second bit and follow-up bit are corresponding
Wave sequence be the 3rd wave sequence;Wherein, the feature of the wave sequence includes:The first waveform sequence is held
The duration of continuous time, the duration of second wave sequence and the 3rd wave sequence are identical, and described the
The waveform change of one wave sequence is started using high level and saltus step is low level after continuing the first preset time, second waveform
Sequence permanent High level within the duration, the 3rd wave sequence are started with high level and continue the second preset time
Saltus step is low level afterwards, wherein, first preset time is different from the duration of second preset time.
Scheme 2, the method according to scheme 1, the bit sequence according to the data to be sent, continuously transmit institute
Wave sequence corresponding to the bit in bit sequence is stated, including:The level of sending port is controlled according in the bit sequence
The feature of the waveform of wave sequence corresponding to bit and the wave sequence is changed, to send the data to be sent.
Scheme 3, the method according to scheme 1 or 2, the feature of the wave sequence also include:The duration with
The baud rate for transmitting the wave sequence is in inverse relation;The first waveform sequence is terminated with high level, and the first wave
The low level occurred in shape sequence total duration shared within the duration is not with the baud rate for transmitting the wave sequence
Change and change;Occur and/or the 3rd wave sequence is terminated with high level, and in the 3rd wave sequence low
Level total duration shared within the duration does not change with the change for the baud rate for transmitting the wave sequence.
Scheme 4, the method according to scheme 3, the feature of the wave sequence also include:In the first waveform sequence
The low level of appearance total duration shared within the duration is less than the half of the duration;It is and/or described
The low level occurred in 3rd wave sequence total duration shared within the duration is less than two points of the duration
One of.
Scheme 5, the method according to any one of scheme 1 to 4, T1=a × T, wherein, when T1 is described first default
Between, T is the duration, and a is default dutycycle coefficient, 0 < a < 1;T2=b × T, wherein, T2 is described second default
Time, b are default dutycycle coefficient, 0≤b < 1;And a ≠ b.
Scheme 6, the method according to any one of scheme 1 to 5, the feature of the wave sequence also include:Described second
Preset time is equal to 0, and the 3rd wave sequence only occurs once being changed into high level from low level within the duration
Level saltus step, and terminated with high level;In the case where the first waveform sequence is terminated with low level, the first waveform
Sequence is started with high level and only occurs once being changed into low level level saltus step from high level within the duration;Or
Person, in the case where the first waveform sequence is terminated with high level, the first waveform sequence is started with high level and in institute
State in the duration and only occur once being changed into low level level saltus step from high level.
Scheme 7, the method according to any one of scheme 1 to 6, the bit sequence of the data to be sent wrap successively
Include:Data frame head, data to be transmitted and data postamble, the data frame head comprise at least 1 bit, the data frame head
1st wave sequence corresponding to bit is the 3rd wave sequence or the first waveform sequence.
Scheme 8, the method according to any one of scheme 1 to 6, the bit sequence of the data to be sent wrap successively
Include:Data frame head, data to be transmitted and data postamble, the data frame head comprise at least M bit, M be positive integer and M >=
2;Wherein, wave sequence corresponding to the preceding M bit of the data frame head is made up of the M first waveform sequences;It is or described
Wave sequence corresponding to the preceding M bit of data frame head is made up of M the 3rd wave sequences;Or before the data frame head
Wave sequence corresponding to M bit includes at least one first waveform sequence and at least one 3rd wave sequence.
Scheme 9, the method according to scheme 8, wave sequence corresponding to the preceding M bit of the data frame head is by M
During the first waveform sequence composition, the data frame head also includes:After the preceding M bit of the data frame head at least
1 anti-interference bit, wherein, wave sequence corresponding to the anti-interference bit of at least one is second wave sequence or institute
State the 3rd wave sequence;Wave sequence corresponding to the preceding M bit of the data frame head is made up of M the 3rd wave sequences
When, the data frame head also includes:The anti-interference bit of at least one after the preceding M bit of the data frame head, wherein,
Wave sequence corresponding to the anti-interference bit of at least one is second wave sequence or the first waveform sequence.
Scheme 10, the method according to any one of scheme 7 to 9, the data frame head include 8 bits, described 8
Wave sequence corresponding to bit is followed successively by the 3rd wave sequence, the 3rd wave sequence, the 3rd wave sequence, institute
State the 3rd wave sequence, second wave sequence, the 3rd wave sequence, second wave sequence and the 3rd ripple
Shape sequence.
Scheme 11, the method according to any one of scheme 7 to 10, the data postamble include 2 bits, wherein:
Wave sequence corresponding to first bit of the data postamble is second wave sequence, the data postamble
Second bit corresponding to wave sequence be second wave sequence, or, first bit pair of the data postamble
The wave sequence answered is the 3rd wave sequence, and wave sequence corresponding to second bit of the data postamble is described the
Two wave sequences, or, wave sequence corresponding to first bit of the data postamble is the first waveform sequence, described
Wave sequence corresponding to second bit of data postamble is the 3rd wave sequence.
Scheme 12, the method according to any one of scheme 7 to 11, the data to be transmitted comprise at least:At least 1 word
The marker bit of section, wherein, the marker bit comprises at least:The type of message position of at least 1 bit.
The present invention program 13 provides a kind of data sending device, including acquisition module and sending module:The acquisition module,
For obtaining the bit sequence of data to be sent;The sending module, for the bit sequence according to the data to be sent, connect
Supervention send wave sequence corresponding to bit in the bit sequence, wherein, the wave sequence includes one below:First wave
Shape sequence, the second wave sequence and the 3rd wave sequence, the first data bit is represented with the first waveform sequence, respectively with institute
State the second wave sequence and the 3rd wave sequence represents the second data bit, first data bit is bit 1 and ratio
One in spy 0, second data bit is another in the bit 1 and bit 0, at least two continuously transmitted
When bit is second data bit, waveform sequence corresponding to first bit at least two bits continuously transmitted
Second wave sequence is classified as, wave sequence corresponding to second bit and follow-up bit is the 3rd waveform sequence
Row;Wherein, the feature of the wave sequence includes:The duration of the first waveform sequence, second wave sequence
Duration and the duration of the 3rd wave sequence are identical, and the waveform of the first waveform sequence changes with high electricity
It is low level to be opened flat saltus step after beginning and continuing the first preset time, and second wave sequence continues height within the duration
Level, the 3rd wave sequence started using high level and after continuing the second preset time saltus step as low level, wherein, described
One preset time is different from the duration of second preset time.
Scheme 14, the device according to scheme 13, the bit sequence according to the data to be sent, continuously transmit
Wave sequence corresponding to bit in the bit sequence, including:The level of sending port is controlled according in the bit sequence
Bit corresponding to the waveform of wave sequence and the feature of the wave sequence be changed, to send the number to be sent
According to.
Scheme 15, the device according to scheme 13 or 14, the feature of the wave sequence also include:The duration
Baud rate with transmitting the wave sequence is in inverse relation;The first waveform sequence is terminated with high level, and described first
The low level occurred in wave sequence total duration shared within the duration is not with the baud for transmitting the wave sequence
The change of rate and change;And/or the 3rd wave sequence is terminated with high level, and occur in the 3rd wave sequence
Low level total duration shared within the duration does not change with the change for the baud rate for transmitting the wave sequence.
Scheme 16, the device according to scheme 15, the feature of the wave sequence also include:The first waveform sequence
The low level of middle appearance total duration shared within the duration is less than the half of the duration;And/or institute
State the low level occurred in the 3rd wave sequence total duration shared within the duration and be less than the two of the duration
/ mono-.
Scheme 17, the device according to any one of scheme 13 to 16, T1=a × T, wherein, T1 is described first pre-
If the time, T is the duration, and a is default dutycycle coefficient, 0 < a < 1;T2=b × T, wherein, T2 is described second
Preset time, b are default dutycycle coefficient, 0≤b < 1;And a ≠ b.
Scheme 18, the device according to any one of scheme 13 to 17, the feature of the wave sequence also include:Described
Two preset times are equal to 0, and the 3rd wave sequence only occurs once being changed into high electricity from low level within the duration
Flat level saltus step, and terminated with high level;In the case where the first waveform sequence is terminated with low level, the first wave
Shape sequence is started with high level and only occurs once being changed into low level level saltus step from high level within the duration;Or
Person, in the case where the first waveform sequence is terminated with high level, the first waveform sequence is started with high level and in institute
State in the duration and only occur once being changed into low level level saltus step from high level.
Scheme 19, the device according to any one of scheme 13 to 18, the bit sequence of the data to be sent is successively
Including:Data frame head, data to be transmitted and data postamble, the data frame head comprise at least 1 bit, the data frame head
The 1st wave sequence corresponding to bit be the 3rd wave sequence or the first waveform sequence.
Scheme 20, the device according to any one of scheme 13 to 18, the bit sequence of the data to be sent is successively
Including:Data frame head, data to be transmitted and data postamble, the data frame head comprise at least M bit, and M is positive integer and M
≥2;Wherein, wave sequence corresponding to the preceding M bit of the data frame head is made up of the M first waveform sequences;Or institute
Wave sequence corresponding to the preceding M bit of data frame head is stated to be made up of M the 3rd wave sequences;Or the data frame head
Wave sequence corresponding to preceding M bit includes at least one first waveform sequence and at least one 3rd waveform sequence
Row.
Scheme 21, the device according to scheme 20, wave sequence is by M corresponding to the preceding M bit of the data frame head
During the individual first waveform sequence composition, the data frame head also includes:After the preceding M bit of the data frame head extremely
Few 1 anti-interference bit, wherein, wave sequence corresponding to the anti-interference bit of at least one be second wave sequence or
3rd wave sequence;Wave sequence corresponding to the preceding M bit of the data frame head is by M the 3rd wave sequence groups
Cheng Shi, the data frame head also include:The anti-interference bit of at least one after the preceding M bit of the data frame head, its
In, wave sequence corresponding to the anti-interference bit of at least one is second wave sequence or the first waveform sequence.
Scheme 22, the device according to any one of scheme 19 to 21, the data frame head include 8 bits, and described 8
Wave sequence corresponding to individual bit be followed successively by the 3rd wave sequence, the 3rd wave sequence, the 3rd wave sequence,
3rd wave sequence, second wave sequence, the 3rd wave sequence, second wave sequence and the described 3rd
Wave sequence.
Scheme 23, the device according to any one of scheme 19 to 22, the data postamble include 2 bits, wherein:
Wave sequence corresponding to first bit of the data postamble is second wave sequence, the data postamble
Second bit corresponding to wave sequence be second wave sequence, or, first bit pair of the data postamble
The wave sequence answered is the 3rd wave sequence, and wave sequence corresponding to second bit of the data postamble is described the
Two wave sequences, or, wave sequence corresponding to first bit of the data postamble is the first waveform sequence, described
Wave sequence corresponding to second bit of data postamble is the 3rd wave sequence.
Scheme 24, the device according to any one of scheme 19 to 23, the data to be transmitted comprise at least:At least 1
The marker bit of byte, wherein, the marker bit comprises at least:The type of message position of at least 1 bit.
As seen from the above technical solution provided by the invention, the invention provides a kind of data transmission method for uplink and dress
Put, by the data transmission method for uplink of the present invention, when data sender is transmitting data to data receiver, using three kinds of waveforms
Sequence represents data bit 1 and 0, and wherein the second wave sequence is continued in high level, in addition two kinds of wave sequences
The high level of certain time is maintained, so that maintaining height in wave sequence corresponding to the bit sequence of data to be sent
The time of level is as long as possible so that is connected as far as possible with high level between data sender and data receiver, facilitates data
In sender or data receiver it is one of as slave unit when from main equipment get electric energy as much as possible, do not influenceing
On the premise of data transmission efficiency, power supplying efficiency is improved.In addition, in the present invention, different wave sequences it is transmitting continuous when
Between it is identical, i.e., a bit is transmitted with T, compared to from needing to transmit a ratio with different time intervals in the prior art
The mode of paricular value, the present invention transmission one bit needed for time it is shorter, therefore, code efficiency is higher, reduce sender and
The cost and burden of recipient.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment
Accompanying drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this
For the those of ordinary skill in field, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing.
Fig. 1 is the flow chart for the data transmission method for uplink that the embodiment of the present invention 1 provides;
Fig. 2 is the schematic diagram for the data frame that the embodiment of the present invention 1 provides;
Fig. 3 is the wave character figure for three kinds of wave sequences that the embodiment of the present invention 1 provides;
Fig. 4 is the schematic diagram for the first waveform sequence X that the embodiment of the present invention 1 provides;
Fig. 5 is a kind of data frame head form schematic diagram that the embodiment of the present invention 1 provides;
Fig. 6 is the flow chart for the data receiver method that the embodiment of the present invention 1 provides;
Fig. 7 is the specific implementation application drawing that the embodiment of the present invention 1 provides;
Fig. 8 is a kind of data sending device structural representation that the embodiment of the present invention 2 provides;
Fig. 9 is a kind of data sink structural representation that the embodiment of the present invention 2 provides;
Figure 10 is a kind of data transmission system structural representation that the embodiment of the present invention 2 provides.
Embodiment
With reference to the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.Based on this
The embodiment of invention, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made
Example, belongs to protection scope of the present invention.
In the description of the invention, it is to be understood that term " " center ", " longitudinal direction ", " transverse direction ", " on ", " under ",
The orientation or position relationship of the instruction such as "front", "rear", "left", "right", " vertical ", " level ", " top ", " bottom ", " interior ", " outer " are
Based on orientation shown in the drawings or position relationship, it is for only for ease of the description present invention and simplifies description, rather than instruction or dark
Show that the device of meaning or element there must be specific orientation, with specific azimuth configuration and operation, thus it is it is not intended that right
The limitation of the present invention.In addition, term " first ", " second " are only used for describing purpose, and it is not intended that instruction or hint are relative
Importance or quantity or position.
In the description of the invention, it is necessary to illustrate, unless otherwise clearly defined and limited, term " installation ", " phase
Even ", " connection " should be interpreted broadly, for example, it may be being fixedly connected or being detachably connected, or be integrally connected;Can
To be mechanical connection or electrical connection;Can be joined directly together, can also be indirectly connected by intermediary, Ke Yishi
The connection of two element internals.For the ordinary skill in the art, with concrete condition above-mentioned term can be understood at this
Concrete meaning in invention.
The embodiment of the present invention is described in further detail below in conjunction with accompanying drawing.
The present invention is based on a kind of data transmission system, and the data transmission system includes data sender and data receiver,
By wired connection between data sender and data receiver, data sender is by the change of level come to data receiver
The information to be sent, data receiver is by detecting or sensing the change of level come receive information.Data sender's sum
Can be a pair of master-slave equipments according to recipient, for example, data sender is main equipment, data receiver is slave unit, certainly, number
Can also be slave unit according to sender and data receiver is main equipment.Entered between main equipment and slave unit by cable data line
Row connection, when not transmitting data after being connected between main equipment and slave unit, then main equipment and slave unit maintain high level all the time
Connection, main equipment can be powered by the high level that wired connection provides for slave unit;When main equipment connect with slave unit it is laggard
During row data transfer, the level of sending port can be controlled to produce the change of low and high level according to wave sequence used by data
Change, moreover, in the time for permanent High level occur in wave sequence used by data, slave unit still can be from main equipment
Obtain electric energy.Wave sequence used by present invention also defines transceiving data between data sender and data receiver, tool
Body embodies in embodiment.
Embodiment 1
The present embodiment provides a kind of data transmission method for uplink, as shown in figure 1, including:
Step S101, obtain the bit sequence of data to be sent.
Specifically, when data sender needs to transmit data, it is by itself generation or by receiving outside set
The data to be sent that preparation is brought, data to be sent are converted into bit sequence corresponding to data to be sent, can also be direct
Receive the bit sequence for the data to be sent that external equipment sends over.The data to be sent can be that data sender will send
Data frame, the bit sequence of data to be sent can include:Data frame head, the transmission information such as data and data postamble.Such as
It is the example (i.e. a data frame) of a sequence of data bits to be sent shown in Fig. 2, including SOF, n words of data frame head
The transmission data of section, data postamble EOF, wherein data frame head SOF and data postamble EOF can every time communicate and appoint
The Bit String of fixed digit, and the transmission data of n byte according to transferring content, type of message it is different and different.On number
It is discussed in detail later according to frame head SOF and data postamble EOF.
In the optional embodiment of the present invention, in the bit sequence of data to be sent (i.e. a data frame)
It can be comprised at least in transmission data:At least marker bit of 1 byte, wherein, marker bit comprises at least:At least message of 1 bit
Type bit.Specifically, data to be sent can be different types of message, can be the report comprising request or response command
Text or the message for including the data to be transmitted, such as the message such as ATR, ACK, PKT.The packet of each transmission data
Length can be fixed value, and the fixed value can be allocated according to different registers, can be defaulted as each transmission data
Long data packet is 64 bytes, most long the long data packet of each transmission data to be fixed as into 256 bytes, certainly, specific
In transmission, the length of last transmission packet can be less than default-length.Marker bit in transmission data is used to mark this
The feature of data is transmitted, the marker bit of 1 byte can be located at the 1st byte (positions of Byte 0 in such as Fig. 2) of transmission data,
The bit of the information characteristics of identification transmission data, such as the ratio including features such as data sender, type of messages can be included
Special position, so that data receiving is by the information of marker bit acquisition transmission data, be advantageous to the reception and parsing of data.
In addition, in a kind of optional embodiment, most latter two byte Byte in data to be transmittedn-1,BytenCan
As CRC redundancy check bits, can be verified using the check bit to the bit sequence for receiving data frame, to detect or
Whether the data that verification receives there is mistake.
Hereinafter, simple examples are done to marker bit, type of message in transmission data etc., the invention is not limited in this.
Marker bit in transmission data can include 8bit, and the 8bit specifically can be as shown in table 1, but is not limited to
This.
Table 1
Bit7 | Bit[6:4] | Bit[3:0] |
Device_type | Rev | Packet_type |
Wherein, Device_type:The data sender is represented, main equipment Host can be represented with 1,0 represents slave unit
Device, naturally it is also possible to represent slave unit Device with 1, main equipment Host is represented with 0, in order to which data receiver is receiving
It is that main equipment or slave unit are sent that can distinguish data by analysis tool after to data.Rev is default data, Packet_
type:Type of message is represented, table 2 shows the type of message that may relate to, but is not limited thereto.
Table 2
Packet_type | Message describes |
0001B | ATR |
0010B | ACK |
0011B | NAK |
0100B | PKT |
Wherein:ATR representation parameters obtain message, and after main equipment recognizes the access of slave unit, ATR reports are sent to slave unit
Text, slave unit need to respond immediately after ATR messages are received, and response message type is still ATR, and carry parameter information.ATR
Message can only include the marker bit of 1 byte and the CRC check position (such as EOF the first two byte in Fig. 2) of 2 bytes.
ACK represents response message, that is, represents the successful response message of data receiver, and ACK messages can include the mark of 1 byte
Remember position and the CRC check position of 2 bytes.
NAK represents the response message of Not ready (or data receiver failure), for example, in Data reception errors or
When data packetloss, recipient can return to NAK messages to sender, and NAK messages can include the marker bit and 2 of 1 byte
The CRC check position of byte.
PKT represents data message, i.e., the message is exactly normal data message, when to be transmitted for data when, 8bit's
Mark bit format as shown in table 3.From table 3 it is observed that not only include mark equipment class in data message PKT marker bit
The fields such as type, type of data packet, further comprises show the packet whether be this send last bag field, example
Such as, if the packet is last bag of this transmission, bit5 is " Last ".
Table 3
Bit7 | Bit6 | Bit5 | Bit4 | Bit[3:0] |
Device_type | Rev | Last | Rev | Packet_type |
Step S102, according to the bit sequence of data to be sent, continuously transmit waveform corresponding to the bit in bit sequence
Sequence, wherein, wave sequence includes one below:First waveform sequence, the second wave sequence and the 3rd wave sequence, with first
Wave sequence represents the first data bit, represents the second data bit respectively with the second wave sequence and the 3rd wave sequence, the
One data bit is one in bit 1 and bit 0, and the second data bit is another in bit 1 and bit 0, continuous
When at least two bits sent are the second data bit, corresponding to first bit at least two bits continuously transmitted
Wave sequence is the second wave sequence, and wave sequence corresponding to second bit and follow-up bit is the 3rd wave sequence.
Wherein, the feature of wave sequence includes:The duration of first waveform sequence, the duration of the second wave sequence
And the 3rd wave sequence duration it is identical, and the waveform change of first waveform sequence is started with high level and continues first
Saltus step is low level after preset time, and the second wave sequence permanent High level within the duration, the 3rd wave sequence is with high electricity
It is low level to be opened flat saltus step after beginning and continuing the second preset time, wherein, the duration of the first preset time and the second preset time
It is different.
In a particular embodiment, three kinds of wave sequences have different wave characters, to make a distinction, are advantageous to
Recipient detects data, and three kinds of wave sequences are respectively provided with identical duration T.First waveform sequence and the 3rd wave sequence
After low level is jumped to by high level, high level can be changed to so as to terminate with high level by low level again, can also
Directly terminated with low level.Certainly, in the conceived case, first waveform sequence and the 3rd wave sequence can undergo multiple jump
Terminated after change with high level or low level, but for the terseness of realization, the present embodiment is only to undergo a saltus step to illustrate.
It should be noted that the key of the wave character of first waveform sequence and the 3rd wave sequence difference in the present invention exists
In first waveform sequence is different with the duration of the first paragraph high level of the 3rd wave sequence.Therefore, as long as meeting first wave
The first paragraph high level lasting time (the first preset time) of shape sequence then thinks that it is first waveform sequence, as long as meeting the 3rd
The first paragraph high level lasting time (the second preset time) of wave sequence then thinks that it is the 3rd wave sequence, without examining
Consider the level change situation after first paragraph high level.Therefore, in an optional embodiment, T1=a × T, wherein, T1
For first preset time, T is the duration, and a is default dutycycle coefficient, 0 < a < 1;T2=b × T, wherein,
T2 is second preset time, and b is default dutycycle coefficient, 0≤b < 1;And a ≠ b.Specifically, first waveform sequence
Started with high level and continue the high level of T1 times, and the T1 times can not be 0, i.e. first waveform sequence high level continues
Time can not be 0;And the 3rd wave sequence is started with high level and continues the high level of T2 times, the T2 times can be 0, i.e.,
3rd wave sequence can be actually the waveform started with low level, and T1 and T2 duration is different.And the second wave sequence Y is being held
Permanent High level in the continuous time, i.e. second wave sequence Y do not produce saltus step within the duration.
Based on this, provide three kinds of wave sequences respectively in the present embodiment (will represent first waveform sequence, Y with X below
Represent that the second wave sequence, Z represent the 3rd wave sequence) possible wave character figure:As shown in Fig. 3 (a) and (b), first wave
Shape sequence X is started with high level, and low level is jumped to after the first preset time (T1) high level is continued, the permanent High level
Time (T1) be set in advance, naturally it is also possible to preset according to each transmission, as long as in the process once transmitted
In the first preset time be different from the second preset time.It should be strongly noted that in one transmission, first wave
The low level duration occurred in shape sequence X can be that a fixed duration or one do not have line with baud rate
The variable duration of sexual intercourse.For example, when in disposably transmission " XXXX ", can be as shown in Fig. 3 (g), with first in Fig. 3 (g)
Wave sequence X is so that high level terminates as an example.
As shown in Fig. 3 (d), (e) and (f), the 3rd wave sequence Z is started with high level, continues the second preset time T 2
Low level is jumped to after high level, the time T2 of the permanent High level can be set in advance, naturally it is also possible to according to each
Transmit and preset.Certainly, in some cases, the second preset time T 2 can be equal to 0.It should be strongly noted that
In transmitting procedure, the low level duration occurred in the 3rd wave sequence Z can be a fixed duration, can also
Be one does not have the variable duration of linear relationship with baud rate.For example, when in disposably transmission " ZZZZ ", can be such as Fig. 3 (h)
It is shown, in Fig. 3 (h) by the 3rd wave sequence Z so that high level terminates as an example
Certainly, even if having arranged the low level duration of first waveform sequence and the low level of the 3rd wave sequence continues
Shi Changwei fixes duration, but in multiple data transmission procedure, when transmission can reappoint low level continue every time
Long, i.e., this time the low level duration in transmitting procedure can be with the low level duration in transmitting procedure next time not
Together.That is, during being transmitted several times, can be by first waveform sequence X and the 3rd wave sequence Z wave sequence feature
It is fixed, it can not also fix.
When data sender needs to send data to data receiver, in the bit sequence for the transmission data to be sent
In, bit 1 and 0 typically occurs, when sending the bit sequence of data to be sent, if representing ratio with first waveform sequence X
Spy 1, bit 0 is represented with the second wave sequence Y, then the feature based on forementioned waveform sequence understand, when run into continuously at least two
During individual bit 0, because the second wave sequence Y is lasting high level, if only represent bit 0 with the second wave sequence Y,
End or the normal data that the data bit 0 is data transfer may be cannot be distinguished by.Therefore, three kinds of ripples are passed through in the present invention
Shape sequence represents the bit sequence of data to be sent, represents bit 1 and bit 0 respectively with three kinds of wave sequences, it is specific come
Following two representations are said:
Mode one, bit 1 represented with first waveform sequence, bit is represented with the second wave sequence or the 3rd wave sequence
0, that is to say, that when transmit there is bit 1 in data when, then represent occur using first waveform sequence when transmitting in data
During bit 0, then it may use the second wave sequence or be represented using the 3rd wave sequence, specifically use the second wave sequence
Or use the 3rd wave sequence, then need to determine according to the position that bit in bit sequence 0 occurs and be not only with the
One in two wave sequences or the 3rd wave sequence transmits.Based on the rule of mode one, continuous at least two ratio is being sent
During spy 0, the bit 0 of first appearance represents that the bit 0 followed by occurred is all with the 3rd with the second wave sequence Y
Wave sequence Z is represented.For example, when the data to be transmitted are 1011001000, then corresponding wave sequence is should be
XYXXYZXYZZ。
Mode two, bit 0 represented with first waveform sequence, bit is represented with the second wave sequence or the 3rd wave sequence
1, that is to say, that when transmit there is bit 0 in data when, then represent occur using first waveform sequence when transmitting in data
During bit 1, then it may use the second wave sequence or be represented using the 3rd wave sequence, specifically use the second wave sequence
Or the 3rd wave sequence is used, then needs to determine to use the second waveform sequence according to the position that bit in bit sequence 1 occurs
Row or the 3rd wave sequence, and transmitted not only with one in the second wave sequence or the 3rd wave sequence.It is based on
The rule of mode two, when sending continuous at least two bit 1, first bit 1 occurred is with the second wave sequence Y come table
Show, the bit 1 followed by occurred is all represented with the 3rd wave sequence Z.For example, when the data to be transmitted are
When 1011001000, then corresponding wave sequence should be YXYZXXYXXX.
By the data transmission method of the present invention, when data sender is transmitting data to data receiver, using three
Kind of wave sequence represents data bit 1 and 0, and wherein the second wave sequence is continued in high level, in addition two kinds of waveforms
Sequence also maintains the high level of certain time, so that being tieed up in wave sequence corresponding to the bit sequence of data to be sent
Hold and grown as far as possible in the time of high level so that connected as far as possible with high level between data sender and data receiver, side
Just in data sender or data receiver it is one of as slave unit when from main equipment get electric energy as much as possible,
On the premise of not influenceing data transmission efficiency, power supplying efficiency is improved.In addition, in the present embodiment, the biography of different wave sequences
The defeated duration is identical, i.e., a bit is transmitted with T, compared to from needing to be passed with different time intervals in the prior art
The mode of a defeated bit value, the time that the method that the present embodiment provides is transmitted needed for a bit is shorter, therefore, code efficiency
It is higher, reduce the cost and burden of sender and recipient.
In one embodiment of the invention, the feature of wave sequence also includes:Duration and transmitted waveform sequence
Baud rate be in inverse relation, first waveform sequence is terminated with high level, and the low level occurred in first waveform sequence is being held
Shared total duration does not change with the change of the baud rate of transmitted waveform sequence in the continuous time;And/or the 3rd wave sequence with
High level terminates, and total duration of the low level occurred in the 3rd wave sequence shared by within the duration be not with transmitted waveform sequence
The change of the baud rate of row and change, wherein, the baud rate of duration and transmitted waveform sequence is in inverse relation.It is specific next
Say, first waveform sequence and the 3rd wave sequence can be terminated with high level, as shown in Fig. 3 (a) and (d).Wherein, waveform sequence
The baud rate of the duration T of row and transmission data is in inverse relation, is determined for baud rate (the i.e. baud of data transfer
Rate is 1/T).Wherein, the low level occurred in first waveform sequence X total duration shared within the duration is not with wave sequence
Baud rate change and change, i.e., the low level occurred in first waveform sequence total duration shared within the duration and ripple
The baud rate of shape sequence and the duration linear changing relation without corresponding to, for example, what is occurred in first waveform sequence is low
Level can be a fixed duration or one and the not related variable duration of baud rate.And the 3rd wave sequence
The low level of middle appearance total duration shared within the duration does not change with the change of the baud rate of wave sequence.Wherein,
The low level occurred in 3rd wave sequence total duration shared within the duration not with wave sequence baud rate change
And change, i.e. the baud rate of the low level occurred in the 3rd wave sequence total duration shared within the duration and wave sequence
With the duration without corresponding linear changing relation, for example, the low level occurred in the 3rd wave sequence can be one
Fixed duration or one and the not related variable duration of baud rate.Certainly, in one transmission, can incite somebody to action
First waveform sequence X and the 3rd wave sequence Z wave sequence feature are fixed, and can not also be fixed.When first waveform sequence and/
Or the 3rd wave sequence with high level at the end of so that time of the overall high level of waveform is elongated, and is advantageous to power taking.
During being transmitted several times, if the low level occurred in first waveform sequence and in the 3rd wave sequence is solid
In the case that timing is long, i.e. in an optional embodiment, first waveform sequence neutralizes what is occurred in the 3rd wave sequence
Duration shared by low level can be fixed numerical value (such as 10ns), during being transmitted several times, when the baud rate of transmission changes
When, the duration also follows baud rate to be inversely proportional change, but first waveform sequence neutralizes the low electricity occurred in the 3rd wave sequence
The duration of flat shared duration does not follow the change of baud rate and changed, and remains in that as fixed value.Certainly, specific real
Apply in mode, on the premise of it disclosure satisfy that transmission data demand, the high level in first waveform sequence and the 3rd wave sequence
Shared duration can be grown as far as possible, and duration shared by low level is as short as possible, so that wave sequence can be as long as possible
High level state is maintained, is obtained when facilitating one of them in data sender or data receiver as slave unit from main equipment
To electric energy as much as possible, on the premise of data transmission efficiency is not influenceed, power supplying efficiency is improved.
It is for example bright with first waveform sequence X below:Assuming that X the first preset duration T1=1/4T, X low level institute
A length of 10ns when accounting for, then cycle minimum value can be 20ns, and now baud rate is 50Mbps, can at this time get 50%
Electricity, as shown in Fig. 4 (a);If low level duration immobilizes, T1=1/4T, the cycle, now baud rate was if 40ns
25Mbps, 75% electricity can be at this time got, as shown in Fig. 4 (b).It can be seen that by the way of low level fixation, can drop
In the case of low baud rate, more electricity are got.
In an optional embodiment, the feature of wave sequence also includes:The low level occurred in first waveform sequence
Shared total duration is less than the half of duration within the duration;And/or the 3rd low electricity occurred in wave sequence
Equal the half that shared total duration within the duration is less than the duration.Specifically, first waveform sequence or the 3rd
The low level occurred in wave sequence can be less than the half of the duration in cycle, during to reduce shared by low level
Long, certainly, duration shared by low level can be the variable duration of a half for being less than the duration in wave sequence.
On the premise of disclosure satisfy that transmission data demand, the duration shared by high level in first waveform sequence and the 3rd wave sequence can
With long as far as possible, and duration shared by low level is as short as possible, so that wave sequence can maintain high level as long as possible
State, it is possible thereby to improve power supplying efficiency.
Understood according to foregoing, first waveform sequence and the 3rd wave sequence can be terminated with high level, can also be with low electricity
Reef knot beam, therefore, in the optional embodiment of the present invention, the feature of wave sequence also includes:In first waveform sequence
In the case of being terminated with low level, first waveform sequence is started with high level and only occurred once by high level within the duration
It is changed into low level level saltus step;Or in the case where first waveform sequence is terminated with high level, first waveform sequence is with height
Level starts and is only once changed into low level level saltus step from high level within the duration.Specifically, the first waveform
Sequence X can be terminated by low transition to high level and with high level, also may be used after low level is jumped to by high level again
To maintain low level constant and be terminated with low level, as long as experience is once jumped to by high level in the duration of wave sequence
Low level, first waveform sequence X is may be considered, as shown in Fig. 3 (a) and (b).When first waveform sequence is jumped to by high level
After low level with low level at the end of, it is possible to reduce the number of saltus step, reduce the complexity of data transfer.When the first waveform sequence
X is arranged after low level is jumped to by high level, can be with after can terminating again by low transition to high level and with high level
So that the time that high level maintains is elongated, power taking efficiency is improved.
In the optional embodiment of the present invention, the feature of wave sequence also includes:Second preset time is equal to 0,
And the 3rd wave sequence only occur the level saltus step for being once changed into high level from low level within the duration, and with high level knot
Beam.Specifically, because the second preset time is 0, the 3rd wave sequence Z can consider in the present embodiment to be opened with low level
Begin, i.e., the 3rd wave sequence appearance at the very start one by high level to low level level saltus step.In the 3rd waveform sequence
When row Z is started with low level, the 3rd wave sequence is subjected to after a saltus step by low transition to high level, and with high electricity
Reef knot beam, as shown in Fig. 3 (f).Certainly, the time that the 3rd wave sequence with high level terminates that high level can be caused to maintain draws
It is long, improve power taking efficiency.
It should be noted that there is the occasion of " level saltus step " or " saltus step " in list in the present invention, if without other phases
Anti- explanation, refer in particular to jump to low level from high level, a trailing edge can be shown as in the waveform of reality.In this Shen
Please also directly represented sometimes with " trailing edge saltus step ".And change to height by low if being related to level in the present invention, then it is not straight
Connect referred to as level saltus step.
The present invention an optional embodiment in, after the bit sequence of data to be sent is determined, it is necessary to according to
When the bit sequence of data to be sent continuously transmits wave sequence corresponding to bit in bit sequence, data sender can lead to
The level of control sending port is crossed according to the waveform and wave sequence of above-mentioned wave sequence corresponding to the bit in bit sequence
Feature be changed, to send data to be sent.Specifically, data sender can be opened by hardware switch or software
What is closed cut-offs to control the level of sending port, so as to realize the wave character of above-mentioned different wave sequence.Data sender exists
By that when controlling the level change of sending port to send data to be sent, a bit can be got and just send the bit correspondingly
A wave sequence, can also be corresponding by whole bits after whole bits of the bit sequence of data to be sent obtain
Multiple wave sequences send together, as needed determine which kind of mode specifically used.In addition, high level and low level setting
, for example, high level can be set as 5V, low level 0V, can also may be used according to the situation of circuit and hardware come adaptability design
To set high level as 5V, low level 4.7V, there are other setting means certainly.As long as used hardware can realize height
Level and low level differentiation, may be incorporated for the application.
According to the form of the foregoing bit sequence for having known data to be sent, several tools of data to be sent given below
Body embodiment.
In the optional embodiment of the present invention, the bit sequences (i.e. a data frame) of data to be sent can be according to
It is secondary including:Data frame head, transmission data and data postamble, data frame head comprise at least 1 bit, the 1st of data frame head
Wave sequence corresponding to bit is the 3rd wave sequence or first waveform sequence.Specifically, data frame head can be only 1
Bit, when the data frame head only includes 1 bit, the second wave sequence can not use separately as data frame head, this be by
In the second wave sequence be lasting high level, without send data when sender sending port be also lasting high level,
Recipient only detects that could start to recognize sender during trailing edge saltus step is sending data, if the data initially sent
Represented by lasting high level, recipient can not detect that therefore, the second wave sequence can not be separately as data frame head
Use.Certainly, data frame head can also be that to include the 1st wave sequence corresponding to bit be the 3rd wave sequence or first wave
Multiple bits of shape sequence, then it can now include the second wave sequence in data frame head.By data frame head can be used for
The original position of few flag data transmission, data postamble can be used for the end position of at least flag data transmission, and recipient exists
It is compared with the form of data frame head or data postamble during the data received, if it find that be frame head or postamble,
Then judge the beginning or end of data transfer.By data frame head and postamble so that data receiver can be correctly received
Data.Include the information that data sender will externally transmit in transmission data.Certainly, the beginning sent in data, due to receiving
Hair both sides can arrange to send the time of data, and now recipient can also need not detect whether it is data frame head, and direct
Former positions (fixed according to the appointment) will be received as data frame head.
In the optional embodiment of the present invention, the bit sequence (i.e. a data frame) of data to be sent wraps successively
Include:Data frame head, transmission data and data postamble, data frame head comprise at least M bit, and M is positive integer and M >=2;Its
In, wave sequence corresponding to the preceding M bit of data frame head is made up of M first waveform sequence;Or, preceding M of data frame head
Wave sequence corresponding to bit is made up of M the 3rd wave sequences;Or, wave sequence corresponding to the preceding M bit of data frame head
Including at least one first waveform sequence and at least one 3rd wave sequence.Specifically, when include in data frame head to
During few two bits, it can be the combination of multiple waveforms sequence.As M=2, the data frame head can be XX, ZZ, XZ and
ZX;As M=3, the data frame head can be the feelings such as XXX, XXZ, XYZ, XZY, YXZ, YZX, ZZZ, ZZX, ZXX, ZXY, ZYX
Condition.All possible data frame head form can be released with class successively, as long as in the framework of the present definition, can be used as number
Tried out according to frame head.In the present embodiment, data are being received by the data frame head including at least two bits, data receiver
Frame originating point information, or after the data frame head is judged, one can be determined according to the relation between at least two data frame heads
Individual wave sequence duration, you can to obtain the duration of a wave sequence, so as to obtain the ripple of data transfer
Special rate.Thus data sender and data receiver are only obtained without arranging baud rate in addition by parsing data frame head can
The baud rate of the transmission data is obtained, so as to parse follow-up packet, realizes the adaptive of data transfer.Pass through data frame head solution
Analysis obtains the mode of the transmitting continuous time of a wave sequence, and data sender can carry out data with more flexible selection baud rate
Transmission, data sender can regard the speed selection both sides of the reception data of current transmission environment and data sender's support
The highest baud rate of support carries out data transmission, as long as data receiver parses data frame head and is obtained with current baud
Rate, thus, it is possible to which the maximum baud rate supported using communicating pair is carried out data transmission, to reach the effect of the data transfer of high speed
Fruit.
For example, when data frame head is XX, data receiver can be by jumping to low level by high level twice
Bound-time interval determine the transmission time of a wave sequence, as shown in Figure 5.When using other data frame head forms
When, according to the wave character of wave sequence respective change occurs for its computational methods, no longer superfluous herein to chat.
It is according to waveform sequence it should be noted that because parsing data frame head obtains the duration of a wave sequence
Time interval in row between trailing edge saltus step calculates what is obtained, so in order to be calculated according to the wave sequence of data frame head
Go out the duration of a wave sequence, as M=2, can not occur in preceding 2 bits for the data frame head that communicating pair is consulted
Y。
, can also be continuous in the present embodiment in order to avoid mono-tone interference in the specific embodiment of the present invention
Behind identical wave sequence (as long as in can below, such as behind and then consecutive identical wave sequence, or every
After several wave sequences) agreement at least one wave sequence different from the identical wave sequence, i.e., anti-interference ratio
Wave sequence corresponding to spy, therefore, wave sequence corresponding to the preceding M bit of data frame head are made up of M first waveform sequence
When, data frame head also includes:The anti-interference bit of at least one after the preceding M bit of data frame head, wherein, at least one resists
It is the second wave sequence or the 3rd wave sequence to disturb wave sequence corresponding to bit;Corresponding to the preceding M bit of data frame head
When wave sequence is made up of M the 3rd wave sequences, data frame head also includes:After the preceding M bit of data frame head extremely
Few 1 anti-interference bit, wherein, wave sequence corresponding to the anti-interference bit of at least one is the second wave sequence or first waveform
Sequence.Specifically, in the specific implementation, data receiver may be done when detecting the level change of receiving port by single-frequency
The interference in source is disturbed, mono-tone interference can be understood as with pulse train caused by same period, if the preceding M of default data frame head
Individual bit is set to same wave sequence, such as, data frame head is made up of continuous 4 Z, and the frequency of mono-tone interference is just and ripple
Special rate is identical, i.e., data receiver is identified and default data frame head identical wave sequence, now, number by level change
The mono-tone interference can be mistaken for data frame head according to recipient, cause the failure of data transfer.Therefore, before in data frame head
When M bit is identical wave sequence, then also need to increase at least one anti-interference bit, the waveform sequence of the anti-interference bit
Row are different from the wave sequence of M bit so that different time intervals in wave sequence corresponding to data frame head be present, i.e., not
Occur with mono-tone interference identical wave sequence, so as to prevent mono-tone interference being mistaken for data frame head.
In the optional embodiment of the present invention, data frame head includes 8 bits, waveform corresponding to 8 bits
Sequence is followed successively by the 3rd wave sequence, the 3rd wave sequence, the 3rd wave sequence, the 3rd wave sequence, the second wave sequence,
Three wave sequences, the second wave sequence and the 3rd wave sequence.The data frame head of 8 bits, can cause data to connect more than
Debit can easily determine the beginning of data transfer, while the duration of waveform can be got according to data frame head, from
And the baud rate of data transfer is determined, it can also be prevented by different wave sequences probably due to caused by mono-tone interference by mistake
Sentence.In addition, by setting longer data frame head, it ensure that data receiver obtains the reliability of information, improve efficiency of transmission.
In the optional embodiment of the present invention, data postamble includes 2 bits, wherein:The first of data postamble
Wave sequence corresponding to individual bit is the second wave sequence, and wave sequence corresponding to second bit of data postamble is the second ripple
Shape sequence, or, wave sequence corresponding to first bit of data postamble is the 3rd wave sequence, second of data postamble
Wave sequence corresponding to bit is the second wave sequence, or, wave sequence corresponding to first bit of data postamble is the
One wave sequence, wave sequence corresponding to second bit of data postamble are the 3rd wave sequence.Specifically, data postamble
For determining the end position of data transfer, the data of data postamble, then data receiver's meeting are represented due to once detecting
Judge that this data transfer is over, therefore, data postamble is only capable of selection and is not in normal data transfer
Wave sequence.Due to the wave sequence rule set in the present invention, the data that can not possibly occur in normal data transfer have
" YY ", " XZ " or " ZY ", therefore, these three wave sequences can be used as data postamble.Data postamble can be 2 ratios
Spy, certain data postamble can also include more bits.
The present invention an optional embodiment in, due to there may be in data frame head foregoing " YY ", " XZ " or
" ZY " sequence, in order to preferably detect data postamble, data postamble can be selected according to the situation of data frame head, work as data
Two neighboring wave sequence in wave sequence corresponding to frame head be present and be followed successively by first waveform sequence and the 3rd wave sequence (i.e.
" XZ ") when, data postamble can then select " YY " or " ZY ", i.e., wave sequence is the corresponding to the first of data postamble bit
Two wave sequences, wave sequence corresponding to second bit of data postamble are the second wave sequence, or, the of data postamble
Wave sequence corresponding to one bit is the 3rd wave sequence, and wave sequence corresponding to second bit of data postamble is second
Wave sequence.Likewise, it is followed successively by the 3rd waveform when two neighboring wave sequence be present in wave sequence corresponding to data frame head
Sequence and during the second wave sequence (i.e. " ZY "), data postamble can then select " YY " or " XZ ", i.e. the first of data postamble
Wave sequence corresponding to bit is the second wave sequence, and wave sequence corresponding to second bit of data postamble is the second waveform
Sequence, or, wave sequence corresponding to first bit of data postamble is first waveform sequence, and second of data postamble compares
Wave sequence corresponding to spy is the 3rd wave sequence.Adjacent continuous be present likewise, working as in wave sequence corresponding to data frame head
During two the second wave sequence (i.e. " YY "), data postamble can then be selected " ZY " or " XZ ", i.e., the first of data postamble is compared
Wave sequence corresponding to spy is the 3rd wave sequence, and wave sequence corresponding to second bit of data postamble is the second waveform sequence
Row, or, wave sequence corresponding to first bit of data postamble is first waveform sequence, second bit of data postamble
Corresponding wave sequence is the 3rd wave sequence.Generally speaking, the bit sequence conduct not appeared in data frame head is selected
Data postamble, the wave sequence of data frame head and data postamble is made a distinction completely, can prevented data frame head error detection
For data postamble, data postamble can be more easily detected, is advantageous to the transmission of data.
The present embodiment also provides a kind of data receiver method, and number is sent using above-mentioned data transmission method for uplink with data sender
According to matching, data receiver receives data using the data receiver method of the present embodiment.As shown in fig. 6, the data receiver
Method includes:
Step S601, detect the level change of receiving port.
In the present embodiment, as it was noted above, data sender is the change by controlling sending port to produce low and high level
To form wave sequence corresponding to the bit sequence of data to be sent, therefore, accordingly, data receiver is in order to receive data
The data that sender sends to the level change of receiving port, it is necessary to detect, to carry out waveform sequence according to level change
The identification of row.
Specifically, detecting the level change of receiving port can be received by detecting circuit or detection module to detect
The level saltus step that port occurs, either is sampled to obtain by sample circuit or sampling module to the level at receiving port
Level change.According to the difference of level change rule caused by wave sequence coding rule, detection circuit can use differential electrical
Road, comparator circuit etc., as long as level change can be detected, it can use in the present invention.Encoded according to wave sequence
The sample frequency of the difference of level change rule caused by rule, sample circuit and sampling module should can be with level change phase
Matching, to guarantee to sample the rule of enough point acquisition level changes.
Step S602, the N number of wave sequence for determining to continuously transmit according to level change and the feature of wave sequence.
Wherein, N is positive integer, and wave sequence includes one below:First waveform sequence, the second wave sequence and the 3rd ripple
Shape sequence, the feature of wave sequence include:The duration of first waveform sequence, the second wave sequence and the 3rd wave sequence
It is identical, and the waveform change of first waveform sequence is started using high level and saltus step is low level after continuing the first preset time, the
Two wave sequences permanent High level within the duration, the waveform of the 3rd wave sequence changes starts and continues second with high level
Saltus step is low level after preset time, wherein, the first preset time is different from the duration of the second preset time, N number of wave sequence
In each wave sequence be respectively one below:First waveform sequence, the second wave sequence and the 3rd wave sequence.
The wave characters different on three kinds of wave sequences describe in detail in data transmission method for uplink, no longer superfluous herein
Chat.
Specifically, as it was noted above, the data to be sent (data frame) that data sender sends include number successively
According to frame head, transmission data and data postamble, accordingly, data receiver is first to receive several bits when receiving data
Data frame head and then receive follow-up transmission data and data trailer information.On data frame head, transmission data and data
The specific form of postamble describes in detail in data transmission method for uplink, no longer superfluous herein to chat.
Due to data receiver when receiving data, it is necessary to according to the duration of wave sequence and above-mentioned carry
The feature of the wave sequence arrived, the N number of wave sequence included in the level change information for determining to detect, and a waveform
The duration of sequence consults or preset or the data in the data received in advance
Obtained in frame originating point information.When needs get the parameter informations such as the duration of wave sequence from data frame head, data hair
The side of sending and data receiver the L wave sequence that need to make an appointment can be sent as data frame head, data receiver from data
Side obtains or got from its memory the feature of the feature, i.e. wave sequence in data frame head of L wave sequence
It is known to data receiver, is formed for example, L wave sequence can be arranged for S level saltus step, of course, it is possible to about fixed number
S level saltus step is included according to wave sequence corresponding to frame head, the time interval of S level saltus step can also also be done and arranged, and
Data receiver can know that the S level saltus step is data frame head.
According to level change and the feature of wave sequence determine N number of wave sequence for continuously transmitting specifically can by with
Lower embodiment is realized:
That is, in an optional embodiment, the level change of receiving port is detected, including:It is continuously detected reception
S level saltus step of port;After S level saltus step of receiving port is detected, continue to detect Q level of receiving port
It from high level saltus step is low level that saltus step, wherein S level saltus step and Q level saltus step, which are, and S, Q are positive integer, and S>
1, Q>1.The N number of wave sequence for determining to continuously transmit according to level change and the feature of wave sequence, including:Obtain data frame
The L wave sequence that default S level saltus step is formed, wherein, L is positive integer and 1<L<N;According to L wave sequence
Time interval between any two level saltus step in feature and the S level saltus step detected calculates a wave sequence
Duration;Duration using the duration that this is calculated as each wave sequence, according to Q level saltus step with
And the feature of wave sequence determines wave sequence corresponding to transmission data and data postamble.In the present embodiment, data are sent out
The side of sending and data receiver data frame head of making an appointment are L wave sequence, and the L wave sequence includes S level saltus step, number
According to recipient during the level change of lasting detection receiving port, the S level saltus step detected can be defaulted as
S saltus step of corresponding data frame head, and level change (the Q saltus step detected) is detected after S saltus step and is then considered as
The level change that wave sequence corresponding to transmission data and data postamble in data frame includes.Data receiver is according to foregoing
After method receives data frame head, the duration T of a waveform is determined according to data frame head, then whether sent out in every T durations
Raw level saltus step and the feature of each level saltus step, determine wave sequence corresponding to Q level saltus step, so that it is determined that entirely
N number of wave sequence.
Certainly, each type waveform after Q level saltus step is determined, it is necessary to according to described in data transmission method for uplink
Feature determines wave sequence corresponding to Q level saltus step.According to the feature of wave sequence above it is recognised that first waveform
Sequence X is started with high level, and it is T1 that it undergoes a level saltus step and the time of level saltus step within the duration of waveform
(T1 is the time since each first waveform to the time that level saltus step occurs, T1 > 0);Second wave sequence is lasting
High level, it does not suffer from level saltus step within the duration of waveform;3rd wave sequence to be started with high level, and its
The time of level saltus step of experience and level saltus step is that (T2 is since each the 3rd waveform to T2 in the duration of waveform
Time to the time that level saltus step occurs, T2 >=0, and T1 ≠ T2).Therefore, get wave sequence it is lasting when
Between on the premise of, determining the mode of a wave sequence can be:Within the duration of a wave sequence, according to the waveform
The level height and duration of the initial time of sequence meet the feature of which kind of above-mentioned wave sequence.For example, in a ripple
In the duration of shape sequence, when the wave character of the wave sequence detected is to be started with high level, continuing for some time
High level after when jumping to low level, now it needs to be determined that the duration of high level, if the duration of high level is
First preset time T 1, then the wave sequence is first waveform sequence X, if the duration of high level is the second preset time
T2, then the wave sequence is the 3rd wave sequence Z;When the wave character of the wave sequence detected is to continue within the duration
High level can then determine that it is the second wave sequence Y without level saltus step occurs.It should be noted that data receiver exists
When determining the type of wave sequence, can also can own often to detect that a wave sequence determines that its type having detected
N number of wave sequence after uniformly determine its type of waveform.
, can be in every duration by a T when the duration of a wave sequence known to data receiver is T
Level change determines a wave sequence, and according to the above method, this waveform sequence can be determined according to the feature of wave sequence
Row are first waveform sequence X, the second wave sequence Y or the 3rd wave sequence Z, and the level change most detected at last determines
Go out N number of wave sequence, all level changes can also detected (i.e. until can't detect since first trailing edge saltus step
Level change during trailing edge saltus step) all level changes are carried out into division with T duration again determines phase afterwards
The N number of wave sequence answered.If some wave sequence is not determined as first waveform sequence, the second wave sequence and the 3rd ripple
Any one in shape sequence, then may the wave sequence in transmitting procedure there occurs mistake, then may need retransmission mechanism.
Data receiver is after wave sequence corresponding to data frame head is detected, it is possible to determines the biography in a data frame
The original position of wave sequence corresponding to transmission of data, can be (as follows according to the level change detected since the original position
The level saltus step on edge is dropped) meet the feature of which kind of above-mentioned wave sequence to determine first wave sequence, passing through a waveform
After the duration T of sequence, start determine second wave sequence, with this until has determined receive data in transmission data with
Wave sequence corresponding to data postamble.
In addition, level change of the data receiver in detection receiving port, and when determining wave sequence according to level change,
Main spy of the level saltus step as level change can will occur by the way of the level saltus step that monitoring receiving port occurs
Sign;The situation that sampling obtains receiving port level change can also be carried out to the level at receiving port, obtains complete level
The rule of change, so as to obtain S level saltus step.Either still determine that level becomes by sampling by monitoring level saltus step
Change, its result is for that wave character can be restored according to level change, i.e. as long as can obtain corresponding to data frame head
S saltus step, the invention is not limited in which kind of mode.Can be with if obtaining S level saltus step using the mode of sampling
Whole waveform is restored, obtains all features of waveform, then can not only obtain the feature that saltus step occurs for level, can also obtain
Waveform corresponding to complete level change, without considering the feature of all kinds of wave sequences, can be useful in any kind of
In wave sequence, wave sequence can be successfully parsed.If using the mode of monitoring level saltus step, without entering to level
Row sampling, sampling for a long time is avoided to reduce overall waveform, it is only necessary to be assured that out according to the feature of level saltus step N number of
Wave sequence, reduce the complexity of parsing.
Step S603, determined to receive the bit sequence of data according to the N number of wave sequence continuously transmitted, wherein, with first
Wave sequence represents one in bit 1 and bit 0, represents the He of bit 1 respectively with the second wave sequence and the 3rd wave sequence
Another in bit 0.Specifically, when determining that each of N number of wave sequence is first waveform sequence, the second ripple respectively
, then can be according to determining N number of wave sequence with data sender's identical rule after shape sequence or the 3rd wave sequence
Bit value representated by each wave sequence.According to different coding rules, including at least following two analysis modes:
Mode one, when representing bit 1 with first waveform sequence, ratio is represented with the second wave sequence or the 3rd wave sequence
Spy 0, that is to say, that when some wave sequence in N number of wave sequence is first waveform sequence, then representated by the wave sequence
Bit value be 1, when some wave sequence in N number of wave sequence be the second wave sequence or three wave sequences, then this
Bit value representated by wave sequence is 0.It should be noted that in N number of wave sequence, the second wave sequence and the 3rd waveform
Sequence may be simultaneously present, and be determined in data sender according to the position that bit in bit sequence 0 occurs using second
Wave sequence or the 3rd wave sequence, and passed not only with one in the second wave sequence or the 3rd wave sequence
It is defeated, so in N number of wave sequence that recipient obtains, encounter the second wave sequence or the 3rd wave sequence resolves to bit
0.For example, it is XYXXYZXYZZ to work as the N number of wave sequence determined, when, according to resolution rules, then the bit sequence received is
1011001000。
Mode two, when representing bit 0 with first waveform sequence, ratio is represented with the second wave sequence or the 3rd wave sequence
Spy 1, that is to say, that when some wave sequence in N number of wave sequence is first waveform sequence, then representated by the wave sequence
Bit value be 0, when some wave sequence in N number of wave sequence be the second wave sequence or three wave sequences, then this
Bit value representated by wave sequence is 1.It should be noted that in N number of wave sequence, the second wave sequence and the 3rd waveform
Sequence may be simultaneously present, and be determined in data sender according to the position that bit in bit sequence 1 occurs using second
Wave sequence or the 3rd wave sequence, and passed not only with one in the second wave sequence or the 3rd wave sequence
It is defeated, so in N number of wave sequence that recipient obtains, encounter the second wave sequence or the 3rd wave sequence resolves to bit
1.For example, it is XYXXYZXYZZ to work as the N number of wave sequence determined, when, according to resolution rules, then the bit sequence received is
0100110111。
By the data receiver method of the present invention, when data sender uses above-mentioned data sender's normal direction data receiver
When transmitting data, data bit 1 and 0 is represented using three kinds of wave sequences, and one of which wave sequence is continued in height
Level, two kinds of wave sequences also maintain the high level of certain time in addition, so that wave sequence is as far as possible for a long time
Maintain high level so that connected as far as possible with high level between data sender and data receiver, facilitate data to send
In side or data receiver it is one of as slave unit when from main equipment get electric energy as much as possible, do not influenceing data
On the premise of efficiency of transmission, power supplying efficiency is improved.In addition, in the present embodiment, the transmitting continuous time of different wave sequences
It is identical, i.e., a bit is transmitted with T, compared to from needing to transmit a bit with different time intervals in the prior art
The mode of value, the present embodiment transmit a bit needed for time it is shorter, therefore, code efficiency is higher, reduce sender and
The cost and burden of recipient.
One given below receives data and parses the specific implementation of data, as shown in fig. 7, the present embodiment includes
But it is not limited to situations below:
Data sender and data receiver have made an appointment data frame head, such as can be using appointment data frame head as 4bit's
Sequence " XZZZ ", can also appointment data frame head be directly 4 level saltus steps from high to low.When the data frame head made an appointment
L wave sequence be 4bit sequence " XZZZ " when, then it is considered that data frame head need undergo 4 level from high to low
Saltus step (saltus step of X and Z once from high to low).Shown in the level change that data receiver detects such as Fig. 7 (a), in Fig. 7
(a) in when detecting 4 saltus steps from high to low, then it is assumed that data frame head receives.That is 4 saltus steps from high to low
Corresponding is data frame head.
Next need to go out in data frame head to carry according to the S saltus step detected and the feature calculation of L wave sequence
The information such as duration of a wave sequence.Still described in detail with precedent, as shown in Fig. 7 (b), both sides have arranged
The data frame head form of L positions is 4bit sequence " XZZZ ", if do not made a mistake in the data transmission, recipient receives
To S saltus step should be 4 saltus steps from high to low.The 1st wave sequence in recipient's given data frame head data be
First waveform sequence X, and the bound-time of first waveform sequence X is T1=a × T, the 2nd wave sequence is the 3rd wave sequence
Z, and the 3rd wave sequence Z bound-time is T2=b × T, wherein, a, b are default dutycycle coefficient.Recipient can be
Receiving port detects between the 1st time and the 2nd level saltus step that (level saltus step only refers to is jumped by high level to low level level
Become) time interval τ, time interval τ that recipient detects and duration T should meet τ=(T-T1)+T2, i.e. τ=
(T-a × T)+b × T.Thus, what receiving terminal can be in the wave character of data preamble sequence and L level saltus step appoints
Time interval (i.e. τ) between two level saltus steps of meaning calculates the duration T of a wave sequence, so as to which recipient passes through number
It can determine that sender sends baud rate (i.e. 1/T) used by data according to frame head data.First waveform sequence X is with height in Fig. 7
Level terminates, at the end of the 3rd wave sequence Z is with high level.If first waveform sequence and/or the 3rd wave sequence are with low electricity
It can similarly be obtained at the end of flat, it is no longer superfluous herein to chat
Due to being the starting position for transmitting data in the end position of data frame head, continuing for each waveform is being determined
After time T, it is possible to the parsing transmission data since the end position of data frame head.When data receiver according to detection level by
High level to low level level saltus step to determine type of waveform when, according to above known wave character, continue at each section
In time T, when it is T1 to detect the time for level saltus step and saltus step once from high to low occur, then can be determined that it is one
Individual first waveform sequence X;When it is T2 to detect the time for level saltus step and saltus step once from high to low occur, then can sentence
It is a 3rd wave sequence Z to determine it;When detect some wave sequence within the duration of waveform and do not occur by height to
During low level saltus step, then can be determined that it is a second wave sequence Y.It can see in Fig. 7 (b), in data frame head
The transmission data and data postamble, result analytically that data after " XZZZ " are as determined can be seen that in data frame
Wave sequence after head " XZZZ " is followed successively by " XYXXYZZXYY ", as shown in Fig. 7 (c), and can recognize if there is " YY "
It is data postamble for it, it is seen that really transmission data are " XYXXYZZX ", if representing 1 with X, 0 field being represented with Y or Z
Close, then the transmission data is finally resolve to " 10110001 ", as shown in Fig. 7 (d).
Embodiment 2
The present embodiment provides a kind of data sending device 80, as shown in Figure 8.Data sending device 80 is in embodiment 1
The operation that data sender in device corresponding to data transmission method for uplink, i.e. embodiment 1 realizes can be by the present embodiment
Data sending device 80 implements.Only the structure of data sending device 80 is briefly described herein, remaining content ginseng
See the description of data transmission method for uplink in embodiment 1.The data sending device 80 of the present embodiment includes acquisition module 801 and sends mould
Block 802, the acquisition module 801 and sending module 802 can be realized using one or more processor, wherein:
Acquisition module 801, for obtaining the bit sequence of data to be sent;Specifically, acquisition module 801 can be one
Individual individually processor, chip or an integrated circuit on a processor, acquisition module 801 can from itself
Bit sequence to be sent is obtained in memory, the sequence to be sent of outside transmission or input can also be received, for example, can be with
Received by interface or by input through keyboard.Acquisition module 801 is sent to sending module 802 after getting bit sequence.
Sending module 802, for the bit sequence according to data to be sent, the bit continuously transmitted in bit sequence is corresponding
Wave sequence, wherein, wave sequence includes one below:First waveform sequence, the second wave sequence and the 3rd wave sequence,
First data bit is represented with first waveform sequence, the second data ratio is represented with the second wave sequence and the 3rd wave sequence respectively
Spy, the first data bit are one in bit 1 and bit 0, and the second data bit is another in bit 1 and bit 0,
When at least two bits continuously transmitted are the second data bit, first bit pair at least two bits continuously transmitted
The wave sequence answered is the second wave sequence, and wave sequence corresponding to second bit and follow-up bit is the 3rd waveform sequence
Row;Specifically, sending module 802 can be a wired data transmission interface, such as USB interface, COBBAIF, two lines
Interface etc..
Wherein, the feature of wave sequence includes:The duration of first waveform sequence, the duration of the second wave sequence
And the 3rd wave sequence duration it is identical, and the waveform change of first waveform sequence is started with high level and continues first
Saltus step is low level after preset time, and the second wave sequence permanent High level within the duration, the 3rd wave sequence is with high electricity
It is low level to be opened flat saltus step after beginning and continuing the second preset time, wherein, the duration of the first preset time and the second preset time
It is different.
The present embodiment also provides a kind of data sink 90, as shown in figure 9, data sink 90 is in embodiment 1
Data receiver method corresponding to device, i.e., the operation that data receiver in embodiment 1 realizes can be by the present embodiment
Data sink 90 implement.Only the structure of data sink 90 is briefly described herein, remaining content
Referring to the description in embodiment 1 to data method of reseptance.Data sink 90 include receiving port 901, detection module 902,
Wave sequence determining module 903 and data determining module 904, the detection module 902, wave sequence determining module 903 and data
Determining module 904 can be realized using one or more processor, wherein:
Detection module, for detecting the level change of receiving port;Specifically, detection module can be a detection electricity
Road or sample circuit, wherein detection circuit can use difference channel, comparator circuit etc., detection module can connect all one
The receiving port of individual wired data interface, the receiving port of the wired data interface is detected, the wired data interface can be USB
Interface, COBBAIF, two line interfaces etc..
Wave sequence determining module, it is N number of for being continuously transmitted according to the determination of the feature of level change and wave sequence
Wave sequence, wherein, N is positive integer, and wave sequence includes one below:First waveform sequence, the second wave sequence and the 3rd
Wave sequence, the feature of wave sequence include:First waveform sequence, the second wave sequence and the 3rd wave sequence it is lasting when
Between it is identical, and the waveform change of first waveform sequence started using high level and after continuing the first preset time saltus step as low level,
Second wave sequence permanent High level within the duration, the waveform change of the 3rd wave sequence are started with high level and continue the
Saltus step is low level after two preset times, wherein, the first preset time is different from the duration of the second preset time, N number of waveform sequence
Each wave sequence in row is respectively one below:First waveform sequence, the second wave sequence and the 3rd wave sequence;
Data determining module, for being determined to receive the bit sequence of data according to the N number of wave sequence continuously transmitted, its
In, one in bit 1 and bit 0 is represented with first waveform sequence, respectively with the second wave sequence and the 3rd wave sequence table
Show another in bit 1 and bit 0.
The present embodiment also provides a kind of data transmission system, and as shown in Figure 10, including data sending device 80 and data connect
Receiving apparatus 90, so as to realize the data transmission method for uplink and data method of reseptance of the present invention.
By the data Transmission system of the present embodiment, when data sending device is transmitting data to data sink,
Data bit 1 and 0 is represented using three kinds of wave sequences, and wherein the second wave sequence is continued in high level, in addition two
Kind wave sequence also maintains the high level of certain time, so that waveform sequence corresponding to the bit sequence of data to be sent
The time that high level is maintained in row is as long as possible so that as far as possible with high electricity between data sending device and data sink
Flushconnection, get from main equipment when facilitating one of them in data sending device or data sink as slave unit and to the greatest extent may be used
Electric energy more than energy, on the premise of data transmission efficiency is not influenceed, improve power supplying efficiency.In addition, in the present embodiment, it is different
The transmitting continuous time of wave sequence is identical, i.e., a bit is transmitted with T, compared to from needing in the prior art with different
Time interval transmits the mode of a bit value, and the time that the present embodiment is transmitted needed for a bit is shorter, therefore, coding effect
Rate is higher, reduces the cost and burden of sender and recipient.
Any process or method described otherwise above description in flow chart or herein is construed as, and represents to include
Module, fragment or the portion of the code of the executable instruction of one or more the step of being used to realize specific logical function or process
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable
Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In embodiment, software that multiple steps or method can be performed in memory and by suitable instruction execution system with storage
Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware
Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal
Discrete logic, have suitable combinational logic gate circuit application specific integrated circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method carries
Suddenly it is that by program the hardware of correlation can be instructed to complete, described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, can also
That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould
Block can both be realized in the form of hardware, can also be realized in the form of software function module.The integrated module is such as
Fruit is realized in the form of software function module and as independent production marketing or in use, can also be stored in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description
Point is contained at least one embodiment or example of the present invention.In this manual, to the schematic representation of above-mentioned term not
Necessarily refer to identical embodiment or example.Moreover, specific features, structure, material or the feature of description can be any
One or more embodiments or example in combine in an appropriate manner.
Although embodiments of the invention have been shown and described above, it is to be understood that above-described embodiment is example
Property, it is impossible to limitation of the present invention is interpreted as, one of ordinary skill in the art is not departing from the principle and objective of the present invention
In the case of above-described embodiment can be changed within the scope of the invention, change, replace and modification.The scope of the present invention
By appended claims and its equivalent limit.
Claims (12)
- A kind of 1. data transmission method for uplink, it is characterised in that including:Obtain the bit sequence of data to be sent;According to the bit sequence of the data to be sent, wave sequence corresponding to the bit in the bit sequence is continuously transmitted, Wherein, the wave sequence includes one below:First waveform sequence, the second wave sequence and the 3rd wave sequence, with described First waveform sequence represents the first data bit, represents second respectively with second wave sequence and the 3rd wave sequence Data bit, first data bit are one in bit 1 and bit 0, and second data bit is the He of bit 1 Another in bit 0, when at least two bits continuously transmitted are second data bit, it is described continuously transmit to Wave sequence corresponding to first bit in few two bits be second wave sequence, second bit and subsequently Wave sequence corresponding to bit is the 3rd wave sequence;Wherein, the feature of the wave sequence includes:The duration of the first waveform sequence, second wave sequence Duration and the duration of the 3rd wave sequence are identical, and the waveform of the first waveform sequence changes with high electricity It is low level to be opened flat saltus step after beginning and continuing the first preset time, and second wave sequence continues height within the duration Level, the 3rd wave sequence started using high level and after continuing the second preset time saltus step as low level, wherein, described One preset time is different from the duration of second preset time.
- 2. according to the method for claim 1, it is characterised in thatThe bit sequence according to the data to be sent, continuously transmit waveform sequence corresponding to the bit in the bit sequence Row, including:The level of sending port is controlled according to the waveform of wave sequence corresponding to the bit in the bit sequence and the ripple The feature of shape sequence is changed, to send the data to be sent.
- 3. method according to claim 1 or 2, it is characterised in thatThe feature of the wave sequence also includes:The duration is in inverse relation with the baud rate for transmitting the wave sequence;The first waveform sequence is terminated with high level, and the low level occurred in the first waveform sequence is in described continue Interior shared total duration does not change with the change for the baud rate for transmitting the wave sequence;And/or the 3rd waveform sequence Row are terminated with high level, and total duration of the low level occurred in the 3rd wave sequence shared by within the duration is not Change with the change for the baud rate for transmitting the wave sequence.
- 4. according to the method for claim 3, it is characterised in thatThe feature of the wave sequence also includes:When the low level occurred in the first waveform sequence total duration shared within the duration is less than described continue Between half;And/orWhen the low level occurred in 3rd wave sequence total duration shared within the duration is less than described continue Between half.
- 5. method according to any one of claim 1 to 4, it is characterised in thatT1=a × T, wherein, T1 is first preset time, and T is the duration, and a is default dutycycle coefficient, 0 < a < 1;T2=b × T, wherein, T2 is second preset time, and b is default dutycycle coefficient, 0≤b < 1;And a ≠ b.
- 6. according to the method described in any one of claim 1 to 5, it is characterised in thatThe feature of the wave sequence also includes:Second preset time is equal to 0, and the 3rd wave sequence only occurs once within the duration by low electricity It is flat to be changed into the level saltus step of high level, and terminated with high level;In the case where the first waveform sequence is terminated with low level, the first waveform sequence is started with high level and in institute State in the duration and only occur once being changed into low level level saltus step from high level;Or the first waveform sequence with In the case that high level terminates, the first waveform sequence started with high level and only occur within the duration once by High level is changed into low level level saltus step.
- 7. a kind of data sending device, it is characterised in that including acquisition module and sending module:The acquisition module, for obtaining the bit sequence of data to be sent;The sending module, for the bit sequence according to the data to be sent, continuously transmit the ratio in the bit sequence Wave sequence corresponding to spy, wherein, the wave sequence includes one below:First waveform sequence, the second wave sequence and Three wave sequences, the first data bit is represented with the first waveform sequence, respectively with second wave sequence and described Three wave sequences represent the second data bit, and first data bit is one in bit 1 and bit 0, second number It is another in the bit 1 and bit 0 according to bit, is second data bit at least two bits continuously transmitted When, wave sequence corresponding to first bit at least two bits continuously transmitted is second wave sequence, Wave sequence corresponding to second bit and follow-up bit is the 3rd wave sequence;Wherein, the feature of the wave sequence includes:The duration of the first waveform sequence, second wave sequence Duration and the duration of the 3rd wave sequence are identical, and the waveform of the first waveform sequence changes with high electricity It is low level to be opened flat saltus step after beginning and continuing the first preset time, and second wave sequence continues height within the duration Level, the 3rd wave sequence started using high level and after continuing the second preset time saltus step as low level, wherein, described One preset time is different from the duration of second preset time.
- 8. device according to claim 7, it is characterised in thatThe bit sequence according to the data to be sent, continuously transmit waveform sequence corresponding to the bit in the bit sequence Row, including:The level of sending port is controlled according to the waveform of wave sequence corresponding to the bit in the bit sequence and the ripple The feature of shape sequence is changed, to send the data to be sent.
- 9. the device according to claim 7 or 8, it is characterised in thatThe feature of the wave sequence also includes:The duration is in inverse relation with the baud rate for transmitting the wave sequence;The first waveform sequence is terminated with high level, and the low level occurred in the first waveform sequence is in described continue Interior shared total duration does not change with the change for the baud rate for transmitting the wave sequence;And/or the 3rd waveform sequence Row are terminated with high level, and total duration of the low level occurred in the 3rd wave sequence shared by within the duration is not Change with the change for the baud rate for transmitting the wave sequence.
- 10. device according to claim 9, it is characterised in thatThe feature of the wave sequence also includes:When the low level occurred in the first waveform sequence total duration shared within the duration is less than described continue Between half;And/orWhen the low level occurred in 3rd wave sequence total duration shared within the duration is less than described continue Between half.
- 11. the device according to any one of claim 7 to 10, it is characterised in thatT1=a × T, wherein, T1 is first preset time, and T is the duration, and a is default dutycycle coefficient, 0 < a < 1;T2=b × T, wherein, T2 is second preset time, and b is default dutycycle coefficient, 0≤b < 1;And a ≠ b.
- 12. according to the device described in any one of claim 7 to 11, it is characterised in thatThe feature of the wave sequence also includes:Second preset time is equal to 0, and the 3rd wave sequence only occurs once within the duration by low electricity It is flat to be changed into the level saltus step of high level, and terminated with high level;In the case where the first waveform sequence is terminated with low level, the first waveform sequence is started with high level and in institute State in the duration and only occur once being changed into low level level saltus step from high level;Or the first waveform sequence with In the case that high level terminates, the first waveform sequence started with high level and only occur within the duration once by High level is changed into low level level saltus step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611053483.7A CN107359964B (en) | 2016-11-24 | 2016-11-24 | Data sending method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611053483.7A CN107359964B (en) | 2016-11-24 | 2016-11-24 | Data sending method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107359964A true CN107359964A (en) | 2017-11-17 |
CN107359964B CN107359964B (en) | 2020-05-19 |
Family
ID=60270745
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611053483.7A Active CN107359964B (en) | 2016-11-24 | 2016-11-24 | Data sending method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107359964B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108092741A (en) * | 2017-12-12 | 2018-05-29 | 深圳和而泰数据资源与云技术有限公司 | Communication means, terminal and communication equipment based on audio interface |
CN113381846A (en) * | 2020-03-10 | 2021-09-10 | 鹤壁天海电子信息系统有限公司 | Communication method, device and terminal equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100158100A1 (en) * | 2008-12-19 | 2010-06-24 | Sony Corporation | Information processing apparatus and signal transmission method |
CN101855878A (en) * | 2007-11-13 | 2010-10-06 | Nxp股份有限公司 | Duty-cycle modulated transmission |
CN102333054A (en) * | 2011-09-26 | 2012-01-25 | 北京天地融科技有限公司 | Data sending and receiving method and device |
CN103716270A (en) * | 2011-09-26 | 2014-04-09 | 天地融科技股份有限公司 | Data sending and receiving method and device |
CN104796222A (en) * | 2014-11-21 | 2015-07-22 | 湖南先步信息股份有限公司 | A CAN baud-rate automatic matching method |
-
2016
- 2016-11-24 CN CN201611053483.7A patent/CN107359964B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101855878A (en) * | 2007-11-13 | 2010-10-06 | Nxp股份有限公司 | Duty-cycle modulated transmission |
US20100158100A1 (en) * | 2008-12-19 | 2010-06-24 | Sony Corporation | Information processing apparatus and signal transmission method |
CN102333054A (en) * | 2011-09-26 | 2012-01-25 | 北京天地融科技有限公司 | Data sending and receiving method and device |
CN103716270A (en) * | 2011-09-26 | 2014-04-09 | 天地融科技股份有限公司 | Data sending and receiving method and device |
CN104796222A (en) * | 2014-11-21 | 2015-07-22 | 湖南先步信息股份有限公司 | A CAN baud-rate automatic matching method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108092741A (en) * | 2017-12-12 | 2018-05-29 | 深圳和而泰数据资源与云技术有限公司 | Communication means, terminal and communication equipment based on audio interface |
CN108092741B (en) * | 2017-12-12 | 2021-03-19 | 深圳和而泰数据资源与云技术有限公司 | Communication method, terminal and communication equipment based on audio interface |
CN113381846A (en) * | 2020-03-10 | 2021-09-10 | 鹤壁天海电子信息系统有限公司 | Communication method, device and terminal equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107359964B (en) | 2020-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103141066B (en) | Transmission circuit, reception circuit, transmission method, reception method, communication system and communication method therefor | |
WO2018095181A1 (en) | Data transmission method and device | |
CN100489821C (en) | Communication system for use between electronic devices and method thereof | |
US10959214B2 (en) | Information processing method, communication device, and computer storage medium for ensuring correct generation of a check bit | |
CN107359964A (en) | Data transmission method for uplink and device | |
EP3547577B1 (en) | Data transmission method and terminal | |
CN107404319A (en) | Data receiver method and device | |
CN107241162B (en) | Data transmission method and device | |
CN107346997A (en) | A kind of data transmission method and terminal | |
CN107359962A (en) | Data receiver method and device | |
CN108694144A (en) | Interface circuit, signal transmission system and its method for transmitting signals | |
CN102394655B (en) | Manchester code converting method on MIC bus | |
CN107404366A (en) | Data transmission method for uplink and device | |
CN102420675B (en) | Methods and devices for transmitting and receiving using state information of buffer of data message | |
CN107346998B (en) | Data frame tail detection method and data transmission device | |
CN107346999B (en) | data frame tail detection method and data transmission device | |
CN108449144B (en) | A kind of mB1C code fiber optic serial data decoding method and communication means | |
CN107347001B (en) | A kind of data transmission method and terminal | |
CN106105120A (en) | Dispensing device and communication system | |
CN107359963B (en) | Data transmission method and terminal | |
CN110679124B (en) | Power efficient switching of data frames | |
CN102545953A (en) | UART (Universal Asynchronous Receiver/Transmitter) function extension circuit and control method thereof | |
CN113572629A (en) | Message transmission method, terminal and storage medium | |
WO2018095180A1 (en) | Data transmission method, data receiving method and devices | |
CN107370565A (en) | A kind of configured transmission adaptive data transmission method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |