CN105208021A - Data communication method and system - Google Patents

Data communication method and system Download PDF

Info

Publication number
CN105208021A
CN105208021A CN201510583365.6A CN201510583365A CN105208021A CN 105208021 A CN105208021 A CN 105208021A CN 201510583365 A CN201510583365 A CN 201510583365A CN 105208021 A CN105208021 A CN 105208021A
Authority
CN
China
Prior art keywords
target device
data
frame
data communication
bits
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
Application number
CN201510583365.6A
Other languages
Chinese (zh)
Other versions
CN105208021B (en
Inventor
王军宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Yichong Technology Co.,Ltd.
Original Assignee
INTERNATIONAL GREEN CHIP (TIANJIN) CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by INTERNATIONAL GREEN CHIP (TIANJIN) CO Ltd filed Critical INTERNATIONAL GREEN CHIP (TIANJIN) CO Ltd
Priority to CN201510583365.6A priority Critical patent/CN105208021B/en
Publication of CN105208021A publication Critical patent/CN105208021A/en
Application granted granted Critical
Publication of CN105208021B publication Critical patent/CN105208021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/387Information transfer, e.g. on bus using universal interface adapter for adaptation of different data processing systems to different peripheral devices, e.g. protocol converters for incompatible systems, open system

Abstract

The invention relates to a data communication method and system. The data communication method is applied to the data communication system formed by a source device, a target device and a unibus for connecting the source device with the target device. The data communication method includes the steps that the source device transmits data frames to the target device through the unibus according to a preset transmission protocol; the target device receives the data frames, decodes the data frames one by one and obtains one or more bit data; the target device carries out corresponding operation according to the one or more bit data; when the data communication system is in the data transmission mode and the one or more bit data obtained by the target device are first specific sequence codes, the target device gets into the control transmission mode; when the data communication system is in the control transmission mode and the one or more bit data obtained by the target device are second specific sequence codes, the target device quits the control transmission mode and gets into the data transmission mode. According to the data communication method and system, a single signal wire is adopted, the protocol is simple, and hardware cost is low.

Description

A kind of data communication method and system thereof
Technical field
The present invention relates to communication technical field, particularly relate to a kind of data communication method and system thereof.
Background technology
In order to simplify the wiring cost of the interconnective interface complexity of Circuits System and reduction printed board, in the electronic system that most of requirement of real-time is not high and transmission speed is lower, communication between source device (Host) and target device (Device) often adopts serial communication mode, its advantage is that holding wire is few, can realize long-distance transmissions.Target device is all generally exclusive functional peripheral components, and for realizing certain or certain several specific function, consider from the integrated cost of software and hardware, this circuit is suitable for the transmission and the reception that realize serial communication interface with hardware circuit.
Such as source device driving LED display module in cell phone system, is mainly arranged the output current size of LED, to change its display brightness.The transmission demand of this data is relevant with embody rule, only needs to change when LED luminance user, main frame just can and LED driving display module carry out transfer of data, transmitting procedure often completes within the time of several ms or hundreds of milliseconds.The application of this communication interface just carries out simple transfer of data, and namely transmission is containing the data of monochrome information, to the real-time of transfer of data and the rate request of transmission not high.
But in circuit realiration, after powering on, source device often will carry out initialization to target device, specific function configures, or carries out parameter adjustment to some variable amount in target device.Such as by the internal register of Offered target equipment, configure the operation such as suitable transmission rate and initialization procedure (sequential), to make it reach predetermined perfect condition, and then carry out transfer of data.Or source device is in the free time section of transfer of data, the internal state reading target device is analyzed, and resets the variable that it is relevant subsequently again, to adapt to new operational environment, or again parameter correction is carried out to target device, reach optimized operating state to make it.
In current Circuits System, comparatively conventional and serial line interface mainly I2C and SPI that line is less.Wherein I2C is two-wire system, communications protocol more complicated.SPI needs 3 to 4 holding wires, and interface links is more, has certain limitation in actual applications.As mentioned above, if in this kind of electronic system, except for transmitting except the serial communication interface of data, increase the communication interface being specifically designed to configuration or control or serial line interface again, must need to increase or use very limited pin resource, this increases causing the number of interface signal line, significantly increases chip cost and printed board cost, and periphery needs also increasing from equipment of interface with it.
The weak point of the data communication method of prior art is:
1. the dual serial interface that data transmission interface and control interface are independent often;
2. adopt at least 2 holding wires, agreement comparatively parallel interface is complicated;
3. periphery interface with it is more from equipment.
Single Wire Bus Technology, different from above-mentioned bus, it adopts single holding wire to realize communication between source device and target device, its structure and simplicity of design, hardware spending is few, easy communication, wiring cost is low, and is convenient to bus extension and maintenance, is highly suitable in the Circuits System of this simple low speed.
In practical application, more typical monobus signal wiring system, such as shown in Fig. 1, prior art single bus data communication system schematic diagram, it is the peripheral Serial Extension bus that Dallas company releases, only have a single data input/output line, can by 1 of a source device I/O mouth line as data input/output line, all devices all hang on this root line.Addressing and the data transmission of monobus have strict timing sequence specification.
Summary of the invention
The object of the invention is the weak point existed to solve above-mentioned prior art, on the basis that current single bus data transmits, a kind of data communication method and system thereof are provided, by the transmission of data and the transmission of control signal, distinguished by a self-defined exclusive software protocol, physically jointly to use or a multiplexing holding wire transmits at hardware simultaneously.
For achieving the above object, on the one hand, the invention provides a kind of data communication method, the method is applied to by source device, target device, and connects in the data communication system of monobus formation of described source device and target device, and the method comprises the following steps:
Source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of one or more bit; Target device receiving data frames, decodes one by one, obtains one or more number of bits certificate;
Target device operates accordingly according to one or more number of bits certificate;
When data communication system is in data-transmission mode, and one or more number of bits that target device obtains are according to when being the first particular sequence code, and target device enters controls transfer pattern;
When data communication system is in controls transfer pattern, and described one or more number of bits that described target device obtains are according to when being the second particular sequence code, and target device exits controls transfer pattern, enters data-transmission mode.
Preferably, Frame comprises start of frame bits, data bit, frame end position; Wherein, start of frame bits is the cycle time of one or more bit data; Data bit comprises one or more number of bits certificate, and data are transmitted by turn according to uimsbf unsigned integer most significant bit first, the posterior order of low level, or data according to low level formerly, high-order posterior order transmits by turn; Frame end position is that the first level changes to second electrical level and keeps the time of second electrical level to be greater than the cycle time of a bit data of 5 times; Frame end position is used to indicate a Frame and completes transmission, and target device can load and deal with data.
Preferably, source device starts the transmission of next Frame after completing a dataframe at any time; Or source device controls the second electrical level that monobus exports certain hour, as the interval between Frame.
Preferably, after target device enters controls transfer pattern, target device is decoded one by one to the Frame received, and obtains one or more number of bits certificate, determine to control frame head, according to the control mode controlling frame head configuration purpose marking device from one or more number of bits certificate;
Control mode comprises direct control mode and indirect control mode.
Preferably, the decoding rule of Frame comprises: when an a data bit high level lasting time tH and data bit low duration tL meets tL>2*tH, a data bit period signal designation effective low-level data 0; When an a data bit high level lasting time tH and data bit low duration tL meets tH>2*tL, a data bit period signal designation effective high level data 1.
Preferably, an a data bit high level lasting time tH and described data bit low duration tL need meet: TL<tL+tH<TH, and wherein, TH is very first time threshold value, TL is the second time threshold, and TH is greater than TL;
Very first time threshold value TH and the second time threshold TL confers default numerical value jointly by source device and target device, and very first time threshold value TH and the second time threshold TL is in units of system clock cycle, and second threshold value TL is not less than 4 times of described system clock.
Preferably, message transmission rate depends on driving force and the data-handling capacity of source device or target device.
Preferably, the first level is low level, and second electrical level is high level, or the first level is high level, and second electrical level is low level.
On the other hand, the invention provides a kind of data communication system, this system comprises: source device, target device and connect the monobus of source device and target device, wherein,
Source device, for according to the host-host protocol preset, by monobus by dataframe to target device, Frame is made up of one or more bit;
Target device, for receiving described Frame, decodes one by one, obtains one or more number of bits certificate;
Target device operates accordingly according to one or more number of bits certificate;
When data communication system is in data-transmission mode, and one or more number of bits that target device obtains are according to when being the first particular sequence code, and target device enters controls transfer pattern;
When data communication system is in controls transfer pattern, and one or more number of bits that target device obtains are according to when being the second particular sequence code, and target device exits controls transfer pattern, enters data-transmission mode.
The present invention adopts single holding wire, and agreement is simple, and system hardware expense is few, and wiring cost is low and the advantage of serial communication can be brought into play completely.
Accompanying drawing explanation
Fig. 1 is prior art single bus data communication system schematic diagram;
A kind of data communication method schematic flow sheet that Fig. 2 provides for the embodiment of the present invention;
The data frame structure schematic diagram that Fig. 3 provides for the embodiment of the present invention;
Fig. 4 to decode regular schematic diagram for Frame that the embodiment of the present invention provides;
A kind of implementation step that Fig. 5 is data communication method shown in Fig. 2;
The another kind of implementation step that Fig. 6 is data communication method shown in Fig. 2;
Another implementation step that Fig. 7 is data communication method shown in Fig. 2;
Another implementation step that Fig. 8 is data communication method shown in Fig. 2.
Embodiment
Below in conjunction with accompanying drawing, specific embodiments of the invention are described.But should be appreciated that, be only used to explain execution example of the present invention to the description of specific embodiment below, and any restriction do not carried out to scope of the present invention.
A kind of data communication method schematic flow sheet that Fig. 2 provides for the embodiment of the present invention, the method is applied in the data communication system be made up of source device, target device and the monobus that connects described source device and target device.As shown in Figure 2, the method comprising the steps of S101-S107:
In step S101, source device according to the host-host protocol preset, by monobus by dataframe to target device, described Frame is made up of one or more bit.
The above-mentioned host-host protocol preset comprises data frame structure, data frame transfer order and Frame decoding rule etc.
As shown in Figure 3, this Frame comprises start of frame bits (DataStart), data bit (DataByte), frame end position (EndOfData) to data frame structure.Wherein, defining start of frame bits (DataStart) in frame format, is the high level of certain time, the such as cycle T of a position information; Defining frame end position in frame format, is low to high two level process.When monobus is become high level from low level and kept the time of high level to be greater than position T information cycle of 5 times, indicate a frame to complete transmission, i.e. the current serial frame end of transmission, target device can this load and deal with data.Data bit starts with low level, becomes low level at monobus from high level, namely during trailing edge, be designated as the interval of two data bit, also the input operation as next bit data starts, and target device can judge that data bit level is 1 or 0, and carries out displacement reception operation.
In embodiment, each frame contains 8 bits, data frame transfer order shown in Fig. 3 is high-order (MSB) prioritised transmission, wherein D7, D6, D5, D4, D3, D2, D1, D0 are effective serial data, in such scheme, data are transmitted by turn with uimsbf unsigned integer most significant bit first, the posterior order of low level.Source device first sends high position data, then sends low data, and target device receives nearest bit data with low register, and former data is shifted to high register successively.As the variants of agreement, also can define as required data with low level formerly, high-order posterior order transmits by turn, namely data frame transfer order also can be low level (LSB) prioritised transmission.
A complete frame transmitting procedure is defined as:
DataStart(DS)=>D7=>D6=>D5=>D4=>D3=>D2=>D1=>D0=>DataOfEnd(EOD)。
In step S102, target device receives described Frame, decodes one by one, obtains described one or more number of bits certificate.
Above-mentioned Frame decodes rule as shown in Figure 4, wherein the low duration t of 400 expression data 0 l_LB, the high level lasting time t of 401 expression data 0 h_LB, the low duration t of 410 expression data 1 l_HB, the high level lasting time t of 411 expression data 1 h_HB.The time that definition signal cycle low and high level continues is T, and in each cycle, high level lasting time is tH, and low duration is tL, then have T=tL+tH.
Definition very first time threshold value TL, requires that the duration of cycle T should be greater than TL;
Define the second time threshold TH, require that the duration of cycle T should be less than TH;
If tL is greater than 2*tH, and TL<tL+tH<TH, be then designated as an effective low-level data 0;
If tH is greater than 2*tL, and TL<tL+tH<TH, be then designated as an effective high level data 1;
In a source device and a target device, according to four above-mentioned rule definition, the signal of monobus input is decoded, effective number of bits certificate can be obtained.
In such scheme, time threshold TH/TL is default, jointly can be conferred by a source device and target device numerical value, and TH is greater than TL, and time threshold TH/TL is the time threshold in units of system clock cycle.System clock cycle is less, threshold value is less, then message transmission rate is higher.But transmission rate can be subject to data-driven ability and the disposal ability restriction of source device or target device, preferably, t in the present embodiment l_HBbe greater than the time of 4us.
In specific embodiment party face, time threshold TL generally should not lower than 4 of system clock cycle times; When the system clock definition of source device or target device is not very accurate, the time difference strengthening tL and tH can be considered, to avoid target device when decoding due to error code that the non-ideal factors such as transmitted noise produce.In our enforcement, when bit data is 1, the time t of holding wire output low level l_HBbe the high level time t of 0.3 times h_HB; When bit data is 0, the time t of holding wire output low level l_LBbe the high level time t of 3 times h_LB.
After completing the transmission of previous consecutive frame, source device can start the transmission of next consecutive frame at any time, and source device also can control the high level that monobus exports certain hour, as the interval between frame and frame.
Source device according to above-mentioned protocol definition data frame structure, data frame transfer order and Frame decoding rule, successively Frame is sent to target device from monobus.After target device receives Frame, carry out duty ratio decoding one by one, after frame is transmitted, converts parallel data to, effective one or more number of bits certificate can be recovered.
In step S103, target device operates accordingly according to described one or more number of bits certificate.
In step S104, when data communication system is in data-transmission mode, and one or more number of bits that target device obtains are according to when being the first particular sequence code, and enter step S106, target device enters controls transfer pattern; Otherwise enter step S105, target device maintains data-transmission mode.
Particularly, data communication system is defaulted as data-transmission mode after powering on.Under data-transmission mode, source device and target device carry out transfer of data according to above-mentioned host-host protocol.
In one embodiment, according to above-mentioned monobus host-host protocol, source device is by monobus, and send following particular sequence code (particular sequence code is as shown in table 1) to target device, target device will enter controls transfer pattern;
Table 1
D7 D6 D5 D4 D3 D2 D1 D0 Mode of operation
1 1 1 1 0 1 0 0 Enter controls transfer pattern
In step S106, target device is under controls transfer pattern, the Frame received is decoded one by one, obtain one or more number of bits certificate, determine to control frame head, the control mode according to controlling frame head configuration purpose marking device from one or more number of bits certificate: directly control mode or indirectly control mode.
Particularly, after entering controls transfer pattern, monobus host-host protocol is defined as:
Completely the same when the concrete sequential of controls transfer pattern and transfer of data;
Redefine the coding and decoding rule of target device to [D7D6D5D4D3D2D1D0],
[D7D6] is set as control frame head, dibit.If [D7D6_D5D4D3D2D1D0] is:
00_xxxxxx: directly control mode, D5D4D3D2D1D0 is direct control bit, and user can using these 6 bits as concrete control bit write target device, realizes priority or the higher function of important ratio controls;
01_xxxxxx/10_xxxxxx/11_xxxxxx: control mode indirectly, D5D4D3D2D1D0 is concrete command code; In the particular embodiment, when frame head [D7D6] is respectively 01/10/11, definable its mutually combine the concrete meaning realizing controlling behavior.
In the present embodiment, as follows to behavior class definition under indirect control mode:
11_xxxxxx: arrange operated register address (6bits), now D5D4D3D2D1D0 corresponds to specific address position;
10_xxxxxx: the register data (6bits) corresponding to write, now D5D4D3D2D1D0 is for specifically to write data value;
01_xxxxxx: the register data (6bits) corresponding to reading, now D5D4D3D2D1D0 is concrete sense data value; In the time period of D5D4D3D2D1D0 and EOD thereafter, target device will have monobus control.
In step S107, when data communication system is in controls transfer pattern, and one or more number of bits that target device obtains are according to when being the second particular sequence code, and target device exits controls transfer pattern, enter step S105, target device enters data arq mode; Otherwise enter step S106, target device maintains controls transfer pattern.
Particularly, in one embodiment, if under controls transfer pattern, according to above-mentioned monobus host-host protocol, source device passes through monobus, send following particular sequence code (particular sequence code is as shown in table 2) to target device, target device will exit controls transfer pattern, enter data-transmission mode.
Table 2
D7 D6 D5 D4 D3 D2 D1 D0 Mode of operation
1 1 1 1 1 0 0 1 Exit controls transfer pattern
Particularly, below by drawings and Examples, technical scheme of the present invention is described in further detail.
In one embodiment of the present of invention, in the data communication system be made up of source device, target device and the monobus that connects described source device and target device, source device is to target device transmission data 0xA5, regulate LED display brightness, target device is here LED display module.
Particularly, step is as follows: source device according to the host-host protocol preset, by monobus by dataframe to target device LED display module, wherein Frame is made up of 8 bits;
After system electrification, default sources equipment and target device enter data-transmission mode;
Under data-transmission mode, target device LED display module receiving data frames, decodes one by one, obtains 8 number of bits according to 10100101B;
Target device LED display module changes output current size, to change its display brightness according to 8 number of bits according to 10100101B.
Another embodiment of the present invention, in the data communication system be made up of source device, target device and the monobus that connects described source device and target device, under present data transmission pattern, source device sends control information to target device, and particular data is write target device and specifies register by source device.Such as, register R11 (address is 11) numerical value in source device Offered target equipment is that the concrete operation step of 0x3C (6bits) comprises step 1-step 4:
Particularly, step 1 as shown in Figure 5: source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of 8 bits;
After data communication system powers on, acquiescence enters data-transmission mode, and under data-transmission mode, target device is decoded one by one to Frame, obtains 8 number of bits according to 11110100B;
Target device judges that 8 number of bits are the first particular sequence code according to 11110100B, and target device enters controls transfer pattern;
Step 2 is as shown in Figure 6: under controls transfer pattern, source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of 8 bits;
Under controls transfer pattern, target device is decoded one by one to Frame, obtains 8 number of bits according to 11B+001011B; From 8 number of bits certificates, D7D6 (11B) determines that controlling frame head is 11B, be indirect control mode and address (6bits) for arranging operated register according to controlling frame head 11B configuration purpose marking device, it is 001011B that target device reads D5D4D3D2D1D0, and the address arranging operated register is 11;
Step 3 is as shown in Figure 7: under controls transfer pattern, source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of 8 bits;
Under controls transfer pattern, target device is decoded one by one to Frame, obtains 8 number of bits according to 10B+111100B; From 8 number of bits certificates, D7D6 (10B) determines that controlling frame head is 10B, be indirect control mode according to controlling frame head 10B configuration purpose marking device and be the data (6bits) of the corresponding register of write, it is 111100B that target device reads D5D4D3D2D1D0, by operated by data (111100B) write step 2 that reads in register (address is 11);
Step 4 is as shown in Figure 8: under controls transfer pattern, source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of 8 bits;
Under controls transfer pattern, target device is decoded one by one to Frame, obtains 8 number of bits according to 11111001B;
Target device judges that 8 number of bits are the second particular sequence code according to 11111001B, and target device exits controls transfer pattern, enters data-transmission mode;
So far, the register R11 of target device inside successfully must be set to 0x3C by source device, completes control operation.
Another embodiment of the present invention, in the data communication system be made up of source device, target device and the monobus that connects described source device and target device, under present data transmission pattern, source device sends control information to target device, and source device reads the data in target device appointment register.Such as source device reads the content of register R22 (address is 22) in target device, and concrete operation step is as follows:
Step 1: source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of 8 bits;
After system electrification, acquiescence enters data-transmission mode, and under data-transmission mode, target device is decoded one by one to Frame, obtains 8 number of bits according to 11110100B;
Target device judges that 8 number of bits are the first particular sequence code according to 11110100B, and target device enters controls transfer pattern;
Step 2: under controls transfer pattern, source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of 8 bits;
Under controls transfer pattern, target device is decoded one by one to Frame, obtains 8 number of bits according to 11B+010110B; From 8 number of bits certificates, D7D6 (11B) determines that controlling frame head is 11B, be indirect control mode and address (6bits) for arranging operated register according to controlling frame head 11B configuration purpose marking device, it is 010110B that target device reads D5D4D3D2D1D0, and the address arranging operated register is 22;
Step 3: under controls transfer pattern, source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of 2 bits;
Under controls transfer pattern, target device is decoded one by one to Frame, obtains 2 number of bits according to 01B; From 2 number of bits according to D7D6 (01B) determine that controlling frame head is 01B, according to controlling the register data (6bits) of frame head 01B configuration purpose marking device for indirect control mode and corresponding to reading;
Source device discharges bus control right after sending frame head D7D6 (01B) immediately, and make monobus be in non-driving condition, now monobus is pulled upward to high level by outside;
Step 4: under controls transfer pattern, it is after the sequence of 01B that target device receives frame head, first reading address is the internal register contents of 22, then obtain monobus control and (detect that bus is high, non-driving condition), with a high position front, the posterior order of low level, is sent to monobus (_ xxxxxxB) by the content of register.After being sent completely, target device equally also can transmission frame stop bits, transmits completed handshake as source device judges frame.After target device sends frame end position, will bus control right be discharged simultaneously, and make monobus be in non-driving condition (being now pulled upward to high level by outside);
Step 5: after source device successfully have received the sequence of target device transmission, detects frame end position and current monobus is in non-driving condition, regains monobus control;
Step 6: under controls transfer pattern, source device according to the host-host protocol preset, by monobus by dataframe to target device, wherein Frame is made up of 8 bits;
Under controls transfer pattern, target device is decoded one by one to Frame, obtains 8 number of bits according to 11111001B;
Target device judges that 8 number of bits are the second particular sequence code according to 11111001B, and target device exits controls transfer pattern, enters data-transmission mode;
So far, source device successfully have read the content of the internal register R22 of target device, completes control operation.
Data-signal transmission and control signal transmission, by a kind of data communication method and system thereof, monobus serial line interface are achieved by the embodiment of the present invention.Based on the technical scheme of the embodiment of the present invention, can in general low and middle-end electronic product and corresponding integrated circuit, with lower hardware cost, less resource consumption, less software overhead, realize the transfer of data between each integrated circuit and module, the especially suitable single-chip microcomputer as source device transmits data and control signal to the peripheral components as target device.
Above-described embodiment; object of the present invention, technical scheme and beneficial effect are further described; be understood that; the foregoing is only the specific embodiment of the present invention; the protection range be not intended to limit the present invention; within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. a data communication method, is applied in the data communication system be made up of source device, target device and the monobus that connects described source device and target device, it is characterized in that:
Described source device is according to the host-host protocol preset, and give described target device by described monobus by dataframe, described Frame is made up of one or more bit;
Described target device receives described Frame, decodes one by one, obtains described one or more number of bits certificate;
Described target device operates accordingly according to described one or more number of bits certificate;
When described data communication system is in data-transmission mode, and described one or more number of bits that described target device obtains are according to when being the first particular sequence code, and target device enters controls transfer pattern;
When described data communication system is in controls transfer pattern, and described one or more number of bits that described target device obtains are according to when being the second particular sequence code, and target device exits controls transfer pattern, enters data-transmission mode.
2. data communication method according to claim 1, is characterized in that: described Frame comprises start of frame bits, data bit, frame end position, wherein,
Described start of frame bits is the cycle time of one or more bit data;
Described data bit comprises one or more number of bits certificate, and described data are transmitted by turn according to uimsbf unsigned integer most significant bit first, the posterior order of low level, or described data according to low level formerly, high-order posterior order transmits by turn;
Described frame end position is that the first level changes to second electrical level and keeps the time of second electrical level to be greater than the cycle time of a bit data of 5 times;
Described frame end position is used to indicate a Frame and completes transmission, and described target device can load and deal with data.
3. data communication method according to claim 1, is characterized in that: described source device starts the transmission of next Frame after completing a dataframe at any time; Or described source device controls the second electrical level that described monobus exports certain hour, as the interval between described Frame.
4. data communication method according to claim 1, it is characterized in that: after target device enters controls transfer pattern, target device is decoded one by one to the Frame received, obtain one or more number of bits certificate, determine to control frame head from described one or more number of bits certificate, configure the control mode of described target device according to described control frame head;
Described control mode comprises direct control mode and indirect control mode.
5. data communication method according to claim 2, it is characterized in that: the decoding rule of described Frame is: when an a described data bit high level lasting time tH and described data bit low duration tL meets relation: tL>2*tH, the effective low-level data 0 of a described data bit period signal designation one; The tH>2*tL when an a described data bit high level lasting time tH and described data bit low duration tL meets relation, the effective high level data 1 of a described data bit period signal designation one.
6. data communication method according to claim 5, it is characterized in that: an a described data bit high level lasting time tH and described data bit low duration tL need meet: TL<tL+tH<TH, wherein, TH is very first time threshold value, TL is the second time threshold, and TH is greater than TL;
Described very first time threshold value TH and described second time threshold TL confers default numerical value jointly by source device and target device, described very first time threshold value TH and the second time threshold TL is in units of system clock cycle, and described second threshold value TL is not less than 4 times of described system clock.
7. data communication method according to claim 5, is characterized in that: message transmission rate depends on driving force and the data-handling capacity of described source device or described target device.
8. data communication method according to Claims 2 or 3, is characterized in that: described first level is low level, and described second electrical level is high level; Or described first level is high level, described second electrical level is low level.
9. a data communication system, is characterized in that, comprising: source device, target device and connect the monobus of described source device and target device, wherein,
Source device, for according to the host-host protocol preset, give described target device by described monobus by dataframe, described Frame is made up of one or more bit;
Target device, for receiving described Frame, decodes one by one, obtains described one or more number of bits certificate;
Described target device operates accordingly according to described one or more number of bits certificate;
When described data communication system is in data-transmission mode, and described one or more number of bits that described target device obtains are according to when being the first particular sequence code, and target device enters controls transfer pattern;
When described data communication system is in controls transfer pattern, and described one or more number of bits that described target device obtains are according to when being the second particular sequence code, and target device exits controls transfer pattern, enters data-transmission mode.
CN201510583365.6A 2015-09-14 2015-09-14 A kind of data communication method and its system Active CN105208021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510583365.6A CN105208021B (en) 2015-09-14 2015-09-14 A kind of data communication method and its system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510583365.6A CN105208021B (en) 2015-09-14 2015-09-14 A kind of data communication method and its system

Publications (2)

Publication Number Publication Date
CN105208021A true CN105208021A (en) 2015-12-30
CN105208021B CN105208021B (en) 2019-01-22

Family

ID=54955454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510583365.6A Active CN105208021B (en) 2015-09-14 2015-09-14 A kind of data communication method and its system

Country Status (1)

Country Link
CN (1) CN105208021B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108011692A (en) * 2017-06-30 2018-05-08 宁波方太厨具有限公司 A kind of data communications method for microcontroller
CN108429612A (en) * 2018-03-01 2018-08-21 航天柏克(广东)科技有限公司 A kind of semiduplex means of communication of single line
CN111739276A (en) * 2020-07-02 2020-10-02 上海赞芯电子科技有限公司 Communication protocol and communication method for electronic fuse
CN112672253A (en) * 2020-12-09 2021-04-16 瑞芯微电子股份有限公司 PCM data modulation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040039967A1 (en) * 2002-08-26 2004-02-26 Samsung Electronics Co., Ltd. Embedded controller for real-time backup of operation states of peripheral devices
CN101984486A (en) * 2010-10-25 2011-03-09 深圳市明微电子股份有限公司 Transmission method capable of setting instructions and transmission device
CN102033833A (en) * 2009-09-25 2011-04-27 研祥智能科技股份有限公司 Serial port communication switching method and serial port communication system
CN104679704A (en) * 2013-12-02 2015-06-03 林南 Single bus communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040039967A1 (en) * 2002-08-26 2004-02-26 Samsung Electronics Co., Ltd. Embedded controller for real-time backup of operation states of peripheral devices
CN102033833A (en) * 2009-09-25 2011-04-27 研祥智能科技股份有限公司 Serial port communication switching method and serial port communication system
CN101984486A (en) * 2010-10-25 2011-03-09 深圳市明微电子股份有限公司 Transmission method capable of setting instructions and transmission device
CN104679704A (en) * 2013-12-02 2015-06-03 林南 Single bus communication system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108011692A (en) * 2017-06-30 2018-05-08 宁波方太厨具有限公司 A kind of data communications method for microcontroller
CN108429612A (en) * 2018-03-01 2018-08-21 航天柏克(广东)科技有限公司 A kind of semiduplex means of communication of single line
CN111739276A (en) * 2020-07-02 2020-10-02 上海赞芯电子科技有限公司 Communication protocol and communication method for electronic fuse
CN111739276B (en) * 2020-07-02 2021-08-31 上海赞芯电子科技有限公司 Communication protocol and communication method for electronic fuse
CN112672253A (en) * 2020-12-09 2021-04-16 瑞芯微电子股份有限公司 PCM data modulation method and device

Also Published As

Publication number Publication date
CN105208021B (en) 2019-01-22

Similar Documents

Publication Publication Date Title
JP6325537B2 (en) N-phase polarity output pin mode multiplexer
US20140112401A1 (en) 3dynamic configuration of an n-phase polarity data communications link
US20190146944A1 (en) Dynamically adjustable multi-line bus shared by multi-protocol devices
JP6878300B2 (en) Improved virtual GPIO with multi-mode modulation
CN105208021A (en) Data communication method and system
CN106462528A (en) Power-saving mode for USB power delivery sourcing device
US20200142854A1 (en) Multilane heterogeneous serial bus
EP3311296B1 (en) Uart with automated protocols
US10139875B2 (en) Farewell reset and restart method for coexistence of legacy and next generation devices over a shared multi-mode bus
US9990330B2 (en) Simultaneous edge toggling immunity circuit for multi-mode bus
JP5662946B2 (en) Digital radio frequency interface control
WO2016205400A1 (en) Serial interface with bit-level acknowledgement and error correction
CN111713073B (en) Subscriber station for a serial bus system and method for transmitting messages in a serial bus system
CN111884987B (en) Electronic device and method for electronic device
TW201926952A (en) Technique for RFFE and SPMI register-0 write datagram functional extension
CN210405365U (en) Multi-protocol aggregation transmission device and system
CN210270888U (en) Single-bus communication circuit
CN110518937A (en) Junction cable and augmented reality system
US20190020441A1 (en) Out-of-Band Communication in a Serial Communication Environment
CN117857730A (en) Delay control method, delay control device, interface chip and display system
CN115280726A (en) Transmitting/receiving device and communication control device for a subscriber station of a serial bus system and method for communication in a serial bus system
CN1567185A (en) Method for transmitting data between microprocessors of PLC

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210421

Address after: No.1, floor 4, building 10, No.303, group 3, liangfengding village, Zhengxing Town, Tianfu New District, Chengdu, Sichuan 610000

Patentee after: Sichuan Yichong Technology Co.,Ltd.

Address before: 300457, Tianjin Binhai New Area, Tianjin Development Zone, No. 19 West Ring Road, TEDA service outsourcing Garden No. 2701-1 building, room 2

Patentee before: INTERNATIONAL GREEN CHIP (TIANJIN) Co.,Ltd.

TR01 Transfer of patent right