Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of soft signal testing terminal row with LED instruction and button triggering signal message playback is provided.
The object of the present invention is achieved like this: a kind of soft signal testing terminal arranging device, serial port chip is turned by the USB be connected with host computer by USB cable and USB interface, the single-chip microcomputer be connected with this chip forms, it is characterized in that single-chip microcomputer is also connected with at least two and the soft signal LED of arrangement shows and message reproduction process circuit in terminal board form matrix, this circuit is by current-limiting resistance, LED, button biswitch connects and composes, its connected mode is: the interruption pin of single-chip microcomputer is connected with 1 pin of button biswitch, current-limiting resistance connects power supply, lower even LED, button biswitch 2 pin is connected under LED, 2 pin of button biswitch are connected with the I/O pin of single-chip microcomputer, 1 pin of button biswitch is directly connected with 3 pin, 4 pin of button biswitch are connected with earth terminal, host computer passes rs 232 serial interface signal instruction according to the message received under single-chip microcomputer, drive corresponding soft signal LED to show by the I/O mouth of single-chip microcomputer to glimmer with the LED in message reproduction process circuit, when needs repeat signal test, host computer sends test mode instruction to this soft signal testing terminal arranging device, single-chip microcomputer extinguishes all LED, operating personnel press needs the soft signal LED of test to show and the button biswitch in message reproduction process circuit, interrupt requests is produced to described single-chip microcomputer, the response of described single-chip microcomputer interrupt and the state scanning each I/O mouth to determine the object of reproducing signal message, send signal message to host computer and reappear instruction, host computer sends the reproduction message of corresponding signal to opposite end test side according to signal message reproduction instruction.
The rs 232 serial interface signal instruction that the present invention can pass down according to host computer (as intelligent electronic device, notebook computer etc.), drives corresponding LED to glimmer by the I/O mouth of single-chip microcomputer.When carrying out reverse reproducing signal message, first send test mode instruction by host computer to the utility model device, single-chip microcomputer in apparatus of the present invention extinguishes all LED, both each I/O mouth exported high level, interrupt requests will be produced to described single-chip microcomputer when button biswitch is pressed, first described single-chip microcomputer response scans the state of each I/O mouth to determine the object of reproducing signal message when interrupting, send the instruction of this signal message reproduction afterwards to host computer, host computer sends the message of this home position signal test to receiving terminal according to this instruction.
The invention provides one to be suitable for using in soft signal debugging, there is the device of signal LED light and signal message reproduction capability, the visual boundary effect of secondary cable terminal board in debugging can be played, its volume ratio secondary cable terminal board less and can by many devices share use, fail safe is higher, can be used as a part for site intelligent electronic equipment (IED) device, also can be driven by test computer, structure is simple, and reliable operation is low in energy consumption.
Embodiment
Below in conjunction with accompanying drawing 1,2, the invention will be further described:
As shown in Figure 1, 2: it is 28 pins that USB turns serial port chip IC1, the present embodiment uses TXD pin (the 1st pin), VCCIO pin (the 4th pin), RXD pin (the 5th pin), GND pin (the 7th pin, the 18th pin), USBDP pin (the 15th pin), USBDM pin (the 16th pin), 3V3OUT pin (the 17th pin), CBUS1 pin (the 22nd pin), CBUS0 pin (the 23rd pin), AGND pin (the 25th pin), VCC pin (the 20th pin), TEST pin (the 26th pin) totally 13 pin wherein, and other pin is unsettled.
Single-chip microcomputer IC2 is 40 pins, P1.0(the 1st pin used wherein of the present embodiment), P1.1(the 2nd pin), P1.2(the 3rd pin), P1.3(the 4th pin), P1.4(the 5th pin), P1.5(the 6th pin), P1.6(the 7th pin), P1.7(the 8th pin), P4.7(the 9th pin), RXD(the 10th pin), TXD(the 11st pin), INT0(the 12nd pin), P3.4(the 14th pin), P3.5(the 15th pin), P3.6(the 16th pin), P3.7(the 17th pin), Gnd(the 20th pin), P2.0(the 21st pin), P2.1(the 22nd pin), P2.2(the 23rd pin), P2.3(the 24th pin), P2.4(the 25th pin), P2.5(the 26th pin), P2.6(the 27th pin), P2.7(the 28th pin), P4.4(the 29th pin), P4.5(the 30th pin), P4.6(the 31st pin), P0.7(the 32nd pin), P0.6(the 33rd pin), P0.5(the 34th pin), P0.4(the 35th pin), P0.3(the 36th pin), P0.2(the 37th pin), P0.1(the 38th pin), P0.0(the 39th pin), VCC(the 40th pin) amount to 37 pin, other pin is unsettled.
USB interface JP1 is 4 end pin, and its 1 pin is connected with+5V power supply VCC tie point, and 4 pin are connected with earth terminal tie point, and the USBDM pin that 2 pin and USB turn serial port chip is connected, and the USBDP pin that 3 pin and USB turn serial port chip is connected.1 pin is connected with 4 foot meridian capacitor C1, filters for power supply clutter.
The RXD pin of TXD pin and single-chip microcomputer IC2 that USB turns serial port chip IC1 is connected, and the TXD pin of RXD pin and single-chip microcomputer IC2 that USB turns serial port chip IC1 is connected, for carrying out the transmission of serial data; USB turns GND, AGND pin ground connection of serial port chip IC1, for core on-chip circuit provides shielding and reference potential; USB turns the TEST pin ground connection of serial port chip IC1, is in normal operating conditions after chip is powered on.
The USBDM pin that USB turns serial port chip IC1 and USBDP pin are connected, for carrying out transfer of data with host computer IP1 with 2 pin of USB interface JP1 and 3 pin respectively.
USB turns the 3V3OUT pin of serial port chip IC1 by electric capacity C4 ground connection, filters for power supply clutter.
1 pin of VCC pin and USB interface JP1 that USB turns serial port chip IC1 is connected, for circuit of the present invention provides working power.
The VCC pin that USB turns serial port chip IC1 is connected to ground by polar capacitor C2, C3, and polar capacitor C2 is in parallel with electric capacity C3, filters and voltage stabilizing for power supply clutter.
The connection of CBUS0 pin LEDD34, D34 that USB turns serial port chip IC1 are connected with VCC pin by current-limiting resistance R34, and during transmission data, CBUS0 pin output low level, lights D34.
The connection of CBUS1 pin LEDD33, D33 that USB turns serial port chip IC1 are connected with VCC pin by current-limiting resistance R33, and during reception data, CBUS1 pin output low level, lights D33.
P0.0-P0.7 pin of single-chip microcomputer IC2 to show with the 1-the 8 soft signal LED respectively by YX1-YX8 tie point and is connected with message reproduction process circuit; P1.0-P1.7 pin to show with the 9-the 16 soft signal LED respectively by YX9-YX16 tie point and is connected with message reproduction process circuit; P2.0-P2.7 pin to show with the 17-the 24 soft signal LED respectively by YX17-YX24 tie point and is connected with message reproduction process circuit; P3.4-P3.7 pin to show with the 25-the 28 soft signal LED respectively by YX2-YX28 tie point and is connected with message reproduction process circuit; P4.4-P4.7 pin to show with the 29-the 32 soft signal LED respectively by YX29-YX32 tie point and is connected with message reproduction process circuit.Single-chip microcomputer INT0 pin is shown with 32 soft signal LED organized by tie point INT and is connected with 1 pin of the button biswitch of message reproduction process circuit, and Gnd pin is connected with earth terminal, and VCC pin is connected with+5V power connection points VCC.
The soft signal LED that the present embodiment provides shows and message reproduction process circuit 1-n has 32 groups, and in terminal board shaped formation, each group forms by 1 resistance, 1 LED and 1 button biswitch, and circuit structure is identical with function.As shown in Figure 2, for the 1st soft Signal aspects and message reproduction process circuit, resistance R1 connects+5V power supply VCC tie point, lower even LEDD1, connect 2 pin of button biswitch S1 under LEDD1,2 pin of button biswitch S1 are connected with the P0.0 pin of single-chip microcomputer IC2 by tie point YX1, and 1 pin of button biswitch S1 is directly connected with 3 pin, simultaneously 1 pin of button biswitch S1 interrupts pin by tie point INT with the INT0 of single-chip microcomputer IC2 and is connected, and 4 pin of button biswitch S1 are connected with earth terminal.
The course of work of the present invention is, host computer to set out the sequence number of a signal and the state (as: the 1st road home position signal) of changing according to the packet parsing received, instruction (as: hexadecimal serial ports message 0x01) is sent to the single-chip microcomputer in apparatus of the present invention by USB cable, single-chip microcomputer makes corresponding I/O mouth output low level (as: P0.0 port), thus drives the soft signal LED display of corresponding sequence number to glimmer (as: the 1st group) with the LED in message reproduction process circuit, when needs repeat signal test, host computer first sends test mode instruction to apparatus of the present invention, single-chip microcomputer in apparatus of the present invention makes all I/O mouths export high level, both all soft signal LED were extinguished, operating personnel press needs the soft signal LED of test to show and the button biswitch (as: S1 in the 1st group) in message reproduction process circuit, thus make the INT0 interrupt pin of single-chip microcomputer in apparatus of the present invention occur trailing edge thus produce interrupt requests, in apparatus of the present invention, namely single-chip microcomputer enters interrupt handling routine, first this program scans the level state of each I/O mouth to determine the sequence number (as: the test request of corresponding 1st signal of P0.0 port) of stimulus, in apparatus of the present invention, single-chip microcomputer turns serial port chip by USB and USB cable sends reproduction message request (as: the hexadecimal serial ports message 0x01 of corresponding signal to host computer, the request that corresponding 1st road signal message reappears), host computer sends the reproduction message (as: test message of the 1st road signal) of corresponding signal to opposite end test side by the sequence number of the reproduction message request received, and in message, arrange test mode to distinguish normal message, can prevent error signal like this.