Card compatibility automated test macro of a kind of SD of vehicle-mounted radio and tape player and method
Technical field
The present invention relates to the card compatibility automated test macro of a kind of SD, specifically be meant a kind of card compatibility automated test macro of SD of vehicle-mounted radio and tape player; The invention still further relates to a kind of SD card compatibility automated test method.
Background technology
At present; The SD card compatibility test of cassette car radio all is that manual work is accomplished, and in the manually-operated process, can only test a SD card at every turn; Promptly artificial with a SD card insertion cassette car radio; And judge according to the sound signal of cassette car radio output and signal in being stored in the SD card in advance be whether identical whether this SD card is compatible with cassette car radio, when the SD card of test different brands, different capabilities and cassette car radio compatible, need stick into to go to SD and repeatedly plug; Repeatedly intercut the SD card testing efficiency is reduced, and can't confirm the time for reading of SD card.
Summary of the invention
It is low and be not sure of the defective of the time for reading of SD card, the card compatibility automated test macro of SD and the method that the compatible of a plurality of SD cards of the fast automatic test of a kind of ability are provided and can test the vehicle-mounted radio and tape player of SD card time for reading to the objective of the invention is to overcome existing manually-operated efficient in the above-mentioned prior art.
The objective of the invention is to realize through following technical scheme: the card compatibility automated test macro of a kind of SD of vehicle-mounted radio and tape player, comprise control center, vehicle-mounted radio and tape player and SD card to be measured, also comprise:
A plurality of SD card connection to be measured to vehicle-mounted radio and tape player, and are switched the SD commutation circuit of the break-make of a plurality of SD cards to be measured and vehicle-mounted radio and tape player;
Be connected between control center and the said SD commutation circuit usb communication circuit of the change action that is used to receive the steering order of control center and control said SD commutation circuit;
Be connected between vehicle-mounted radio and tape player and the control center, be used for the sound signal of vehicle-mounted radio and tape player output is converted into the audio conversion circuit of control center's discernible signal;
Be connected with control center, be used for stealing voltage from control center, and to the USB mouth stealing circuit of said SD commutation circuit and audio conversion circuit power supply;
Particularly; Said usb communication circuit comprises control chip; A plurality of I/O mouths of control chip connect a plurality of biswitches of SD commutation circuit respectively, and control chip receives the control command that control center sends, and control the break-make of SD commutation circuit switch through the level of controlling a plurality of different pins;
Particularly, said SD commutation circuit is provided with a plurality of biswitches, and said biswitch is made up of two triodes and two three open type dry-reed relays (S1, S2); Two triode common bases, and base stage is connected with the pin of control chip, and collector all connects USB mouth stealing circuit is stolen voltage from control center output terminal; Emitter connects a dry-reed relay respectively; The corresponding SD interface of biswitch one end is used to connect a plurality of SD cards to be measured, and the other end is connected to vehicle-mounted radio and tape player;
Said biswitch adopts three open type dry-reed relays to accelerate the handoff procedure of SD card, reduces electric quantity consumption.
The input end of said audio conversion circuit is connected with the audio output of vehicle-mounted radio and tape player, and the output terminal of audio conversion circuit is connected with the microphone interface of control center.Said audio conversion circuit mainly is made up of an amplifier and signal acquisition module; Signal acquisition module mainly is made up of a plurality of sampling resistors; Signal acquisition module is connected said amplifier input terminal with the output terminal that USB mouth stealing circuit is stolen voltage, and the output terminal of amplifier is connected with the microphone interface of control center.
In order to realize another goal of the invention of the present invention, the SD card compatibility automated test method of a kind of vehicle-mounted radio and tape player provided by the invention is following:
(1), relevant parameters such as the number of SD card to be measured, compatible time limit and the time limit of reading are set in advance, in each SD card to be measured, storing a fixed frequency value in advance simultaneously is the audio file of mKHz in control center;
(2), set test count N since 1, N is a natural number;
(3), judge that test count N is whether greater than the number of SD mouth in the SD commutation circuit, if test count N greater than the number of preset SD card to be measured, then finishes test; Otherwise, carry out next step;
(4), judge when Pretesting SD card whether select to connect, if this SD card access failure, then test count N adds up 1, and repeating step (3) with vehicle-mounted radio and tape player; If select to connect when Pretesting SD card, then carry out next step;
(5), the test procedure transmitting control commands of control center, the usb communication circuit receives the steering order of control center, the corresponding switch closure of control SD commutation circuit is connected the corresponding SD card of switch, and is picked up counting;
(6), judge whether control center receives the signal of mKHz, if control center does not receive the signal of mKz, execution in step (7); If control center receives the signal of mKHz, then timing finishes execution in step (8);
(7), judge timing time whether greater than the compatible time limit, if be not more than the compatible time limit, repeating step (6) then, if greater than the compatible time limit, the result of output " incompatible " then, test count N adds up 1, and repeating step (3);
(8), judge that whether time for reading reads the time limit greater than what be provided with in advance, if time for reading is greater than reading the time limit, then exports the result and the time for reading of " NG "; Otherwise output " OK " result and time for reading, it is longer that Pretesting SD calorie requirement time for reading is worked as in said " NG " expression, compatible bad, and " OK " representes to need time for reading longer when the Pretesting USB flash disk, and be well compatible;
(9), after control center outputs test result, test count N adds up 1, and repeating step (3).
In the said method, the audio file that the said fixed frequency value of step (1) is mKHz is preferably the MP3 audio file of 1KHz.
The present invention compares that prior art has the following advantages and beneficial effect:
1, the present invention utilizes the programmed control test process, can accomplish that automatic test is compatible and read the time for reading of SD card, saves manpower.
2, the present invention can disposablely stick into line program control test to a plurality of SD, and testing efficiency is high, and can be according to actual conditions to 64 of system extension to disposable tests even 128 SD cards.
3, the switch of SD commutation circuit uses dry-reed relay, has accelerated handoff procedure, and power voltage supply and the test of using the stealing circuit to steal from PC, need not additional power supply, is easy to carry.
4, circuit component is cheap, and cost performance is high.
Description of drawings
Fig. 1 is the card compatibility automated test system hardware structural drawing of SD of a kind of vehicle-mounted radio and tape player of the present invention;
Fig. 2 is the schematic diagram of usb communication circuit;
Fig. 3 is the schematic diagram of SD commutation circuit;
Fig. 4 is the schematic diagram of audio conversion circuit;
Fig. 5 is a test flow chart.
Embodiment
Below in conjunction with embodiment and accompanying drawing the present invention is described in further detail, but embodiment of the present invention is not limited thereto.
Embodiment
As shown in Figure 1, the card compatibility automated test macro of a kind of SD of vehicle-mounted radio and tape player comprises control center, vehicle-mounted radio and tape player and SD card to be measured, and control center is a PC in this embodiment, and native system also comprises:
A plurality of SD card connection to be measured to vehicle-mounted radio and tape player, and are switched the SD commutation circuit of the break-make of a plurality of SD cards to be measured and vehicle-mounted radio and tape player;
Be connected between PC and the said SD commutation circuit usb communication circuit of the change action that is used to receive the steering order of PC and control said SD commutation circuit;
Be connected between vehicle-mounted radio and tape player and the PC, be used for the sound signal of vehicle-mounted radio and tape player output is converted into the audio conversion circuit of PC discernible signal;
Be connected with PC, be used for stealing voltage from PC, and to the USB mouth stealing circuit of said SD commutation circuit and audio conversion circuit power supply;
As shown in Figure 2; Said usb communication circuit comprises the MW2332 chip; 32 I/O mouths of MW2332 chip (P00~P37 pin) connect 32 switches of SD commutation circuit respectively; The usb communication circuit also is connected with PC through USB A, and the MW2332 chip receives the control signal that PC sends, and controls the break-make that P00~P37 pin sends the height control SD commutation circuit switch of level respectively;
As shown in Figure 3, said SD commutation circuit is provided with 32 SD interface and SD interfaces that are used to connect vehicle-mounted radio and tape player of being used to connect SD card to be measured.Simultaneously, said SD commutation circuit is provided with a plurality of biswitches, and said biswitch is made up of two triodes and two three open type dry-reed relays (S1, S2).Above-mentioned usb communication circuit control chip is the MW2332 chip.32 pin (P00~P37) be connected of two triode common bases and base stage and MW2332 chip; Collector all connects the 5V voltage output end that USB mouth stealing circuit is stolen from PC; Emitter connects a dry-reed relay respectively; The corresponding SD interface of biswitch one end (SD1~SD32), be used to connect a plurality of SD cards to be measured, the other end is connected to vehicle-mounted radio and tape player;
Said SD commutation circuit is carried out change action; Control the connecting and disconnecting of every road SD card to be measured and vehicle-mounted radio and tape player respectively through the break-make of 32 biswitches, when the MW2332 pin of chip is high level in the usb communication circuit, with the conductings simultaneously of two triodes; Behind the coil electricity of dry-reed relay; Dried reed attracts each other, thus the closed circuit of connecting of biswitch, and this moment, SD and vehicle-mounted radio and tape player were connected; When pin sent low level, two triodes ended simultaneously, and dried reed separates behind the coil blackout of dry-reed relay, and biswitch breaks off circuitry cuts, and the disconnection of SD card is connected with vehicle-mounted radio and tape player.
Change-over switch adopts the dry-reed relay matrix, has accelerated the handoff procedure of SD card, has reduced electric quantity consumption, and uses PC power supply and test through SD mouth stealing circuit, need not additional power supply, makes that test is convenient.
As shown in Figure 4, the input end of said audio conversion circuit is connected with the audio output of vehicle-mounted radio and tape player (SPEAKER+, SPEAKER-), and the output terminal of audio conversion circuit (OUT) is connected with the microphone interface of PC.Said audio conversion circuit mainly is made up of an amplifier UTC4558 and signal acquisition module 100; Signal acquisition module 100 mainly is made up of sampling resistor 220R, R302 and R304; Signal acquisition module 100 is connected the input end of amplifier UTC4558 with the 5V voltage output end that USB mouth stealing circuit is stolen, the output terminal of amplifier UTC4558 is connected with the microphone interface of PC.After sampling resistor 220R carries out the dividing potential drop sampling to the sound signal of vehicle-mounted radio and tape player output; With sampled signal input amplifier UTC4558; But sampled signal just converts the sound signal of PC security identification into after amplifier UTC4558 carries out processing and amplifying; And be input in the PC, the sound signal of input is judged through the test procedure of inside by PC, obtain the compatibility test result and the time for reading of USB flash disk.
The present invention can 32 different capabilities of disposable test, the compatibility of the SD card of different brands, and can according to actual needs system be expanded, but extended one-time test 64 or 128 SD cards.
The present invention also provides a kind of SD card compatibility automated test method of vehicle-mounted radio and tape player; Time for reading after SD card compatibility and the SD clamping of this method through adopting the various different brands of test procedure automatically testing, different capabilities gone into; As shown in Figure 5, its concrete steps are following:
Step S101; Number, compatible time limit, the time limit of reading of SD card to be measured being set in advance and in each USB flash disk to be measured, storing a fixed frequency value in advance is the audio file of mKHz; Said in the present embodiment fixed frequency value is the audio file of mKHz, is preferably the MP3 audio file of 1KHz;
Step S102 sets test count N since 1;
Step S103 judges test count N whether greater than the number of SD mouth in the SD commutation circuit, and the SD commutation circuit is not expanded in the present embodiment, so the SD commutation circuit has 32 SD mouths, if test count N is greater than 32, then execution in step S110 promptly finishes test; Otherwise, execution in step S104;
Step S104 judges and works as whether Pretesting SD card is selected and vehicle-mounted radio and tape player is connected, if as Pretesting SD card and vehicle-mounted radio and tape player access failure, then execution in step S109; If this SD card is selected to connect, then execution in step S105;
Step S105, the test procedure transmitting control commands of PC, the usb communication circuit receives instruction, and the corresponding switch closure of control SD commutation circuit is connected the corresponding SD card of switch, and is picked up counting;
Step S106 judges whether PC receives the signal of 1KHz, has stored the MP3 audio file that has the 1KHz signal in the SD card to be measured in advance; When connecting switch, if SD card and radio and tape player are compatible, then radio and tape player begins to read the audio file in the SD card; And the 1KHz signal of the loudspeaker output audio file through radio and tape player; Power through audio conversion circuit transforms the microphone that is input to PC, and PC receives the then timing end of 1KHz signal of audio file, execution in step S108; If SD card and radio and tape player are incompatible, radio and tape player can't read the audio file in the SD card, and PC can't receive the 1KHz signal of audio file, then execution in step S107;
Whether step S107 judges timing time greater than the compatibility time limit, if be not more than the compatible time limit, then if repeating step S106 greater than the compatible time limit, then exports the result of " incompatible ", execution in step S109;
Step S108 judges that whether time for reading reads the time limit greater than what be provided with in advance, if time for reading is greater than reading the time limit, then exports the result and the time for reading of " NG "; Otherwise output " OK " result and time for reading;
Step S109, test count N adds up 1, and repeating step S103.
Through this test procedure, realized the compatibility and the time for reading of automatic test SD card, saved manpower, effectively improved testing efficiency.
The foregoing description is a preferred implementation of the present invention; But embodiment of the present invention is not restricted to the described embodiments; Other any do not deviate from change, the modification done under spirit of the present invention and the principle, substitutes, combination, simplify; All should be the substitute mode of equivalence, be included within protection scope of the present invention.