Summary of the invention
The objective of the invention is to disclose a kind of linear sweep device and method that can wireless receiving and dispatching, this device reads picture and text or bar code information by linear sweep, and can in time send by wireless communication networks.
A kind of linear sweep device that can wireless receiving and dispatching of the present invention comprises: wireless communication apparatus also comprises the Line scanner that can line by line scan to picture and text or bar code and is connected link between described wireless communication apparatus and the Line scanner; Described link comprises the scanning starting device of opening scan function and reduces the power switch circuit that rating of set consumes; Described scanning starting device connects the universal input and output port GPIO1 of primary processor included in the described wireless communication apparatus; The Enable Pin EN of the serial peripheral equipment interface SPI of described primary processor connects the line sweep input signal end VIN of described Line scanner by power switch circuit; The synchronizing clock signals CLK of described serial peripheral equipment interface SPI directly connects the clock port CLK of described Line scanner; The line image sweep-initiating pulse SP that the described main general input/output interface GPIO2 that handles produces directly connects the line image sampling starting impulse signal input part of described Line scanner; The digitized line sweep output signal VOUT of Line scanner output directly connects described serial peripheral equipment interface SPI.
The present invention also comprises following technical characterictic, described Line scanner comprises the aanalogvoltage binarization circuit that the analog photoelectricity sensor output signal is converted to the line sweep output signal VOUT of binaryzation, and described aanalogvoltage binarization circuit comprises peak holding circuit, component voltage network and high-speed comparator; Imageing sensor output signal V imports peak holding circuit and high-speed comparator simultaneously, and the output of peak holding circuit is through component voltage network input high-speed comparator, and high-speed comparator output digital line scans output signal VOUT.Line scanner also can convert the analog photoelectricity sensor output signal to the A/D converter of the line sweep output signal VOUT of numeral.
The present invention also comprises following technical characterictic, and described link comprises that also frequency dividing circuit, counter, logic control circuit and output allow controller; The output signal of described scanning starting device is input power switch circuit and output permission controller respectively, and output allows controller output line scan input signal VIN to Line scanner; The master clock frequency MCLK input frequency dividing circuit of primary processor, frequency dividing circuit output two signal MC1 and MC2 also are connected respectively to counter and logic control circuit, the output of counter connects logic control circuit, the output of logic control circuit connects output and allows controller, and output allows the output of controller to import the INT port of primary processor and the line image sweep-initiating pulse SP port of Line scanner simultaneously.Scanning starting device is the manual button of input scan enabling signal, or contact can produce the contact induction sensor of scan start signal during scanned object.
The present invention also comprises following technical characterictic, and described Line scanner comprises circuit board, imageing sensor, light source, lens and glass; Described light source evenly illuminates the row that is scanned of scanned object, sees through glass from the reflected light of scanned object and enters lens, be imaged on the imageing sensor, the output signal of imageing sensor be read out on the circuit board and amplification and analog to digital conversion after export VOUT.
The present invention also comprises following technical characterictic, and described wireless communication apparatus, link and Line scanner are integrated in the shell; Perhaps be divided into the wireless communication apparatus that can independently use, the link and the Line scanner of encapsulation one, above-mentioned between the two by rigid connector, perhaps flexibly connect the line combination.Line scanner and described wireless communication apparatus also can make up along minor face along the combination of long limit.
The invention discloses a kind of linear sweep method that can wireless receiving and dispatching, comprise the steps: the first, utilize imageing sensor that picture and text or bar code are lined by line scan, and will scan the analog signal conversion that obtains and become digital signal; The second, described digital signal is adopted the dma mode buffer memory that writes direct, perhaps under the control of described primary processor, write buffer memory; The 3rd, the data in the buffer memory are arrived the terminal of user's appointment by antenna transmission; The 4th, repeating step first, second and the 3rd to the end of scan.
Linear sweep method that can wireless receiving and dispatching disclosed by the invention also comprises following feature, and above-mentioned steps third and fourth is: the 3rd, and repeating step first and second to the end of scan or buffer memory write full; The 4th, utilize the bar code decoding program that the data in the buffer memory are decoded, perhaps utilize optical character recognition programs that the data in the buffer memory are discerned; The 5th, the literal after showing decoded data or identification on the display unit confirms that the back is by the terminal of antenna transmission to user's appointment.
Linear sweep devices and methods therefor that can wireless receiving and dispatching of the present invention connects wireless communication apparatus and Line scanner by link, utilize Line scanner scanning to obtain picture and text or bar code information, after decoding or the identification, utilize wireless communication apparatus according to information wireless being received and dispatched as various existing communication agreements such as GSM, GPRS.Owing in coupling arrangement, use scanning starting device and power switch circuit, the present invention is under state under standby, dormancy and the non-scanning work, the power supply of described Line scanner can be turn-offed, realize its zero-power under off working state, and wireless communication apparatus operate as normal can be continued
Embodiment
Enforcement of the present invention, based on existing wireless communication technique and scanning technique, by custom-designed link with both combinations, thereby realize correctly reading apace information, and the purpose that in time sends, and realize simply compact conformation.
See also Fig. 1 and Fig. 2, Fig. 1 is the functional block diagram of the linear sweep device that the present invention can wireless receiving and dispatching, and Fig. 2 is the refinement functional block diagram of the linear sweep device that the present invention can wireless receiving and dispatching.Linear sweep device that can wireless receiving and dispatching of the present invention mainly is made up of wireless communication apparatus device 30, Line scanner 50 and link 40.Wherein, described wireless communication apparatus device 30 has a main control module 32, radio receiving transmitting module 33, antenna 34, interface 35, keyboard 36 and display unit 37.Described wireless communication apparatus device 30 can be according to carry out the information wireless transmitting-receiving as various existing communication agreements such as GSM, GPRS.
Fig. 3 be among the present invention link block theory diagram; As shown in Figure 3, there are a primary processor 31 and buffering storer 38 in described main control module 32 inside, described primary processor 31 can be controlled this device and carry out information wireless transmitting-receiving, demonstration and graph text information and read, and by described memory buffer 38 storage graph text informations, transmitting-receiving of described information wireless and Presentation Function can utilize and existingly realize as wireless communication techniques such as mobile phones.Described primary processor 31 also has two general input/output interface GPIO1 and GPIO2 and serial peripheral equipment interface SPI.Described link 40 comprises circuit connection, scanning starting device 41 and power switch circuit 42.Described scanning starting device 41 can be a button, also can be a scanned medium contact induction sensor.For example pin by strong the startup and scan, unclamp button end scanning; When perhaps using feeler, start when detecting the contact scanning medium, detect when leaving medium and finish.In mancarried device, need reduce the power consumption of power supply as far as possible, linear sweep device that can wireless receiving and dispatching of the present invention has three kinds of duties: online, standby and dormancy, under state under standby, dormancy and the non-scanning work, described power switch circuit 42 will turn-off the power supply of described Line scanner 50, realize its zero-power under off working state, and this moment, wireless communication apparatus 30 can continue operate as normal.
When scanning starting device 41 wakes Line scanner 50 up, promptly press described button, or after described sensor sensing touches scanned medium to described Line scanner 50, described scanning starting device 41 produces a signal, and pass to the general input/output interface GPIO1 place of described primary processor 31, described primary processor 31 with regard to calling graph as the scan process program, the enable line EN that puts serial peripheral equipment interface SPI is effective, to described Line scanner 50 conveyer line scan input signal VIN, thereby open the power supply of described Line scanner 50 and light its light source 53 (as shown in Figure 9).At this moment, described main 31 the timer (not shown) generation certain hour line image sweep-initiating pulse SP at interval that handles, general input/output interface GPIO2 by described primary processor 31 is sent to the line image sampling starting impulse signal input part of described Line scanner 50, and described Line scanner 50 is started working.The synchronizing clock signals CLK of serial peripheral equipment interface SPI can directly be connected with the clock signal input terminal mouth of described line sweep device 50, as line image sample-synchronous clock.
Fig. 4 is the theory diagram of major clock frequency division part among the present invention; When but described primary processor 31 does not have the vacant clock signal time spent, can adopt the major clock frequency division to add that the mode of Digital Logic control obtains line image sampling enabling signal SP, link 40 also comprises some necessary circuit and device except that having described scanning starting device 41 and power switch circuit 42 at this moment.As shown in Figure 4, when described scanning starting device 41 is worked, described power switch circuit 42 is open-minded, and startup output allows controller 46, described Line scanner 50 is in running order, the master clock frequency MCLK of primary processor 31 is by frequency dividing circuit 43 picked up signal MC1 and MC2, MC1 enters logic control circuit 45 through behind the counter 44, signal MC2 directly enters logic control circuit 45, handle through logic control circuit 45, obtain line image sweep-initiating pulse SP, described line image sweep-initiating pulse SP is except being connected to described Line scanner 50, also link to each other, thereby use interrupt routine to come line synchro image data samples process with the interruption input pin INT of described primary processor 31.
What Fig. 4 described is under the situation of processing module timer or GPIO mouth deficiency, utilizes the block diagram of major clock by outside generation SP signal, and this moment, the input of view data still needed to use the SPI interface.This block diagram has just been described the detection to SP of the generation of SP and processor, and the MC1 (being connected to the CLK end of line sweep device and SPI mouth) that produces of CLK signal.Frequency dividing circuit produces some synchronous clock MC1 and produces the SP pulse width clock MC2 that the line image sensor needs, MC1 process counter (control row sampling width) produces the SP signal frequency, and the processing of process logic control circuit produces has n doubly to the original SP signal of a synchronizing clock signals frequency and MC2 pulse width.Scanning starting device can when pushing button, be opened the line sweep power supply for the sweep start button, and output simultaneously is used to start the SP signal of line scanning work.
Line scanner 50 of the present invention has adopted the digital signal way of output, and Fig. 5 is the theory diagram of the present invention's output circuit part when adopting the digital signal way of output, is the aanalogvoltage binarization circuit in Line scanner 50 inside among the figure.As shown in Figure 5, the signal V of imageing sensor output handles through peak holding circuit 510, enter into component voltage network 511, obtain imageing sensor black level V1 and another magnitude of voltage V2, the signal V that described V2 enters high-speed comparator 612 and imageing sensor output compares, thereby obtains line sweep output signal VOUT.Adopted the dynamic thresholding scheme in this design, it can change the threshold values of regulating binaryzation automatically according to the transmitting optics feature of scanned medium and the light and shade of scan image, obtains black white image effect preferably.If in needs gray scale or chromoscan, the line sweep output signal is the analog level with image luminance information, can increase A/D analog to digital converter (not shown) in the circuit of interface with it.View data after the scanning can adopt the direct memory dma access mode described memory buffer 38 of writing direct, and also can write under the control of primary processor 31.
Among Fig. 5, the image peak holding circuit is used to keep producing the bright level (mxm.) of scanned medium reflection, and the black level of imageing sensor (minimum) can adopt voltage stabilizer to produce, because for the line image sensor of same model, black level is a fixing given reference voltage level.On behalf of this medium, mxm. and minimum produce the maximal value and the minimum value of image analoging signal GTG, threshold values when carrying out binary conversion treatment is exactly a value that occupy these 2 centres, this threshold values can be directly produces with the mode of electric resistance partial pressure, and promptly the component voltage network is linear ratio voltage divider.
Be the control line and the signal output timing diagram thereof of described Line scanner 50 as shown in Figure 6.This figure has indicated the sequential relationship between each signal of line image sensor.Wherein SP is that line scanning starts clock, CLK is that point sampling synchronous clock, VOUT are the view data output signal, the pulse distance of SP is the line-scanning period, Line scanner is received after the SP pulse, need n clk cycle to come the initialization sensing chip, when n+1 CLK clock, VOUT begins to export digital binary image, and CLK is the sample-synchronous clock of VOUT.After having transmitted the individual dot image data of m (Sao Miao length is different as required), VOUT finishes the data output of this journey, waits for next line scanning pulse.In the occasion of light source igniting not being controlled separately, the line-scanning period is exactly the capable exposure cycle of sensor.
Line scanner 50 of the present invention generally comprises circuit board 51, imageing sensor 52, light source 53, lens 54 and glass 55, and its appearance profile can be a rectangular parallelepiped, and general pattern sensor 52 is arranged along long limit of this rectangular parallelepiped, as shown in Figure 7.Light source 53 evenly illuminates the row that is scanned of scanned object, reflected light from scanned object enters lens 54 through glass 55, be imaged on the imageing sensor 52, the output signal of imageing sensor 52 is read out on circuit board 51 and amplification and analog to digital conversion and export VOUT.Linear sweep device that can wireless receiving and dispatching of the present invention, described Line scanner 50 reads graph text information line by line, and carry out digitized processing, to obtain digitized line sweep output signal VOUT, described line sweep output signal VOUT is directly connected in the data-in port DATA of described primary processor 31 serial peripheral equipment interface SPI, as shown in Figure 3.
It shown in Fig. 7,8,9 perspective view of linear sweep device that can wireless receiving and dispatching of the present invention.As shown in the figure, described wireless communication apparatus 30 and Line scanner 50 can be integrated in one, and structure is small and exquisite, and be only bigger than regular handset; Also can distinguish independence, by specific coupling arrangement combination.Linear sweep device that can wireless receiving and dispatching of the present invention is no matter be integrated or separate, and described Line scanner 50 can be installed in the long limit of described wireless communication apparatus 30, also can be installed in minor face.When described wireless transmitter 30 and Line scanner 50 is independent respectively, described coupling arrangement can be a kind of rigid connector 56, also can be a kind of line 57 that flexibly connects, the interface of described coupling arrangement can adopt interfaces such as RS232, USB, also can adopt non-standard interface.
The present invention can wireless receiving and dispatching linear sweep device institute scanned objects, can be bar code, also can be other graph-text content.After scanning was finished, view data can send to server host by network, in main frame, be correlated with decoding or identification, and then send.The present invention can wireless receiving and dispatching the linear sweep device also bar code decoding program or optical mask identification software OCR can innerly be installed, the bar code information that reads or other graph-text content decoded respectively or discern, and this machine of being stored in or transmission.Data decode, identification and the transmission that can obtain scanning when lining by line scan this moment, the identification of also can decoding again after scanning is all finished sends after display unit 37 is confirmed by the user again.
The present invention also provides a kind of linear sweep method that can wireless receiving and dispatching, it mainly comprises the steps: first, after receiving enabling signal, Line scanner 50 starts working, picture and text or bar code are lined by line scan, and the analog signal conversion that will scan acquisition becomes digital signal, its conversion regime can adopt the aanalogvoltage binarization circuit to handle the black and white sweep object, also can be that an A/D converter is to handle gray scale or chromoscan object; The second, described digital signal is adopted the dma mode described memory buffer 38 of writing direct, perhaps under the control of described primary processor 31, write; The 3rd, repeat above-mentioned first, second step to the end of scan or described memory buffer 38 and write full; The 4th, utilize the bar code decoding program that the data in the described buffer 38 are decoded, perhaps utilize optical character recognition programs to discern; The 5th, the literal after showing decoded data or identification on the described display unit 37 confirms that the back sends to the terminal of user's appointment through described antenna 34 by described radio receiving transmitting module 33.