The test system and method for testing of discrete input/output signal
Technical field
The present invention relates to equipment technical field of measurement and test, more particularly to a kind of test system of discrete input/output signal
System and method of testing.
Background technology
The signal of vehicle-mounted, airborne, carrier-borne discrete control input output equipment is responsible for processing the control of electronic equipment
Signal processed, its discrete control input signal is responsible for vehicle-mounted, airborne, Shipborne Electronic Equipment the status information of collection
Or the control information of reception associated electronic device;Discrete controlled output signal is responsible for vehicle-mounted, airborne, carrier-borne
Electronic equipment sends control information or returns the status information of associated electronic device.
Vehicle-mounted, airborne, Shipborne Electronic Equipment operation level is often with the operation level of general industry equipment not
Together, it is impossible to by the discrete control input output equipment signal of general industry equipment directly with vehicle-mounted, airborne, warship
The signal connection of electronic equipment is carried, otherwise can badly damaged associated electronic device.
Operating voltage in some industrial environments is often to need between 110V, and electronic equipment by discrete defeated
Enter signal and output signal to enter row data communication, conditional access and control etc., electronic equipment is tested
It is unpractical that Shi Ruguo goes industry spot actual test every time.Additionally, vehicle-mounted, airborne, carrier-borne electronics
The generation of the discrete control input signal of equipment and output signal needs strict timing control signal and enable signal
Cooperation, and the discrete control input signal of general industry equipment and output signal are simple signal input
And signal output, SECO and the enable of discrete control input output signal are not related at all, it is impossible to met
Actual testing requirement.
The content of the invention
The present invention provides a kind of test system and method for testing of discrete input/output signal, can be according to test
Demand produces discrete input signal and output signal, and electronic equipment to be measured is tested.
On the one hand, the present invention provides a kind of test system of discrete input signal, including main control chip, at least
One discrete input signal processing module and at least one discrete output signal processing module, the main control chip
Including I2C controllers;One end of the discrete input signal processing module is connected with electronic equipment to be measured, separately
One end is connected with the I2C controllers;One end of the discrete output signal processing module sets with electronics to be measured
Standby connection, the other end is connected with the I2C controllers;
The discrete input signal processing module is used to receive the discrete output signal of electronic equipment to be measured, by institute
The discrete output signal of electronic equipment to be measured is stated as discrete input signal, and in the control of the I2C controllers
Under system, the discrete input signal is processed so that the level state of the discrete input signal keeps
It is constant;
The discrete output signal processing module is used under the control of the I2C controllers, produces discrete defeated
Go out signal, and the discrete output signal is processed so that the level state of the discrete output signal
Keep constant, the discrete output signal is sent to electronic equipment to be measured, as the electronic equipment to be measured
Discrete input signal.
Optionally, the discrete input signal processing module includes the first control chip, the first I/O chip, thoroughly
Bright D flip-flop and optocoupler;The input of the optocoupler is connected with electronic equipment to be measured, output end with it is described
The input connection of transparent D flip-flop;The output end of the transparent D flip-flop and an IO
The input connection of chip, Enable Pin is connected with the output end of first control chip;The I2C controls
Device is connected with first control chip and the first I/O chip;
The discrete output signal of the electronic equipment to be measured is discrete as the discrete input signal processing module
Input signal, the input of optocoupler output described in Jing to the transparent D flip-flop, the first control core
Piece produces timing control signal under the control of the I2C controllers, triggers the enable of the D flip-flop
End so that the discrete input signal is correctly latched and transmitted to the output end of the transparent D flip-flop,
First I/O chip is gathered the discrete input signal by the output end of the transparent D flip-flop and is exported.
Optionally, the discrete output signal processing module includes the second control chip, the second I/O chip, side
Along triggering D flip-flop and Darlington transistor;The I2C controllers and second control chip and the 2nd IO
Chip connects, and the output end of second control chip connects with the Enable Pin of the edging trigger D flip-flop
Connect, the output end of second I/O chip is connected with the input of the edging trigger D flip-flop, described
The output end of edging trigger D flip-flop is connected with the input of the Darlington transistor, the Darlington transistor
Output end is connected with electronic equipment to be measured;
Second I/O chip produces discrete output signal under the control of the I2C controllers, and sends
To the input of the transparent D flip-flop, control of second control chip in the I2C controllers
Lower generation timing control signal, triggers the Enable Pin of the D flip-flop so that the discrete output signal
Correctly latch and transmit to the output end of the transparent D flip-flop, and send out after Darlington transistor is processed described in
Electronic equipment to be measured is delivered to, as the discrete input signal of the electronic equipment to be measured.
Optionally, the main control chip is south bridge HM65.
Optionally, first control chip is FPGA or MCU;First I/O chip is PCA9555.
Optionally, second control chip is FPGA or MCU;Second I/O chip is PCA9555.
On the other hand, the present invention provides a kind of method of testing of discrete input signal, including:
Discrete input signal processing module receives the discrete output signal of electronic equipment to be measured, by the electricity to be measured
The discrete output signal of sub- equipment as discrete input signal, and under the control of I2C controllers, to described
Discrete input signal is processed so that the level state of the discrete input signal keeps constant;
Discrete output signal processing module produces discrete output signal under the control of I2C controllers, and right
The discrete output signal is processed so that the level state of the discrete output signal keeps constant, will
The discrete output signal is sent to electronic equipment to be measured, and the discrete input as the electronic equipment to be measured is believed
Number;
Wherein, the I2C controllers be located at main control chip in, the discrete input signal processing module and from
Scattered output signal processing module is at least one, one end of the discrete input signal processing module with it is to be measured
Electronic equipment connects, and the other end is connected with the I2C controllers;The discrete output signal processing module
One end is connected with electronic equipment to be measured, and the other end is connected with the I2C controllers.
Optionally, the discrete input signal processing module includes the first control chip, the first I/O chip, thoroughly
Bright D flip-flop and optocoupler;
The discrete input signal processing module receives the discrete output signal of electronic equipment to be measured, treats described
The discrete output signal of electronic equipment is surveyed as discrete input signal, and under the control of I2C controllers, it is right
The discrete input signal is processed so that the level state of the discrete input signal keeps constant, bag
Include:
The discrete output signal of the electronic equipment to be measured is discrete as the discrete input signal processing module
Input signal, input of the optocoupler output to the transparent D flip-flop described in Jing;
First control chip produces timing control signal under the control of the I2C controllers, triggers institute
State the Enable Pin of D flip-flop so that the discrete input signal is correctly latched and transmitted to the transparent D
The output end of D-flip flop;
First I/O chip gathers the discrete input signal simultaneously by the output end of the transparent D flip-flop
Output.
Optionally, the discrete output signal processing module includes the second control chip, the second I/O chip, side
Along triggering D flip-flop and Darlington transistor;
The discrete output signal processing module produces discrete output signal under the control of I2C controllers,
And the discrete output signal is processed so that the level state of the discrete output signal keeps constant,
The discrete output signal is sent to electronic equipment to be measured, as the discrete input of the electronic equipment to be measured
Signal, including:
Second I/O chip produces discrete output signal under the control of the I2C controllers, and sends
To the input of the transparent D flip-flop;
Second control chip produces timing control signal under the control of the I2C controllers, triggers institute
State the Enable Pin of D flip-flop so that the discrete output signal is correctly latched and transmitted to the transparent D
The output end of D-flip flop;
The discrete output signal is sent to electronic equipment to be measured, as described described in after Darlington transistor is processed
The discrete input signal of electronic equipment to be measured.
The test system and method for testing of discrete input/output signal provided in an embodiment of the present invention, discrete input
Signal processing module receives the discrete output signal of electronic equipment to be measured, by the discrete of the electronic equipment to be measured
Output signal as discrete input signal, and under the control of I2C controllers, to the discrete input signal
Processed so that the level state of the discrete input signal keeps constant;Discrete output signal processes mould
Block under the control of I2C controllers, produce discrete output signal, and to the discrete output signal at
Reason so that the level state of the discrete output signal keeps constant, by the discrete output signal send to
Electronic equipment to be measured, as the discrete input signal of the electronic equipment to be measured.Compared with prior art, originally
Invention can be believed the discrete output signal of electronic equipment to be measured as the input of discrete input signal processing module
Number, the output signal of discrete output signal processing module is sent to electronic equipment to be measured and as electronics to be measured
The input signal of equipment, by these signals, electronic equipment to be measured can obtain vehicle-mounted, airborne, carrier-borne electricity
The status information of sub- equipment simulating is received from vehicle-mounted, airborne, Shipborne Electronic Equipment simulation control letter
Breath, is tested such that it is able to simulate vehicle-mounted, airborne, on-board equipment device under test.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to implementing
Example or the accompanying drawing to be used needed for description of the prior art are briefly described, it should be apparent that, retouch below
Accompanying drawing in stating is only some embodiments of the present invention, for those of ordinary skill in the art, not
On the premise of paying creative work, can be with according to these other accompanying drawings of accompanying drawings acquisition.
The structural representation of the test system of the discrete input/output signal that Fig. 1 is provided for one embodiment of the invention;
The structured flowchart of the test system of the discrete input/output signal that Fig. 2 is provided for another embodiment of the present invention;
Fig. 3 be discrete input/output signal provided in an embodiment of the present invention method of testing in discrete input signal
Process flow figure;
Fig. 4 be discrete input/output signal provided in an embodiment of the present invention method of testing in discrete output signal
Process flow figure;
Fig. 5 is the test interface of the test system of discrete input/output signal provided in an embodiment of the present invention.
Specific embodiment
To make purpose, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the present invention
Accompanying drawing in embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that
Described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.Based on this
Embodiment in bright, the institute that those of ordinary skill in the art are obtained under the premise of creative work is not made
There is other embodiment, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of test system of discrete input/output signal, as shown in figure 1, described
System includes main control chip, at least one discrete input signal processing module and at least one discrete output signal
Processing module, the main control chip includes I2C controllers;One end of the discrete input signal processing module
It is connected with electronic equipment to be measured, the other end is connected with the I2C controllers;The discrete output signal is processed
One end of module is connected with electronic equipment to be measured, and the other end is connected with the I2C controllers;
The discrete input signal processing module is used to receive the discrete output signal of electronic equipment to be measured, by institute
The discrete output signal of electronic equipment to be measured is stated as discrete input signal, and in the control of the I2C controllers
Under system, the discrete input signal is processed so that the level state of the discrete input signal keeps
It is constant;
The discrete output signal processing module is used under the control of the I2C controllers, produces discrete defeated
Go out signal, and the discrete output signal is processed so that the level state of the discrete output signal
Keep constant, the discrete output signal is sent to electronic equipment to be measured, as the electronic equipment to be measured
Discrete input signal.
The embodiment of the present invention also provides a kind of test system of discrete input/output signal, as shown in Fig. 2 southern
Bridge HM65 by the I2C controller Jing I2C buses that carry respectively with control chip A, I/O chip B, control
Coremaking piece C and I/O chip D connects;Wherein, control chip A and control chip C can adopt FPGA
Or single-chip microcomputer (MCU) is realizing, I/O chip B and I/O chip D can using PCA9555 chips come
Realize;
The input of the optocoupler is using the discrete output signal of electronic equipment to be measured as discrete input signal, institute
State the output end of optocoupler to be connected with the input (D0~D15) of transparent D flip-flop;The transparent D types
The output end (Q0~Q15) of trigger is connected with the input of I/O chip B, Enable Pin (/OE and/LE)
It is connected with the output end of control chip A;
The output end of control chip C is connected with the Enable Pin (/OE and/LE) of edging trigger D flip-flop,
The output end of I/O chip D is connected with the input (D0~D15) of the edging trigger D flip-flop, institute
The output end (Q0~Q15) for stating edging trigger D flip-flop is connected with the input of Darlington transistor, described
The output end output discrete output signal of Darlington transistor, as the discrete input signal of electronic equipment to be measured.
Wherein, south bridge HM65 is connected to the I2C equipment in the bus by I2C bus marcos and configuration,
The register for configuring is needed in the I2C controllers of south bridge HM65 comprising status register STS, control deposit
Device CNT, command register CMD, address register SLVA and data register D0.
I/O chip B and I/O chip D receives the control command of the I2C controllers from south bridge HM65, should
I/O chip has two port port 0 and port 1, and each port includes 8 tunnel input and output.The He of command word 0
1 represents the input register for accessing port 0 and port 1;Command word 2 and 3 is represented and accesses port 0 and port 1
Output register;Command word 4 and 5 represents the polarity register for accessing port 0 and port 1;Command word 6
The configuration register for accessing port 0 and port 1 is represented with 7, configuration register is arranged to into 1 expression will correspondence
Pin is arranged to input pattern, configuration register is arranged to into 0 expression correspondence pin is arranged to into output mode.
Discrete input signal shown in the output signal namely Fig. 2 of electronic equipment to be measured, usually high voltage
Working range, high-tension discrete input signal after optocoupler, using the output signal of optocoupler as transparent D
The input signal of D-flip flop.Optocoupler has not only acted as the effect of isolation, while also by high voltage operation scope
Low voltage operating scope is transitioned into, vehicle-mounted, airborne, Shipborne Electronic Equipment is set and have protective effect, prevented
The punch through damage of electronic equipment.
Vehicle-mounted, airborne, Shipborne Electronic Equipment input signal passes through from the output signal shown in Fig. 2
These signals, electronic equipment to be measured can obtain the status information of vehicle-mounted, airborne Shipborne Electronic Equipment simulation
Or receive from vehicle-mounted, airborne, Shipborne Electronic Equipment simulation control information.
As shown in Fig. 2 I/O chip B is arranged to input pattern, it receives and carrys out the defeated of self-induced transparency D flip-flop
Go out the output signal at end (Q0~Q15), and transparent D flip-flop is inputted end signal (D0~D15)
Correctly latch and be transferred to the process of output end (Q0~Q15) need at it/OE and during effective/LE signals
Triggering, and control chip A is exactly to meet the SECO to transparent D flip-flop/OE and/LE signals.
The embodiment of the present invention also provides a kind of method of testing of discrete input signal, and Fig. 3 show of the invention real
The process flow figure of discrete input signal in the method for testing of the discrete input signal that example offer is provided.Such as Fig. 3
It is shown, the test system of the discrete input/output signal with reference to shown in Fig. 2, the place of the discrete input signal
Reason method comprises the steps:
S31, I/O chip B are with input pattern work;
Specifically, I/O chip B is arranged to by input pattern by the I2C controllers of south bridge HM65, while
Control chip A is modeled to an I2C equipment, the same life for receiving the I2C controllers from south bridge HM65
Order and control;
S32, the input of discrete input signal Jing optocouplers output to transparent D flip-flop;
Specifically, input (D0~D15) of the discrete input signal Jing optocouplers output to transparent D flip-flop;
S33, control chip A export low level signal;
Specifically, control chip A exports an effective low level signal;
S34, transparent D flip-flop /LE ,/OE signals be effective;
S35, I/O chip B gather the output end signal of transparent D flip-flop and export;
Specifically, the signal of the output end (Q0~Q15) of transparent D flip-flop will be locked by I/O chip B
Gather and export;
S36, the output end signal for obtaining I/O chip B;
Specifically, the Hes of input port port 0 that the I2C controllers of south bridge HM65 pass through access I/O chip B
Port 1 is obtained with current vehicle-mounted, airborne, Shipborne Electronic Equipment discrete input signal.
Fig. 4 show discrete output signal in the method for testing of discrete input signal provided in an embodiment of the present invention
Process flow figure.As shown in figure 4, the test system of the discrete input/output signal with reference to shown in Fig. 2
System, the processing method of the discrete output signal comprises the steps:
S41, I/O chip D are with output mode work;
Specifically, when needing to send discrete output signal to electronic equipment to be measured, by south bridge HM65's
I/O chip D is arranged to output mode by I2C controllers, while control chip C is modeled to an I2C equipment,
The same order and control for receiving the I2C controllers from south bridge HM65;
S42, control chip C output low level signal enable edging trigger D flip-flop /OE signals;
Specifically, edging trigger D flip-flop /OE signals be Low level effective, and CLK signal be side
It is effective along triggering rising edge;
S43, control signal export the input to I/O chip D and export to edging trigger D flip-flop
Input;
Specifically, control chip C outputs are connected by edging trigger D by the I2C controllers of south bridge HM65
D-flip flop /OE signals be constantly in low level, i.e. edging trigger D flip-flop /OE signals always
In effective status;
S44, control chip C output rising edge signal enable edging trigger D flip-flop /CLK signal;
Specifically, the output end pin of I/O chip D is arranged to by institute by the I2C controllers of south bridge HM65
The low and high level control signal for needing, exports and gives the input of edging trigger D flip-flop (D0~D15);Together
When control chip C export an edge rising edge signal be given to edging trigger D flip-flop /CLK signal;
S45, edging trigger D flip-flop collection input end signal are simultaneously exported to Darlington transistor;
Specifically, edging trigger D flip-flop is made to gather input (D0~D15) signal, output is arrived defeated
Go out end (Q0~Q15), and export to Darlington transistor;
S46, Jing Darlington transistor improve driving force after discrete output signal is exported;
Specifically, discrete output signal is exported after Darlington transistor improves driving force, is sent to electricity to be measured
Sub- equipment, as the discrete input signal of electronic equipment to be measured.
Fig. 5 show the test interface of the test system of discrete input/output signal provided in an embodiment of the present invention.
Wherein, the top two-way is the discrete output signal for receiving electronic equipment to be measured as the discrete input and output
The discrete input signal of the test system of signal, bottom two-way is by the survey of the discrete input/output signal
The output signal of test system is exported to electronic equipment to be measured and as its discrete input signal.On test interface
Level marks show the level state of currently received discrete input/output signal interface.
The test system and method for testing of discrete input/output signal provided in an embodiment of the present invention, will can treat
The input signal of the discrete output signal as discrete input signal processing module of electronic equipment is surveyed, will be discrete defeated
The output signal for going out signal processing module is sent to electronic equipment to be measured and as the input letter of electronic equipment to be measured
Number, by these signals, electronic equipment to be measured can obtain vehicle-mounted, airborne, Shipborne Electronic Equipment simulation
Status information is received from vehicle-mounted, airborne, Shipborne Electronic Equipment simulation control information, such that it is able to
Simulate vehicle-mounted, airborne, on-board equipment device under test to be tested.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited to
This, any those familiar with the art the invention discloses technical scope in, can readily occur in
Change or replacement, all should be included within the scope of the present invention.Therefore, protection scope of the present invention
Should be defined by scope of the claims.