Embodiment
The present invention is directed in the process of existing test electronic product serial ports and need utilize PC; Cause testing cost high; The defective that testing efficiency is underground provides a kind of frock to be used for substituting PC the electronic product serial ports has been tested, and this technical scheme both can effectively improve testing efficiency; Effectively reduce the frequency of PC hot plug and the danger that the PC serial ports is burnt out simultaneously, tester's quality is not produced dependence.
The implementation procedure that will combine the detailed embodiment of the invention of accompanying drawing below.
Referring to Fig. 1, be the structural representation of the embodiment one of a kind of frock of testing the electronic product serial ports provided by the invention.
A kind of frock of testing the electronic product serial ports that the embodiment of the invention provides comprises: main control module 1, serial port module 2, interface module 3, memory module 4;
Said main control module 1 scans through 2 pairs of said interface modules 3 of said serial port module, to discern the pattern of said frock;
Recognizing said frock when being prepattern, said interface module 3 is connected with PC, and the said memory module 4 of said main control module 1 indication marks off address space, is used to receive said PC and writes the detecting information that is used to test the electronic product serial ports;
Recognizing said frock when being test pattern, said interface module 3 is broken off with said PC, and said main control module 1 utilizes said detecting information that the electronic product serial ports is tested, and test result data is stored in the said memory module 4;
Recognizing said frock when being the data query pattern, said interface module 3 is connected with said PC, and said main control module 1 sends to said PC with the test result data of storage in the said memory module 4.
In concrete the realization, said interface module 3 also comprises PC interface 30 (COM1), bar code scan interface 31 (COM2) and at least one product interface to be measured; Product interface 32 to be measured (COM3) as shown in the figure and product interface 33 to be measured (COM4); Said serial port module 2 is through said PC interface 30 is scanned with bar code scan interface 31, to discern the pattern of said frock.When serial port module 2 scans when on the said PC interface 30 exchanges data being arranged, the identification frock is in prepattern or data query pattern, and said frock communicates with the PC that is connected on this PC interface 30.Serial port module 2 scans when on the said bar code scan interface 31 exchanges data being arranged; The identification frock is in test pattern; Frock is broken off with the PC that is connected on this PC interface 30, so that the electronic product that is connected on product interface 32 to be measured or the product interface 33 to be measured is tested.
Optional, the frock that provides in the embodiment of the invention can also comprise display module 5 and alarm module 6.
Said display module 5 is connected with main control module 1, when 1 pair of electronic product serial ports test of said main control module, shows the model and the test result of electronic product;
Said alarm module 6 is connected with main control module 1, and when the test of 1 pair of electronic product serial ports of said main control module was accomplished, it was normal or unusual to send alerting signal indication test result.Can serve as unusual for example, show that green indication test result is normal with pilot lamp exhibit red indication test result; Perhaps ring with hummer and indicate for one test result normal, hummer hurriedly rings many, and the indication test result is unusual; Perhaps normal with the bright indication test result of pilot lamp, send rapid chimes of doom with hummer and represent that test result is unusual.
The frock that the embodiment of the invention provides, because each module is integrated realization, than testing with PC; Its volume is littler, and taking up room is convenient for carrying for a short time, and because before the test electronic product, just download to detecting information the memory module of frock from PC; Therefore in test process, need not be connected, reduce the probability and the time that are connected with PC with PC; Effectively avoided in test process the damage that the PC serial ports is caused because of hot plug or sudden power.
Referring to Fig. 2, be the structural representation of the embodiment two of a kind of frock of testing the electronic product serial ports provided by the invention.
In the present embodiment, mainly describe the concrete composition 26S Proteasome Structure and Function of the main control module 1 of frock, comprising:
Bar code reading unit 10 is used for when said frock is in test pattern, reads in the bar code information on the bar code scan interface of interface module;
Bar code comparing unit 11 is used for bar code information that bar code reading unit 10 is read and the bar code information that is stored in memory module and compares;
Allocation of space unit 12, when said bar code comparing unit 11 bar code information relatively was inconsistent, the indication memory module was the corresponding electronic product serial ports memory allocated to be measured space of this bar code information;
Test processes unit 13; After storage space is distributed in said allocation of space unit 12; Perhaps bar code comparing unit 11 is judged when bar code information is consistent, the corresponding electronic product serial ports to be measured of bar code information that reads is tested, and test result data is stored in the corresponding memory space.
Said test processes unit 13 specifically comprises:
Information receiving unit 130 is used to receive " the ready information " of electronic product to be measured;
Instruction fetch unit 131 is used for said " ready information " and " the ready information " that originally was stored in memory module are compared, and obtains the entry address, from memory module, obtains test instruction and corresponding answer signal according to this entry address;
Instruction sending unit 132 is used for the to be measured product of the test instruction of instructing acquisition module to get access to through interface module sent to electronic product serial ports to be measured;
Reply receiving element 133, be used to receive the answer signal that the electronic product serial ports returns said test instruction;
Test processes unit 134; Be used for and will compare from electronic product serial ports answer signal that returns and the answer signal that obtains from the memory module of frock, if consistent, then the test result of said electronic product is normal; If inconsistent, then the test result of said electronic product is unusual; Test processes unit 134 will write the storage space that memory module is distributed to the corresponding test result data of the test result of electronic product.
Present embodiment has specifically disclosed the function and the structure of the main control module of frock; This main control module is the core component of frock, and it possesses the function that control serial port module docking port module scans, and each module of control frock is tested electronic product; And test result handled; Therefore whole test process does not need the participation of PC, has effectively avoided in test process the damage that the PC serial ports is caused because of hot plug or sudden power.
Among the following embodiment, with describing a kind of frock circuit structure of testing the electronic product serial ports provided by the invention in detail.
At first, the integrated circuit structure of a kind of frock of testing the electronic product serial ports provided by the invention is as shown in Figure 3.Describing the physical circuit of each functional module of frock below respectively realizes.
Referring to Fig. 4, be the electrical block diagram of the main control module of frock provided by the invention.
Main control module in the present embodiment is used to control the serial port module; And carry out serial communication outward with PC or electronic product that interface module is connected; And test result data handled; Memory module is carried out read-write operation, and the control display module outputs test result or outputs test result and shows to PC.
Main control module shown in Figure 4 adopts single chip computer AT 89C51 (U1) as main control chip, and its pin 10, pin 11 are used for communicating with product to be measured, barcode scanner, PC serial ports; Pin 16, pin 17 are used for memory module is carried out read-write operation; Pin 21 ~ 24 is used for logarithmic code pipe D1 and carries out dynamic scan; 34,35 pins are respectively applied for the control of hummer (U4) or display lamp D2; Pin 36 and pin 37 are used to switch the analog channel of 4052 (U3); Pin 38 is used to display module with pin 39 data and clock signal is provided.C1 and R3 are the reset circuit of single chip computer AT 89C51 (U1); C2, C3, Y1 are the oscillatory circuit of single-chip microcomputer; C4, C5 are electric source filter circuit; PR1 is a pull-up resistor.
Need to prove; Main control module not only can adopt single-chip microcomputer to realize; Can also adopt for example DSP (digital signal processor of microcontroller; Digital signal processor), ARM (Advance RISC Machine), PLC (Programmable Logic Controller, Programmable Controller) wait and realize.
Referring to Fig. 5, be the electrical block diagram of the memory module of frock provided by the invention.
The memory module that present embodiment provides is mainly used in storage electronic product detecting information to be measured and test result, and by 24C64 (U2), pull-up resistor R1, pull-up resistor R2 form.
Referring to Fig. 6, be the electrical block diagram of the serial port module of frock provided by the invention.
The serial port module that present embodiment provides is used to switch frock serial ports passage, through the pin 9 of 4052 (U3) and 4 serial ports passages of pin 10 control interface modules.
Need to prove that the serial port module can also use replacements 4052 (U3) such as which analog channel IC, relay to realize that the RS1 among the figure, RS2 are interface module, figure is referring to Fig. 7 for its particular circuit configurations.
The interface module circuit of frock provided by the invention shown in Figure 7 is mainly used in TTL (transistor-transistor logic) level and EIA (Electronic Industries Association; Electronic Industries Association) level conversion is accomplished by MAX232 (Cs4).Need to prove that the Transistor-Transistor Logic level signal is different fully with the standard of EIA level, therefore need carry out level conversion.(transient voltage suppresses diode to TVS; Transient Voltage Suppressor) D1, D2, D3 and D4, D5, D6 effect are that docking port provides ESD (Electro-Static discharge; Static discharges) protection; Js1, Js2 are the DB9 interface, are used for and the docking of PC and electronic product serial ports to be measured, barcode scanner.
Referring to Fig. 8, be the electrical block diagram of the display module of frock provided by the invention.
This display module is used to show the type code that electronic product to be measured is corresponding, and information such as test result.74LS164 among the figure (U5) is used for converting serial data into parallel data; R8, R9, Q1, R10, R11, RQ2, R12, R13, Q3, R14, R15, Q4 are used to drive charactron, and exclusion PR2 is used for current limliting, and charactron D1 is used for digital the demonstration.
Referring to Fig. 9, be the electrical block diagram of the alarm module of frock provided by the invention.
This alarm module is used for test result is pointed out or reported to the police.Resistance (R5, R6, R7) is the driving of hummer (U4) with triode Q5, and resistance R 4 is the current-limiting resistance of pilot lamp D2.When this alarm module was accomplished in test, it was normal or unusual to send alerting signal indication test result.Can serve as unusual for example, show that green indication test result is normal with pilot lamp exhibit red indication test result; Perhaps ring with hummer and indicate for one test result normal, hummer hurriedly rings many, and the indication test result is unusual; Perhaps normal with the bright indication test result of pilot lamp, send rapid chimes of doom with hummer and represent that test result is unusual.
Referring to Figure 10, be a kind of schematic flow sheet of testing the method embodiment one of electronic product serial ports provided by the invention.
Need to prove that the method for the test electronic product serial ports that the embodiment of the invention provides is realized by the disclosed frock of previous embodiment, may further comprise the steps:
Step 100 scans the interface that is connected between frock and the electronic product to be measured, discerns the pattern of said frock;
Step 101 recognizing said frock when being prepattern, is controlled said frock and is connected with PC, and mark off address space, receives the detecting information that is used to test the electronic product serial ports that said PC writes to said address space;
Step 102 is recognizing said frock when being test pattern, controls said frock and said PC and breaks off, and utilizes said detecting information that the electronic product serial ports is tested, and stores said test result data;
Step 103 recognizing said frock when being the data query pattern, is controlled said frock and is connected with said PC, and the test result of said storage is sent to said PC.
When the electronic product serial ports was tested, this frock can also show the model and the test result of electronic product;
When the test of electronic product serial ports was accomplished, this frock can also be sent alerting signal indication test result.Can serve as unusual for example, show that green indication test result is normal with pilot lamp exhibit red indication test result; Perhaps ring with hummer and indicate for one test result normal, hummer hurriedly rings many, and the indication test result is unusual; Perhaps normal with the bright indication test result of pilot lamp, send rapid chimes of doom with hummer and represent that test result is unusual.
Below will describe the method flow that utilizes frock provided by the invention to test in detail.
At first, the main control module of frock passes through 4 serial ports of the continuous scan interface module of serial port module,
When on the PC interface (being COM1) in scanning the interface that is connected between said frock and the electronic product to be measured exchanges data being arranged; The serial port module stops the scan interface module; Analog channel is fixed on the COM1 position; This moment, frock was in prepattern or data query pattern, controlled said frock and communicated with the PC that is connected on this PC interface.Need to prove that frock is through the instruction of identification PC interface COM1, distinguishing present mode is prepattern or data query pattern.Prepattern was a frock before test electronic product serial ports to be measured, and the detecting information with all electronic product serial ports to be measured sends to frock in advance; The data query pattern is to check the test result of surveying the electronic product serial ports.If prepattern, PC then presets detecting information to main control module, and main control module then distributes address space in memory module, and detecting information is write in the memory module addresses distributed space.These detecting informations comprise: " the ready signal " of " model code " of product to be measured, product to be measured, and to " answer signal " of " test instruction " of product to be measured, product to be measured.
If the data query pattern, then PC then sends the data query request to main control module, and main control module then reads the test result data of memory module, and test result data is sent to PC.This test result data comprises: the model of product to be measured, bar code information, quality state (normal or unusual).
Main control module is through 4 serial ports of the continuous scan interface module of serial port module; When the bar code scan interface (COM2) that detects interface module when exchanges data is arranged; The serial port module stops to scan PC interface COM1; Single step is switched at COM2 and product interface COM3 to be measured (perhaps COM4), and the pattern of this moment is a test pattern, and frock is broken off with the PC that is connected on this PC interface.
In the time of below will describing frock in detail and be in test pattern, the method flow that the electronic product serial ports is tested.Shown in figure 11, the method flow that present embodiment provides comprises:
Step 200, main control module read the bar code information on the said bar code scan interface;
Step 201 compares the bar code information of the bar code information that reads and said frock storage; If bar code information is inconsistent, show that then this electronic product serial ports is for the first time to be tested, need then change step 202 over to for its memory allocated space; If consistent, prove that the detecting information of the electronic product serial ports to be measured that this bar code information is corresponding has been kept in the memory module, this electronic product serial ports to be measured needs test again, need not redistribute new storage space, directly changes step 203 over to;
Step 202 when inconsistent as if bar code information, is the corresponding electronic product serial ports memory allocated to be measured space of this bar code information.
Step 203 receives " the ready information " of electronic product to be measured;
Step 204 compares said " ready information " and " the ready information " that originally was stored in the frock, obtains the entry address, from the detecting information of frock storage, obtains test instruction and corresponding answer signal according to this entry address;
Step 205 is sent the test instruction that gets access to electronic product serial ports to be measured;
Step 206 receives the answer signal to said test instruction that the electronic product serial ports returns;
Step 207; To compare from electronic product serial ports answer signal that returns and the answer signal that from the detecting information of frock storage, obtains, if consistent, then the test result of said electronic product is normal; If inconsistent, then the test result of said electronic product is unusual;
Step 208 will write the storage space that memory module is distributed to the corresponding test result data of the test result of electronic product.
At last, if test is unusual, the hummer of frock sends rapid " tick and drip " chimes of doom; If test is normal, the hummer of frock is sounding not, and pilot lamp is bright.
The embodiment of the invention provides the method with frock test electronic product serial ports, because this frock integrates realization with each module, than testing with PC; Its volume is littler; Taking up room is convenient for carrying for a short time, and because before the test electronic product, just detecting information is downloaded to from PC the memory module of frock, therefore in test process; Need not be connected with PC; Reduced the probability and the time that are connected with PC, effectively avoided in test process, the damage that the PC serial ports is caused because of hot plug or sudden power.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Be to instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
The above is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also are regarded as protection scope of the present invention.