patents.google.com

CN1661327A - Car borne geo information collector - Google Patents

  • ️Wed Aug 31 2005

Embodiment

The structure of an embodiment of the vehicle-mounted geographical information collection device of the present invention sees also Fig. 1.This vehicle-mounted geographical information collection device is directly installed in the automobile and by the automobile power supply, it comprises a microprocessor 1, an external data memory 2, a satellite positioning receiver 3, serial

ports conversion chip

4 as the communication interface converter, gather voice and be converted to digitally coded

voice processing apparatus

5 for one, the switch 6 of a control voice collecting, one prevents that microprocessor 1 from entering the house dog 7 of endless loop, the

power module

8 of a dc voltage conversion, the bi-colour LED 9 of an expression GPS acquisition state and expression are in the

pilot lamp

10 of voice collecting.

Microprocessor 1 adopts 16 single-

chip microcomputers

11 of enhancement mode with 4 serial ports as central processing unit (CPU), and the ROM (read-only memory) of depositing

control program

12 of configuration expansion and deposit the

random access memory

13 of program run data is responsible for the processing computing of program.Procedure stores ROM (read-only memory) 12 adopts the Nor type FLASH storer of 4Mb capacity, and its Enable Pin connects first sheet choosing end CS0 of single-

chip microcomputer

11, the corresponding address/data lines A0-18 end that connects single-

chip microcomputer

11 of its address/data lines; Datarams

random access memory

13 is to adopt the SRAM of 1Mb capacity, and its Enable Pin connects second sheet choosing end CS1 of single-

chip microcomputer

11, the corresponding address/data lines A0-16 end that connects single-

chip microcomputer

11 of its address/data lines.Two output terminals of the control I/O mouth of single-

chip microcomputer

11 connect bi-colour LED 9, and other has an output terminal to connect

pilot lamp

10.

External data memory 2 is the high-capacity and high-speed flash memory Nand type Flash storer of 1Gb.Its input/output end port connects the I/O serial ports of single-

chip microcomputer

11.

The

GPS module

31 of satellite positioning receiver 3 and

GPS receiving antenna

32 are the outsourcing standard component.

GPS receiving antenna

32 is placed on the position such as the automobile top that can directly face toward the sky receiving satellite signal; 31 of GPS modules are placed in the main frame, and its input/output end port connects first asynchronous serial port UART0 of single-

chip microcomputer

11.

Input/output end port in 4 pairs of the serial ports conversion chips connects second asynchronous serial port UART1 of single-

chip microcomputer

11, and external input/output end port can connect outer computer with rs-232 standard.

Voice processing apparatus

5 is made up of a voice coding module 51, microphone 52, a

power amplifier

53 and loudspeaker 54.Voice coding module 51 is accepted the analog voice signal that

microphone

52 gathers and is converted into digitally coded data to send single-

chip microcomputer

11 to through the 3rd asynchronous serial port UART2 of single-

chip microcomputer

11 and handle.Voice coding module 51 can also be decoded to the 3rd data that asynchronous serial port UART2 sends of single-

chip microcomputer

11, after converting simulating signal to and sending

power amplifier

53 to amplify, is play by

loudspeaker

54.

Switch 6 is a toggle switch, its end ground connection, and the other end meets an input end INT0 of the control I/O mouth of single-

chip microcomputer

11.

The input end of house dog 7 connects the removing output terminal GSOUT of single-

chip microcomputer

11, and output terminal connects the RESET input of single-

chip microcomputer

11.

Power module

8 is that the DC voltage of 5V is to each above-mentioned parts power supply with the 12V direct supply voltage transformation of automobile.

Introduce the main software structure flow process of single-

chip microcomputer

11 operations below.The whole software system is an AM/BAM system, system all operates in background state under the idle condition, when interrupting arriving, system just jumps to the foreground, judge interrupt vector, jump to corresponding Interrupt Process subroutine then and carry out, after Interrupt Process was finished, system jumped back to the background state operation again.

Main Interrupt Process subroutine title in foreground and their effect in Fig. 2, have been listed.

Serial communication is the task of the bottom, to the application of

GPS module

31 and voice coding module 51 and and host computer between communication all realize by serial ports.The serial ports of single-

chip microcomputer

11 interrupts dividing two kinds: receive and interrupt and send interrupting, both are independently, but can a shared Interrupt Process function.

The single-

chip microcomputer

11 that present embodiment adopted supports serial data to receive dma mode, serial port setting DMA working method, the buffer memory size and the overtime upper limit that serial ports DMA receives are set, serial ports DMA are set receive the interrupt handling routine inlet, serial ports is set sends the interrupt handling routine inlet.Because each serial ports all is independently, therefore must handle respectively each serial ports, when serial ports is received data or will be sent data, will jump to corresponding interrupt handling routine and carry out.

The serial ports initialization is handled by a special subroutine, its flow process as shown in Figure 4:

Step 400 enters this subroutine, and a string slogan temporary storage location is set.

Step 401 charges to 0 in the string slogan temporary storage location, points to asynchronous serial port UART0.

Step 402, the asynchronous serial port of charging to value points in the string slogan temporary storage location is provided with baud rate and DMA working method, the buffer memory size and the overtime upper limit that this serial ports DMA receives are set, this serial ports DMA are set receive the interrupt handling routine inlet and send the interrupt handling routine inlet.

Step 403 becomes the data rewriting in this serial ports DMA buffer zone the state of unreceived data.

Step 404 judges whether be 2, continue next serial ports is carried out initialization otherwise jump to step 405 if charging to numerical value in the string slogan temporary storage location, be then to forward step 406 to.

Step 405, the numerical value of charging in the string slogan temporary storage location adds 1, points to next asynchronous serial port.

Step 406 is moved so far, and the initialization operation of three asynchronous serial ports finishes, and forwards background program to and continues operation.

After the serial port setting DMA working method, when the data that certain serial ports receives arrive, data are transplanted in the DMA buffer zone of this serial ports at once, triggering a DMA interrupt notification single-

chip microcomputer

11 when data volume reaches buffer size fetches data, perhaps the overtime upper limit triggers the data that DMA interrupt notification single-

chip microcomputer

11 is got in the DMA buffer zone, can prevent loss of data like this.Transmission is data from a byte to the serial ports output register of single-

chip microcomputer

11 that write, and transmission can be controlled voluntarily, waits a byte to send to finish and sends next byte again, can not produce the phenomenon of covering.

Serial ports Interrupt Process flow process is as shown in Figure 5:

Step 500 receives the serial ports interrupt request, the beginning interrupt operation.The interrupt number of each serial ports interruption is independent, unique, and can distinguish the transmission interruption or receive interruption according to the interrupt vector of each interruption, can judge it is which kind of interrupt request of which serial ports in view of the above, forwards step 501 then to.

Step 501, according to interrupt vector, whether be send data interruption, if then forward step 504 to, otherwise forward step 502 to if judging.

Step 502 judges whether it is to receive to interrupt, if then forward step 503 to, otherwise forwards step 506 to.

Step 503, the data that this serial ports is received are written in the DMA buffer zone, whether the DMA buffer zone can meet the full or overtime upper limit of its down trigger condition DMA buffer zone that is provided with in advance according to the data received is given birth to DMA from movable property and interrupts, and notice single-

chip microcomputer

11 sends the data processing software interrupt request of this serial ports.Forward step 507 then to.

Step 504 sends the data of a byte to the serial ports output register of serial ports, and serial ports can send the data in this register automatically.Forward step 505 then to.

If step 505, the data that send to serial ports be a more than byte, so whether judgment data send and finish, if send intactly, then jumps to step 504 and continue to send, otherwise forward step 507 to.

Step 506, error handling processing illustrates that interrupt vector is wrong, does not carry out any operation of serial-port, directly jumps to step 507.

Step 507, the end interrupt operation, the foregrounding of a serial ports finishes, and system forwards the background program operation to.

External data memory 2 should be taken all factors into consideration storage medium from several respects such as capacity, power consumption, volume, response speeds, it is suitable using Nand type Flash chip on mobile device, the data of storage export to host computer by the communication serial ports the most at last, we take the form of file access to realize: is the data of two kinds of forms of storage that road data and monumented point data are divided into two files, can certainly store more multifile.By a file management system Flash is divided into two parts, first is the data area, the overwhelming majority that takes up space; Second portion is used for depositing the file system gauge outfit, has system log (SYSLOG) SR (System Record) in the gauge outfit, file allocation table FAT (File Allocation Table) and list of document FRT (File Register Table).System log (SYSLOG) SR is used for writing down the position of essential informations such as capacity, type, sector number and the size of Flash and FAT and FRT and size etc.; File allocation table FAT is used for the situation that takies in recording storage space and the storage organization of each file; List of document FRT is used to write down attribute, length and the initial memory location inlet of each file.For the storage of data, need be mapped as operation earlier, then the operation that file is added, deletes or revises to corresponding document; Also carry out reading in this way for reading of data to file.For distinguishing the file type of storage or read operation object, defining an internal memory field is the file type temporary storage location.Be example with the data storage operations below, describe; And it is more simple to read storage operation, can analogize.

The file type temporary storage location is composed analog value before interrupting entering Flash storage, as 1 memory track circuit-switched data of indicating, the 2 storage mark point data of indicating.After interrupting, judge the value of file type temporary storage location, do corresponding operation then.When the data storage task is received the storing message that other task is sent out, judge document number earlier, the decision operation type is operated corresponding file then then, rewrites the FRT and the FAT of gauge outfit file at last, and one time storage operation is then finished.

For the Flash store tasks, simple example flow as shown in Figure 6

Step 600 has Flash storage interrupt request to come in, the beginning interrupt operation.

Step 601, judge whether Flash is filled with, the method that adopts is: note the space size of writing at every turn or wiping, deduct the shared space of each write operation or add with summation (128M) and wipe the space that is discharged at every turn, deduct the size of system's gauge outfit again, being stored at last among the SR of system's gauge outfit, is the remaining space of Flash.Then point out the Flash insufficient space when remaining space during for not enough this write operation requisite space, jump to step 605.Otherwise jump to step 602.

Step 602 is judged the storage file type.Judge the value of file type temporary storage location, if 1, then jump to step 606, otherwise jump to step 603.

Step 603, the value of judgement file type temporary storage location if 2 jump to step 607, otherwise jumps to step 604.

Step 604, the value of supporting paper type temporary storage location is wrong, can not find corresponding storage class, does not therefore carry out any Flash storage operation, forwards step 608 to, a Flash end of operation.

Step 605, send the text data file of voice messaging " insufficient memory " to the serial ports UART2 of speech processing module, call the voice module software interruption with the form of phonetic synthesis and handle subroutine, do not carry out any Flash operation, forward step 608 then to.

Step 606 stores road data among the Flash into, changes SR, FAT in the gauge outfit and the information of three tables of FRT then, forwards step 608 at last to.

Step 607 in Flash, is changed SR, FAT in the gauge outfit and the information of three tables of FRT to the monumented point data storage then, forwards step 608 at last to.

Step 608, the end interrupt operation, this foregrounding finishes, and forwards the background program operation to.

GPS module 31 is carried out corresponding initialization, as working method, data layout, data acquisition are set at interval and baud rate, GPS module 31 can be started working afterwards, and data acquisition according to the rules is at interval regularly to first asynchronous serial port UART0 of single-chip microcomputer 11 output data.The data that GPS module 31 is sent are gps data frames of forming according to the defined form of NMEA-0183 that American National ocean Institution of Electronics (NMEA) formulates, the size of each gps data frame is the buffer memory size that receives of this serial ports DMA just, and serial ports UART0 receives that a frame gps data is just to the full interrupt request of the DMA buffer zone of 11 one deuterzooid serial ports of single-chip microcomputer; Single-chip microcomputer 11 these interrupt request of response are transferred GPS module software Interrupt Process subroutine, and this gps data frame is handled.Earlier this gps data frame is taken out from the DMA buffer zone of this serial ports, deposit in the current location temporary storage location of internal memory, definition according to the gps data frame format parses current the residing latitude and longitude information of vehicle, speed, direction, data validity and time etc. for information about from Frame, and deposits effective information in the external data memory 2 path file.

The flow process of GPS module software Interrupt Process subroutine is as shown in Figure 8:

Step

800, the DMA of first serial ports UART0 interrupts arriving, the beginning Interrupt Process.

Step 801 is taken out these frame data from the DMA buffer zone of this serial ports, deposit in the current location temporary storage location of internal memory.

Step 802 to these frame data in the current location temporary storage location, is carried out data parsing according to form.

Step 803 judges whether the data significance bit in this frame gps data is " A ", represents during for " A " that

GPS module

31 located success, these frame data are effective,

forward step

804 to, the control I/O mouth of single-

chip microcomputer

11 is sent out gating pulse, makes bi-colour LED 9 flickers green; If the data significance bit is then represented

GPS module

31 no-fix still for " V ", these frame data are invalid,

forward step

807 to.

Step 805 is taken out useful longitude, latitude, speed, direction and time data in the gps data from the current location temporary storage location of internal memory.

Step 806 is changed data, and is organized into a packet, produces the software interruption reporting system then and stores.Processing that can advanced line data before the storage can not processed yet.Present embodiment is selected carrying out data processing.Because the data in the GPS frame all are visible ASC code characters, be expressed as " 3723.2475 " as a latitude information, take 9 bytes, we are converted to the 16 system numbers that a length is 4 bytes to it: " 3723.2475 "->25 17 18 4B, and to save storage space.

Step

807, the control I/O mouth of single-

chip microcomputer

11 is sent out gating pulse, makes bi-colour LED 9 flash red.

Step

808, the end interrupt operation turns back to the background program operation.

The voice coding module 51 that present embodiment adopts is XF2S01E voice modules that the University of Science and Technology news fly company, and it has four kinds of duties: free time, coding, decoding, phonetic synthesis.We are provided with a module status unit and represent current module status, as: 1 expression is idle, 2 presentation codes, 3 expression decodings, 4 expression phonetic syntheses.As, when encoding the module status unit being changed to encoding state, the end-of-encode postposition is an idle condition.A global variable is set in addition: sound-type, when sending software interruption, indicate the job category that requires voice coding module 51 to operate, as: 2 expressions are encoded to the voice signal of

microphone

52, the data decode that 3 expressions are sent serial ports UART2 converts voice signal to, 4 expressions are carried out phonetic synthesis to the text data that serial ports UART2 sends, and finish the conversion of greeting and signal language.When voice coding module 51 is carried out each encoding operation, all to start an overtime timer, then stop this timer after being finished.If surpass the schedule time, then force to finish encoding operation, with the time of restriction sign point voice typing.

The interrupt levels that the voice module software interruption is handled subroutine is minimum, its flow process as shown in Figure 7:

Step 700 has the speech processes interrupt request to come in, the beginning Interrupt Process.

Step 701, the value of judge module state cell, if current module status is idle, then expression can be worked, and jumps to step 704; Otherwise jump to step 702.

Step 702 is judged and is waited for that whether module status transfers the idle time to above 1 second, just continues to wait for that forward step 701 to, the time of wait surpassed for 1 second, jumped to step 703 to 1 second.

Step 703, think that voice coding module 51 made mistakes this moment, sends instructions voice coding module 51 is carried out forced resetting, the value of putting the module status unit then jumps to step 704 again for idle.

Step 704 judges that according to the value of sound-type interrupt request requires the type of voice coding module 51 executable operations, jumps to respective phases of operation 705~707 then.

Step 705, send to instruct to make voice coding module 51 enter encoding state, start overtime timer, the voice signal that the

microphone

52 that the automatic collection of voice coding module 51 meetings this moment is attached thereto is transmitted, form binary coding then in real time, send to continuous serial ports UART2.

Step 706, send instruction to make voice coding module 51 enter decoded state, this moment, 51 meetings of voice coding module waited for that serial ports UART2 sends the binary data file of prescribed form here, the binary data that voice coding module 51 can provide this document in real time is converted into sound, plays out sound by the

loudspeaker

54 that are attached thereto then.

Step 707, send instruction to make voice coding module 51 enter the phonetic synthesis state, this moment, voice coding module 51 can be sent anthropomorphic sound " hello " by the

loudspeaker

54 that are attached thereto as long as send text data as " hello " to voice coding module 51, and this function is mainly used in voice suggestion.

Step 708 when the operation of carrying out 705~707, need be carried out assignment set to the module status unit according to residing duty, as: enter encoding state and just the module status unit is changed to encoding state.

Step 709 judges this time whether operation finishes, and voice coding module 51 is at encoding state, and overtime timer reaches the schedule time, is this EO; Voice coding module 51 is received end frame at decoding or phonetic synthesis state, is this EO.Do not finish, just maintain the original state and continue operation; Need close overtime timer after coding work finishes, decoding or phonetic synthesis need not special processing after hours, forward step 710 to.

Step 710 send instruction to make voice coding module 51 enter idle condition, puts the module status unit for idle, and end interrupt is handled, and so far a speech processes end of operation returns background program.

Fig. 3 illustrates the basic structure flow process of backstage master routine.

Master routine is begun by step 300.

Step 301 is set each I/O mouth of single-

chip microcomputer

11 by the function that illustrates previously, and the inner timer of definition.Call serial port initialization process subroutine shown in Figure 4, the asynchronous serial port UART0 that links to each other with

GPS module

31 of initialization, the communication that links to each other with serial

ports conversion chip

4 are with asynchronous serial port UART1 and the asynchronous serial port UART2 that links to each other with

voice processing apparatus

5 successively, the working method that they are set is the DMA working method, and the baud rate of each serial communication is set respectively.。

Step 302 is set interrupt vector and the correlated variables that the exterior storage software interruption is handled subroutine entry to external data memory 2, and open this interruption.

Voice processing apparatus

5 is carried out voice coding module 51 reset, set its running parameter, it is idle making current state, sets the interrupt vector that the voice module software interruption is handled subroutine entry, and open this

interruption.GPS module

31 working methods, data layout, data acquisition are set at interval, set the interrupt vector of GPS module software Interrupt Process subroutine entry, and open this interruption.

Step 303 is checked the input end INT0 that controls the I/O mouth, judges the state of switch 6.

Step 304, judge that the foundation whether

GPS module

31 locatees is: whether the data significance bit in the last frame gps data that keeps in the current location temporary storage location of internal memory is " A ", represents during for " A " that

GPS module

31 located success, these frame data are effective.This step goes to check its positioning states exactly, judges that whether GPS locatees.

Step 305 detects

GPS module

31 and successfully locatees, and send control level to the control I/O mouth output terminal that connects

pilot lamp

10,

lights pilot lamp

10, and prompting operation person can carry out the speech typing.

Step 306, the longitude and the latitude data of taking-up current location from the current location temporary storage location of internal memory, the positional information of this point will form a complete monumented point packet with ensuing voice messaging.The variable sound-type is set at coded system, call the voice module software interruption and handle subroutine, make voice coding module 51 be set at coded system, by

microphone

52 typing voice in voice coding module 51, voice coding module 51 is speech conversion a binary data stream in real time, send to the 3rd asynchronous serial port UART2, so just, can trigger the DMA hardware interrupts that UART2 receives data, this DMA hardware interrupts deposits in the special data area in the internal memory leaving speech data in the DMA buffer zone in.

Step 307 to this End of Tape, changes the control level of the control I/O mouth output terminal that connects

pilot lamp

10, extinguishes

pilot lamp

10, and the typing of prompting operation person's speech stops, please with switch 6 open circuits.

Step 308 the location information sets Composite Logo point data bag that the speech data in the special data area that leaves in the internal memory and step 306 are obtained, is called the exterior storage software interruption then and is handled subroutine, and the monumented point packet is stored among the Flash.

Step 309, sign point data bag has been stored and has been finished when carrying out step 309, then once gathers and finishes; Check the input end INT0 of control I/O mouth repeatedly, judge the state of switch 6, behind wait switch 6 open circuits, turn back to step 303 again, prepare data acquisition next time.

Step 310, the data significance bit in the last frame gps data that keeps in the current location temporary storage location of internal memory are " V ", the success of

expression GPS module

31 no-fix, and these frame data are invalid.The variable sound-type is set at the phonetic synthesis mode, call the voice module software interruption and handle subroutine, making voice coding module 51 be set at the phonetic synthesis mode works, send the success of anthropomorphic sound prompting operation

person GPS module

31 no-fix by

loudspeaker

54, need wait for a moment, just can carry out the voice of monumented point and describe.

Geographical information collection device main frame is fixed on certain position in the car, power supply and ground wire respectively with automobile on the positive pole of ignition with on negative pole is connected,

GPS receiving antenna

32 be placed on can be directly facing to the position such as the automobile top of sky receiving satellite signal.Start up the car, then entire equipment powers on and starts working, and this moment, bi-colour LED 9 flash red and

loudspeaker

54 broadcast voice suggestion equipment began to carry out work.

Wait for that the green expression of bi-colour LED 9 flickers GPS locates successfully, equipment can be along the trend of road, the longitude of timing extraction vehicle location and latitude data, and deposit the vehicle position data of extraction in the external data memory 2 path file.Automobile is through certain when can be used as landmark on map such as during certain mansion, press and gather switch 6,

pilot lamp

10 bright promptings begin recording, equipment can obtain the location coordinate information of this point earlier, start the voice coding function then, the operator says about the relevent information of this building such as title etc., and

pilot lamp

10 extinguishes the expression End of Tape then.The passengers inside the car that voice

processing apparatus

5 is gathered are to the phonetic coding data of this geographical sign point illustration, and the monumented point file that deposits the vehicle current location data and the phonetic coding data of extraction in external data memory 2.

As much as possible all streets are run one time in certain city according to this operating process, all information that finally collect are by path file and the monumented point file of

communication interface converter

4 in 2 storages of outer computer transmission external data memory.Upper outer computer can utilize path file and monumented point file to be shown as path locus, and the map edit producer couples together track and carries out some processing, will form an electronic chart.Behind automobile flameout, equipment also just is stopped and has powered, and can not influence automobile power source and use.

The data of external data memory 2 storages are exported to host computer by the communication serial ports, all belong to prior art, as space is limited, do not give unnecessary details at this.In like manner, also the data in the host computer can be imported in the external data memory 2 by the communication serial ports.

According to above explanation, also the monumented point file voice data in the host computer can be transferred to import voice coding module 51 by the communication serial ports and carry out playback, do not give unnecessary details at this yet.