CN103338031A - Special driving method of RS485 circuit in dual opto-isolator periphery application - Google Patents
Special driving method of RS485 circuit in dual opto-isolator periphery application Download PDFInfo
- Publication number
- CN103338031A CN103338031A CN2013102574241A CN201310257424A CN103338031A CN 103338031 A CN103338031 A CN 103338031A CN 2013102574241 A CN2013102574241 A CN 2013102574241A CN 201310257424 A CN201310257424 A CN 201310257424A CN 103338031 A CN103338031 A CN 103338031A
- Authority
- CN
- China
- Prior art keywords
- port
- circuit
- signal
- output
- counter
- 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
Images
Landscapes
- Programmable Controllers (AREA)
- Electronic Switches (AREA)
Abstract
The invention discloses a special driving method of an RS485 circuit in dual opto-isolator periphery application, which comprises the steps as follows: when the signal of an RE/DE port is '1', the RS485 circuit is in a normal driver mode; when the signal of the RE/DE port is changed from '1' into '0', the RS485 circuit is in a special driving mode, at the moment, the RS485 circuit generates a driving signal of '1' or '0', if the RE/DE port always retains the signal of '0', a counter continues counting until the counter is full, the RS485 circuit quits the special driving mode and returns to the normal operation mode, and a normal communication function is continuously realized; if the signal of the RE/DE port recovers '1', the RS485 immediately recovers the normal driver mode, and normal driving is kept going. The method can realize driving ability of three opto isolators, has a periphery application mode of dual opto-isolator, is suitable for a new national power grid standard, saves opto isolators, pull-up resistors and pull-down resistors, and lowers cost.
Description
Technical field
The present invention relates to a kind of driving method of circuit, specifically is the special driving method of a kind of RS485 circuit in two optocoupler peripheral applications.
Background technology
At present, the RS485 circuit is widely used in meter circuit and other association areas.Existing RS485 circuit generally has two kinds of peripheral applications modes: as shown in Figure 1 a kind of, adopt the peripheral applications mode of two optocouplers: the RE of RS485 circuit, DE port link together and are connected two optocouplers respectively with the RO port, DI port ground connection, provide control signal by MCU, A, B port add goes up pull down resistor.Under the application mode of this two optocouplers, RS485 drives " 0 " signal is provided by the driving of its circuit self, when needs RS485 circuit provides " 1 " signal, by A, B port power supply and resistance is over the ground spurred, and driving force is relatively poor.According to demand, also possibility RS485 drives " 1 " signal is provided by the driving of its circuit self, when needs RS485 circuit provides " 0 " signal, by A, B port power supply and resistance is over the ground spurred.
Another kind adopts the peripheral applications mode of three optocouplers as shown in Figure 2: the RE of RS485 circuit, DE port link together and are connected three optocouplers respectively with RO port, DI port, provide control signal by MCU.Under the application model of this three optocouplers, when needs RS485 interface circuit provides " 0 " and " 1 " signal, all be by DI port controlling A, B port output " 1 " and " 0 " signal, driving force is stronger, but need control port of the MCU of consumption more, and how to be connected the cost height with the DI port with an optocoupler.
According to the requirement that in January, 2013, the national grid new standard was put into effect, the A of each ammeter, B port will realize judging automatically the function of polarity, can't add pull down resistor and strengthen driving force.For the requirement of driving force, each ammeter factory can only adopt the scheme of three optocouplers, has increased cost.
Summary of the invention
The purpose of this invention is to provide the special driving method of a kind of RS485 circuit in two optocoupler peripheral applications, this method can realize the driving force of three optocouplers, peripheral applications mode that again can compatible two optocouplers.
In order to solve the problems of the technologies described above the technical scheme that adopts be, the special driving method of a kind of RS485 circuit in two optocoupler peripheral applications, wherein the RS485 circuit has input, output module, also have RO, RE, DE, DI, many controls of A, B and PORT COM, it is characterized in that described special driving method specifically comprises the steps:
1) when the signal of RE/DE port was " 1 ", the RS485 circuit entered normal drive mode, drove under the mode of operation normal, and the RS485 circuit is realized the normal function that drives;
2) when the signal of RE/DE port becomes " 0 " by " 1 ", make the RS485 circuit enter special drive pattern, and begin counting by the counter that arranges in the RS485 circuit;
3) under special drive pattern, the A port output driving signal anti-phase with the DI port of RS485 circuit, the driving signal of the output of B port and DI port homophase, can certainly change to the B port output driving signal anti-phase with the DI port as required, the driving signal of the output of A port and DI port homophase;
4) under special drive pattern, if the RE/DE port keeps " 0 " signal always, counter continues counting, and is full up to the counter meter, and the RS485 circuit withdrawed from special drive pattern and got back to driven device pattern this moment, continues to realize the normal function that drives;
5) under special drive pattern, if the signal of RE/DE port returns to " 1 ", then the RS485 circuit returns to driven device pattern at once, continues to realize the normal function that drives.
Preferably: the full time of described counter meter is the time that the RS485 circuit keeps special drive pattern, can be made as for 10 μ seconds.
The present invention provides a kind of RS485 circuit that can realize above-mentioned special driving method simultaneously, have control module, counter and oscillator, the input of RE, DE port link control module, the output control connection counter of control module, output module, input module; The input of input module connects A, B port, and its output connects the RO port; The input of output module connects the DI port, and its output connects A, B port; The input connection oscillator of counter, its output link control module.
The invention has the beneficial effects as follows: by method of the present invention, under the peripheral applications mode that adopts two optocouplers, when the signal of RE/DE port becomes " 0 " by " 1 ", need the RS485 circuit that " 1 " or " 0 " signal is provided again, do not need A, B port that power supply and last pull down resistor are over the ground spurred, the RS485 circuit enters special drive pattern automatically, can realize RS485 circuit output " 1 " or " 0 " signal under special drive pattern.By the judgement counting module is set in circuit, make the RS485 circuit withdraw from special drive pattern, continue to enter normal communication mode.The present invention has realized the driving force under the three optocoupler peripheral applications modes, has reduced an optocoupler and two last pull down resistors, has reduced cost, adapts to new national grid standard.
Description of drawings
Fig. 1 is the structured flowchart of existing RS485 circuit two optocoupler peripheral applications modes;
Fig. 2 is the structured flowchart of existing RS485 circuit three optocoupler peripheral applications modes;
Fig. 3 is the structured flowchart of RS485 circuit two optocoupler peripheral applications modes of the present invention;
Fig. 4 is workflow diagram of the present invention;
Fig. 5 is for realizing a kind of RS485 circuit structure block diagram of the present invention;
Fig. 6 is the existing work wave of RS485 circuit under two optocoupler application modes;
Fig. 7 is the work wave of RS485 circuit of the present invention under two optocoupler application modes.
Embodiment
Below in conjunction with accompanying drawing 3, Fig. 4, Fig. 5, Fig. 6, Fig. 7 a kind of concrete execution mode of the present invention is described.
As shown in Figure 3, structured flowchart for RS485 circuit two optocoupler peripheral applications modes of the present invention, compare with the existing RS485 circuit two optocoupler application modes shown in the accompanying drawing 1, go up pull down resistors for two that have saved A, B port, compare with the existing RS485 circuit three optocoupler peripheral applications modes shown in the accompanying drawing 2, saved an optocoupler that is connected with the DI port.
As shown in Figure 5, it is a kind of RS485 circuit that can realize the inventive method, this circuit comprises many control ports of RE, DE, RO, DI, A, B that have on input module 1, output module 2, control module 3, counter 4 and oscillator 5 and the RS485 chip, the input of RE, DE port link control module 3, the output control connection counter 4 of control module 3, output module 2, input module 1; The input of input module 1 connects A, B port, and its output connects the RO port; The input of output module 2 connects the DI port, and its output connects A, B port; The input connection oscillator 5 of counter 4, its output link control module 3.The operation principle of this circuit is as follows: RE, DE port are connected to control module 3, control module 3 control counters 4, output module 2, input module 1; Input module 1 receives the signal of A, B port, and outputs to the RO port; Output module 2 receives the DI port signal, and outputs to A, B port; Counter 4 provides clock signal by oscillator 5, and count results is delivered to control module 3.
As shown in Figure 4, be workflow diagram of the present invention, in conjunction with Fig. 5, a kind of embodiment of the present invention is as follows: the gate time that can adjust counter 4 according to concrete needs, establishing the 4 full times of counter in the present embodiment is 10 μ s, and when the signal of RE/DE port was " 1 ", the RS485 circuit entered normal drive mode, drive under the mode of operation normal, the RS485 circuit is realized the normal function that drives; When the signal of RE/DE port became " 0 " by " 1 ", the control module 3 that is connected with the RE/DE port made the RS485 circuit enter special drive pattern, and began counting by the counter 4 that arranges in the RS485 circuit; Under special drive pattern, the A port output driving signal anti-phase with the DI port of RS485 circuit, the driving signal of the output of B port and DI port homophase, can certainly change to the B port output driving signal anti-phase with the DI port as required, the driving signal of the output of A port and DI port homophase.Under special drive pattern, if the RE/DE port keeps " 0 " signal always, counter 4 continues counting, up to counter 4 full 10 μ second (this time can be adjusted as required), the RS485 circuit withdrawed from special drive pattern and got back to normal mode of operation this moment, continued to realize normal communication function; Under special drive pattern, if the signal of RE/DE port returns to " 1 ", then the RS485 circuit returns to driven device pattern at once, continues to realize the normal function that drives.
As shown in Figure 6, be the existing work wave of RS485 circuit under two optocoupler peripheral applications modes.After the signal of RE/DE port became " 0 " from " 1 ", the A port was charged to the VCC(supply voltage by pull-up resistor), the B port discharges into the GND(ground voltage by pull down resistor).This charging and discharging process is comparatively slow, in case load is more, perhaps pull down resistor is big on the port, charging and discharging currents is too small, or signal transmission rate is when too fast, the A port signal then can occur and can't charge to VCC voltage, the B port signal can't be discharged to GND voltage.The differential voltage of A, B port is in a single day too small, and receiving terminal can't judge, thereby can't communication.
As shown in Figure 7, be the work wave of the present invention under two optocoupler peripheral applications modes.Use the special driving method of the present invention and then the work wave shown in the accompanying drawing 6 can not occur, driving force of the present invention is consistent with the driving function of existing three optocoupler schemes." 0 " and " 1 " signal provides driving by circuit, after the RE/DE port has a falling pulse to arrive, circuit all can enter a special drive pattern, and maintenance certain hour, under this special drive pattern, circuit output " 1 " signal (the driving signal that the output of A port is anti-phase with the DI port, the B port is exported the driving signal with DI port homophase) or " 0 " signal (the driving signal that the output of B port is anti-phase with the DI port, the driving signal of the output of A port and DI port homophase).Thereby under the peripheral applications mode of two optocouplers, realized the driving force of three optocouplers, simultaneous adaptation national grid new standard has been saved last pull down resistor and the optocoupler of A, B port.
Claims (3)
1. the special driving method of a RS485 circuit in two optocoupler peripheral applications, wherein the RS485 circuit has input, output module, also have RO, RE, DE, DI, many controls of A, B and PORT COM, it is characterized in that: described special driving method specifically comprises the steps:
1) when the signal of RE/DE port was " 1 ", the RS485 circuit entered normal drive mode, drove under the mode of operation normal, and the RS485 circuit is realized the normal function that drives;
2) when the signal of RE/DE port becomes " 0 " by " 1 ", make the RS485 circuit enter special drive pattern, and begin counting by the counter that arranges in the RS485 circuit;
3) under special drive pattern, a driving signal that port output is anti-phase with the DI port in the A port of RS485 circuit and the B port, and the driving signal of another port output and DI port homophase;
4) under special drive pattern, if the RE/DE port keeps " 0 " signal always, counter continues counting, and is full up to the counter meter, and the RS485 circuit withdrawed from special drive pattern and got back to normal mode of operation this moment, continues to realize normal communication function;
5) under special drive pattern, if the signal of RE/DE port returns to " 1 ", then the RS485 circuit returns to driven device pattern at once, continues to realize the normal function that drives.
2. the special driving method of a kind of RS485 circuit according to claim 1 in two optocoupler peripheral applications is characterized in that: the full time of the counter meter in the described step 4) is the time that the RS485 circuit keeps special drive pattern, is 10 μ seconds.
3. the special driving method of RS485 circuit according to claim 1 in two optocoupler peripheral applications, it is characterized in that: wherein a kind of RS485 circuit of realizing said method has input module (1), output module (2), also has control module (3), counter (4) and oscillator (5); The input of RE, DE port link control module (3), the output control connection counter (4) of control module (3), output module (2), input module (1); The input of input module (1) connects A, B port, and its output connects the RO port; The input of output module (2) connects the DI port, and its output connects A, B port; The input connection oscillator (5) of counter (4), its output link control module (3).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310257424.1A CN103338031B (en) | 2013-06-26 | 2013-06-26 | The special driving method of a kind of RS485 circuit in two optocoupler peripheral applications |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310257424.1A CN103338031B (en) | 2013-06-26 | 2013-06-26 | The special driving method of a kind of RS485 circuit in two optocoupler peripheral applications |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103338031A true CN103338031A (en) | 2013-10-02 |
CN103338031B CN103338031B (en) | 2015-10-14 |
Family
ID=49246145
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310257424.1A Active CN103338031B (en) | 2013-06-26 | 2013-06-26 | The special driving method of a kind of RS485 circuit in two optocoupler peripheral applications |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103338031B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110690888A (en) * | 2019-09-29 | 2020-01-14 | 北京中科格励微科技有限公司 | Isolator for digital signals |
CN112034324A (en) * | 2020-06-23 | 2020-12-04 | 贵州电网有限责任公司 | Method and device for detecting driving capability of RS485 circuit |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026387A (en) * | 2007-02-13 | 2007-08-29 | 徐震 | Automatic stream control device, control method and its circuit |
CN201788205U (en) * | 2010-08-18 | 2011-04-06 | 宁波三星电气股份有限公司 | 485 communication circuit of electricity meter |
CN201821098U (en) * | 2010-04-28 | 2011-05-04 | 武汉迈威光电技术有限公司 | RS-485 or Profibus signal polarity automatic identification and switching technology |
US8018245B2 (en) * | 2009-04-01 | 2011-09-13 | Samsung Electronics Co., Ltd. | Semiconductor device |
CN102938720A (en) * | 2012-11-21 | 2013-02-20 | 武汉昊昱微电子股份有限公司 | Non-polarity communication circuit based on ammeter application |
-
2013
- 2013-06-26 CN CN201310257424.1A patent/CN103338031B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026387A (en) * | 2007-02-13 | 2007-08-29 | 徐震 | Automatic stream control device, control method and its circuit |
US8018245B2 (en) * | 2009-04-01 | 2011-09-13 | Samsung Electronics Co., Ltd. | Semiconductor device |
CN201821098U (en) * | 2010-04-28 | 2011-05-04 | 武汉迈威光电技术有限公司 | RS-485 or Profibus signal polarity automatic identification and switching technology |
CN201788205U (en) * | 2010-08-18 | 2011-04-06 | 宁波三星电气股份有限公司 | 485 communication circuit of electricity meter |
CN102938720A (en) * | 2012-11-21 | 2013-02-20 | 武汉昊昱微电子股份有限公司 | Non-polarity communication circuit based on ammeter application |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110690888A (en) * | 2019-09-29 | 2020-01-14 | 北京中科格励微科技有限公司 | Isolator for digital signals |
CN110690888B (en) * | 2019-09-29 | 2022-10-14 | 北京中科格励微科技有限公司 | Isolator for digital signals |
CN112034324A (en) * | 2020-06-23 | 2020-12-04 | 贵州电网有限责任公司 | Method and device for detecting driving capability of RS485 circuit |
Also Published As
Publication number | Publication date |
---|---|
CN103338031B (en) | 2015-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103716031B (en) | Non-polarity RS485 interface circuit conversion rate enhancement method and circuit | |
CN102800182B (en) | Wireless transceiving module and inverter system thereof | |
CN103338031A (en) | Special driving method of RS485 circuit in dual opto-isolator periphery application | |
CN103926862A (en) | Micro-power-consumption M-bus slave end circuit for intelligent instrument communication and communication method thereof | |
CN102915291B (en) | A kind of RS485 interface circuit with automatic reverse function | |
CN103347352A (en) | LED light source short-circuit detection method and device, LED backlight and liquid crystal display device | |
CN100485559C (en) | Communication transmit-receiver switch controller and its control method | |
CN203311413U (en) | RS485 interface circuit | |
CN103209270B (en) | Mainframe of medical communication calling device | |
CN103019994B (en) | Variable Baud rate serial communication interface circuit based on FPGA (field programmable gate array) | |
CN202736272U (en) | Wireless transceiving module and inversion system thereof | |
CN203838509U (en) | Micro-power consumption M-bus slave computer end circuit for intelligent instrument communication | |
CN205103416U (en) | Band conveyer metal detector's controlling means | |
CN202467460U (en) | Automatic door control system with touch screen | |
CN206099829U (en) | Stepper motor controller of low energy consumption | |
CN203883481U (en) | Independent compensation and co-compensation universal intelligent capacitor | |
CN205068377U (en) | High -speed SPI bus expander circuit of high reliability | |
CN104537951B (en) | Display device | |
CN205829215U (en) | A kind of wireless charging device of low-power consumption | |
CN205070877U (en) | Electromagnetic speed regulation motor control system | |
CN204086875U (en) | A kind of Portable weight controller | |
CN204681337U (en) | A kind of half-duplex isolating safety grid | |
CN204695748U (en) | A kind of microcontroller of configurable LCD driving circuit | |
CN104934759B (en) | A kind of intelligent modules insert row controllable based on the time and its control method | |
CN202677142U (en) | Feedback control interface for trickle irrigation facility based on facility agriculture sensor network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 214135 -6, Linghu Avenue, Wuxi Taihu international science and Technology Park, Wuxi, Jiangsu, China, 180 Patentee after: China Resources micro integrated circuit (Wuxi) Co., Ltd Address before: No.180-22, Linghu Avenue, Taihu International Science and Technology Park, Wuxi, Jiangsu 214100 Patentee before: WUXI CHINA RESOURCES SEMICO Co.,Ltd. |