CN1306389C - Sound card based modulation-demodulation method and system - Google Patents

Sound card based modulation-demodulation method and system Download PDF

Info

Publication number
CN1306389C
CN1306389C CNB2003101041602A CN200310104160A CN1306389C CN 1306389 C CN1306389 C CN 1306389C CN B2003101041602 A CNB2003101041602 A CN B2003101041602A CN 200310104160 A CN200310104160 A CN 200310104160A CN 1306389 C CN1306389 C CN 1306389C
Authority
CN
China
Prior art keywords
frame
signal
modulation
sound card
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2003101041602A
Other languages
Chinese (zh)
Other versions
CN1635468A (en
Inventor
朱红琛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 30 Research Institute
Original Assignee
CETC 30 Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CETC 30 Research Institute filed Critical CETC 30 Research Institute
Priority to CNB2003101041602A priority Critical patent/CN1306389C/en
Publication of CN1635468A publication Critical patent/CN1635468A/en
Application granted granted Critical
Publication of CN1306389C publication Critical patent/CN1306389C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention relates to a sound card based modulation-demodulation method and a system thereof, which provides a modulation-demodulation method and a system for digital communication. A computer CPU completes real-time modulation and demodulation of signals, and a sound card completes A/D, D/A conversion and signal input and output, which expands the application of the sound card. The modulation and demodulation algorithm of the signals adopts computer software to realize, and different modulation and demodulation algorithm modules can be invoked for communication according to the currently used channel type of communication. The present invention can realize digital signal transmission flexibly, conveniently and at an easy rate, and can also realize wireless digital communication of data through a short wave radio set and an ultrashort wave radio set.

Description

Modulation-demo-demodulation method and system based on sound card
Technical field
The present invention relates to digital communication modulation field, be specifically related to modulation-demodulation technique based on sound card.
Background technology
Nowadays digital communication is widely used, in digital communication, information adopts the digital signal that quantizes to represent, message code is by binary number 0,1 constitutes, transmit in channel in order to make digital signal, realize digital communication, must earlier digital signal be converted to the sound signal of simulation by modulation-demodulation technique, sending into channel again transmits, existing modulation-demodulation technique all is the hardware device by a kind of special use that realizes at the different special-purpose process chip of application employing usually, that is to say our usually said modulator-demodular unit (MODEM), need use different modulator-demodular units at different transmission channels, such as passing through the employed Modem of wire telephony line transmission of digital signals, difference according to the modem communication agreement just comprises: V.34, V.90, V.92 wait the Modem of series, cooperate shortwave in addition, the special-purpose Modem that ultrashort wave radio set uses etc. use very inconveniently, and make that the digital data transmission cost is too high.
The shortwave of widespread use at present, ultrashort wave radio set, hand-held intercom are all only supported Speech Communication usually, can not carry out digital communication.And general A/D, D/A conversion and the input and output that yet only merely are used for voice signal of sound card are not applied to the input and output of digital signal.
Summary of the invention
The purpose of this invention is to provide a kind of modulation-demo-demodulation method and system based on sound card, utilize sound card to finish the A/D of digital signal, D/A conversion and input and output, the modulation and demodulation algorithm adopts computer software to realize, can be according to the channel type of current communication use, call different modulation and demodulation algoritic modules and realize modulation, digital data transmission can be realized very flexibly, at an easy rate, and the radio digital communication of data can be realized by shortwave, ultrashort wave radio set.
In order to achieve the above object, the present invention realizes by the following technical solutions:
Based on the modulation demodulation system of computer sound card, to form by software and hardware, hardware is used to transmit data, and software is used for data are carried out modulation, and hardware comprises: CPU, transmit buffer, reception buffer, sound card, interface control matching module; CPU is by transmission buffer and reception buffer and sound card interconnection, and the interface of sound card is by interface control matching module and channel interconnection;
Call the modulation subroutine by CPU and conciliate the tune program, realize sound signal real-time modulating/demodulating frame by frame; Transmit buffer is used to store modulated data to be sent; Reception buffer is used to store the data of receiving to be demodulated; Sound card is realized input, the output of sound signal; The coupling of interface impedance and signal level between interface control matching module realization sound card and the radio equipment, and the PTT signal in control radio station.
Modulation-demo-demodulation method based on computer sound card, comprise modulated process and demodulating process, when transmit buffer sky, reception buffer are full, call the modulation subroutine respectively and conciliate the tune program, realize sound signal real-time modulating/demodulating frame by frame by call back function mechanism;
Modulated process may further comprise the steps: pending data-signal is inserted synchronous head frame by frame, at first send synchronous head, then data bit flow waiting for transmission is modulated the formation sound signal to baseband carrier, write transmission buffer, carry out the D/A conversion by sound card again, output on the channel frame by frame then;
Demodulating process may further comprise the steps: with the signal received after sound card carries out the A/D conversion, send into reception buffer, call the demodulation subroutine by call back function mechanism when reception buffer is full, frame by frame is searched for synchronous head from data, and after setting up synchronously therefrom frame by frame demodulate data stream.
The present invention utilizes the transmission terminal of general purpose personal computer+sound card as data communication, need not other hardware investment.Finish the input and output of A/D, D/A conversion and the sound signal of data-signal with sound card, therefore native system and the communication facilities with Speech Communication function can be used, utilize speech transmissions passage (as the shortwave of present widespread use, ultrashort wave radio set etc.) to realize data communication; And expanded the application that sound card is used for transmission of data signals; The modulation and demodulation of signal adopts computer software to realize among the present invention, can be according to the type of communication channel, design different modulating demodulating algorithm software communicates, and adds man machine operation interface friendly on the PC, can realize the transmission of digital signal very convenient, flexibly, at an easy rate; Interface control coupling hardware module, volume is little, cost is very low, dispense with outer connecting power.
Description of drawings
Fig. 1 is based on the block diagram of the modulatedemodulate system system of sound card
Fig. 2 is the circuit theory diagrams of match circuit in the interface control matching module
Fig. 3 is the circuit theory diagrams of control PPT circuit in the interface control matching module
Fig. 4 is the modulation program process flow diagram
Fig. 5 is the demodulation process process flow diagram
Fig. 6 is a search synchronous head program flow diagram among Fig. 5
Embodiment
Describe implementation method of the present invention in detail below in conjunction with accompanying drawing
Personal computer CPU has powerful calculation process ability, is enough to deal with the real-time processing to digital signal.Sound card has been the standard configuration among the PC at present, and widely used Windows operating system provides the multimedia function support, therefore promptly can realize the input and output of audio stream easily by sound card integrated in the PC.Native system is exactly to utilize input and output that sound card in the PC and CPU processor realize sound signal and the real-time modulation of signal is handled, and finally constitutes a data communication terminal.Usually the stereophonic reproduction and the recording of two sound channels about sound card is supported, therefore we can be used for L channel the connecting channel machine, R channel is used to connect user's headset system, when the user needs transporting speech professional, can directly get final product deliver to L channel output from the signal of R channel, the formation of system is as shown in Figure 1: CPU is by transmit buffer and reception buffer and sound card interconnection, the L channel interface of sound card is by interface control matching module and radio station interconnection, and the R channel of sound card is by interface control matching module and the interconnection of voiceband user interface.
Sound card is realized the input and output of D/A, A/D conversion and the sound signal of signal, under the Windows system, realize that by sound card the method for sound signal I/O has a lot, we have designed two classes of CwaveIn, CwaveOut and have realized sound signal I/O frame by frame by the audio frequency Control Software interface interchange mmsystem function that Windows operating system provides.
CWaveIn::CWaveln(
PWaveCallBack pWaveCallBack, // call back function pointer
Int nBufferSize, // input buffer size
Int nSampleRate, // sample frequency
Int nSampleBitsLen // quantified precision
)
CWaveOut::CWaveOut(
PWaveCallBack pWaveCallBack, // call back function pointer
Int nBufferSize, // output buffer size
Int nSampleRate, // sample frequency
Int nSampleBitsLen // quantified precision
)
The data of process sound card I/O are the sampling point sequences after sound signal is encoded through linear PCM, sample frequency is 8kHz, quantified precision 16bit, the signal of input and output is sent into reception buffer and transmission buffer respectively, behind the sampling point (frame) of I/O some, will call call back function respectively automatically, in call back function, finish the processing of signal modulating/demodulating.
Digital signal processing module among the CPU comprises that the modulation subroutine conciliates the tune program, and they realize sound signal real-time modulating/demodulating frame by frame respectively at the transmit buffer sky, call by call back function mechanism when reception buffer is full.
When the modulation subroutine sends, at first send synchronous head, then data bit flow waiting for transmission is modulated the formation sound signal to baseband carrier, frame by frame is play by sound card and is outputed to channel again, modulation waveform can adopt PSK or FSK mode, consider in the communication and error code may occur, also should adopt FEC in the application software, the Error Correction of Coding communication technologys such as ARQ, to reduce the bit error rate of digital signal, improve the reliability of signal transmission, the modulation program process flow diagram as shown in Figure 4, the at first transmission (step 101) of log-on data, send a M sequence earlier as synchronous head, judge whether the synchronous head sequence sends finish (step 102), if not then continue to send synchronous head sequence (step 103), and the synchronous head sequence modulated (step 106), if sending, the synchronous head sequence finishes, then begin to send data (step 104), and data are carried out Error Correction of Coding (step 105), then the data behind the coding are modulated (step 106), the data that to modulate after (step 106) are sent into transmit buffer (step 107), whether judgment data sends end (step 108), if do not send, then getting back to step 102 continues to send, if sending, data finish, then insert another M sequence as the data telegram end, judge whether telegram end sends finish (step 109), do not send and then continue to send telegram end sequence (step 110), and the telegram end sequence modulated (step 106), telegram end is sent completely and then finishes modulated process.
Demodulation subroutine frame by frame is searched for synchronizing signal from the data that sound card collects, and after setting up synchronously therefrom frame by frame demodulate data stream, the flow process of demodulation process as shown in Figure 5, judge at first whether reception buffer expires (step 201), if less than would continue the data that sound card collects are read in reception buffer, if it is full then judge whether to receive synchronous head (step 202), do not receive synchronous head, then continue from data, to search for synchronous head (step 203), after receiving synchronous head, then data are advanced demodulation (step 204), and carry out the decoding (205) of Error Correction of Coding, with decoded data outputs (step 206), judge whether to receive telegram end sequence (207),, then get back to step 201 and continue data are handled if do not have, if receive telegram end, then finish demodulating process.
The program circuit of searching for synchronous head (step 203) in the above-mentioned demodulation process as shown in Figure 6, the signal (step 301) that beginning back demodulation is received, data after the demodulation are carried out M sequence correlation computations (step 302), judge whether to reach dependent threshold (step 303) and successfully indicate (step 304) synchronously if reach then put, if do not reach dependent threshold, then continue to restart to search for the synchronous head process, till reaching dependent threshold.
The Interface Matching control module comprises match circuit and control PPT circuit, the headset interface of sound card and the microphone in radio station, speaker interface are normally unmatched, for the more effective work of system's energy, need between sound card and radio equipment, increase a match circuit, finish the coupling of interface impedance and signal level between sound card and the radio equipment; Radio station equipment needs the PTT signal in control radio station earlier when sending signal, the handling characteristics of PTT signal is, when sending, PTT signal and earth signal short circuit need be got up, and disconnection when idle, we have designed control PTT circuit and have finished this function.
Wherein match circuit adopts passive resistor network to realize, circuit theory diagrams as shown in Figure 2, input signal is through resistance R 1 ground connection, and through adjustable resistance R2 output, resistance R 1 is the input build-out resistor, selects the surface-mount resistor of 600 Ω or 1000 Ω usually for use, resistance R 2 is a damping resistance, usually select the Surface Mount adjustable resistance of 150K Ω for use,, can increase by three end filters of a Surface Mount at output signal end in order to prevent of the interference of wireless channel equipment to system.
The schematic diagram of control PTT circuit as shown in Figure 3, be connected in the base stage b of triode through resistance R 3 from the control signal RTS of serial ports of computers, the emitter e ground connection of triode, collector c connects the PTT signal in radio station, wherein resistance R 3 adopts the resistance of 12K Ω, triode adopts 2N2222, when RTS is high level, sends for allowing the radio station.
The shortwave of widespread use at present, ultrashort wave radio set, hand-held intercom, usually all support the Speech Communication of base band, have the jack that connects earphone, microphone, native system sound card signal wire is linked to each other with earphone, the microphone signal line in radio station, can realize wireless data communications; Can use native system and realize following application function: the short message between the mobile station user, e-file transmission; The mobile station user sends the GPS locating information to zone center; Realize long distance wireless robotization control etc. by the radio station.

Claims (6)

1, a kind of modulation demodulation system based on computer sound card, be made up of software and hardware, hardware is used to transmit data, and software is used for data are carried out modulation, it is characterized in that hardware comprises: CPU, transmit buffer, reception buffer, sound card, interface control matching module; CPU is by transmit buffer and reception buffer and sound card interconnection, and the interface of sound card is by interface control matching module and channel interconnection;
Call the modulation subroutine by CPU and conciliate the tune program, realize sound signal real-time modulating/demodulating frame by frame;
Transmit buffer is used to store modulated data to be sent;
Reception buffer is used to store the data of receiving to be demodulated;
Sound card is realized input, the output of D/A, A/D conversion and the sound signal of signal;
The coupling of interface impedance and signal level between interface control matching module realization sound card and the radio equipment, and the PTT signal in control radio station.
2, the modulation demodulation system based on computer sound card according to claim 1 is characterized in that, interface control matching module comprises match circuit and control PTT circuit;
Match circuit adopts passive resistor network to realize, input signal is through resistance R 1 ground connection, and exports through variable resistor R2;
Control PTT circuit is realized the function of control radio station PTT signal, is connected in the base stage b of triode from the control signal RTS of serial ports of computers through resistance R 3, the emitter e ground connection of triode, and collector c connects the PTT signal in radio station.
3, a kind of modulation-demo-demodulation method based on computer sound card, comprise modulated process and demodulating process, it is characterized in that, when transmit buffer sky, reception buffer are full, call the modulation subroutine respectively and conciliate the tune program, realize sound signal real-time modulating/demodulating frame by frame by call back function mechanism;
Modulated process may further comprise the steps: data-signal to be sent is inserted synchronous head frame by frame, then baseband carrier is modulated the formation sound signal, write transmit buffer, carry out the D/A conversion by sound card again, output to frame by frame on the channel;
Demodulating process may further comprise the steps: with the signal received after sound card carries out the A/D conversion, send into reception buffer frame by frame, when reception buffer is full, call the demodulation subroutine by call back function mechanism, frame by frame is searched for synchronous head from data, and after setting up synchronously therefrom frame by frame demodulate data stream.
4, modulation-demo-demodulation method according to claim 3, it is characterized in that, wherein with sound card realize sound signal frame by frame the method for I/O be the audio frequency Control Software interface interchange mmsystem function that provides by Windows operating system, and designed the I/O frame by frame that two classes of CwaveIn, CwaveOut realize sound signal; CWaveIn::CWaveIn (
PWaveCallBack pWaveCallBack, // call back function pointer
Int nBufferSize, // input buffer size
Int nSampleRate, // sample frequency
Int nSampleBitsLen // quantified precision
)
CWaveOut::CWaveOut(
PWaveCallBack pWaveCallBack, // call back function pointer
Int nBufferSize, // output buffer size
Int nSampleRate, // sample frequency
Int nSampleBitsLen // quantified precision
)。
5, modulation-demo-demodulation method according to claim 3 is characterized in that, when sending ED, inserts the M sequence as telegram end in the modulated process.
6, modulation-demo-demodulation method according to claim 3 is characterized in that, adopts error correction coding in the modulation process, to improve the reliability of signal transmission.
CNB2003101041602A 2003-12-29 2003-12-29 Sound card based modulation-demodulation method and system Expired - Fee Related CN1306389C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2003101041602A CN1306389C (en) 2003-12-29 2003-12-29 Sound card based modulation-demodulation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2003101041602A CN1306389C (en) 2003-12-29 2003-12-29 Sound card based modulation-demodulation method and system

Publications (2)

Publication Number Publication Date
CN1635468A CN1635468A (en) 2005-07-06
CN1306389C true CN1306389C (en) 2007-03-21

Family

ID=34842970

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2003101041602A Expired - Fee Related CN1306389C (en) 2003-12-29 2003-12-29 Sound card based modulation-demodulation method and system

Country Status (1)

Country Link
CN (1) CN1306389C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102376308A (en) * 2010-08-20 2012-03-14 环达电脑(上海)有限公司 Device and method for processing pulse-code modulation (PCM) digital signals
CN102510312B (en) * 2011-09-29 2014-04-16 中国人民解放军理工大学 Wireless multichannel communication experiment platform
CN102510544A (en) * 2011-12-20 2012-06-20 天津七一二通信广播有限公司 Digital fishery interphone private protocol control method using 4FSK (Frequency Shift Keying)
CN103957040B (en) * 2014-04-09 2017-04-05 北京工业大学 A kind of short-wave radio set communication control system and method
CN104092637B (en) * 2014-07-03 2018-03-13 上海交通大学 Short range digital modem communication method based on computer sound card
CN111181658B (en) * 2019-12-26 2022-09-16 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) Communication test system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1076289A (en) * 1992-03-12 1993-09-15 地方国营滨海县无线电厂 Pronunciation sounding card for computer
CN1225465A (en) * 1999-01-25 1999-08-11 广州一信通讯技术有限公司 Speech communication computer and use thereof
US20020038433A1 (en) * 2000-06-28 2002-03-28 Z-World, Inc. System and method for utilizing programmed multi-speed operation with a microprocessor to reduce power consumption
JP2003309891A (en) * 2002-04-17 2003-10-31 Sony Corp Onboard reproducing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1076289A (en) * 1992-03-12 1993-09-15 地方国营滨海县无线电厂 Pronunciation sounding card for computer
CN1225465A (en) * 1999-01-25 1999-08-11 广州一信通讯技术有限公司 Speech communication computer and use thereof
US20020038433A1 (en) * 2000-06-28 2002-03-28 Z-World, Inc. System and method for utilizing programmed multi-speed operation with a microprocessor to reduce power consumption
JP2003309891A (en) * 2002-04-17 2003-10-31 Sony Corp Onboard reproducing device

Also Published As

Publication number Publication date
CN1635468A (en) 2005-07-06

Similar Documents

Publication Publication Date Title
CN1123255C (en) Cellular telephone interface system for AMPS and CDMA data services
CN1106741C (en) Circuitry and method for transmitting voice and data signals upon wireless communication channel
CN101228702A (en) Method, apparatus and systems for digital radio communication systems
CN101068412A (en) TD-SCDMA/GSM double-mode double-standby intelligent mobile terminal
CN1306389C (en) Sound card based modulation-demodulation method and system
CN1475068A (en) Apparatus for receiving and recovering frequency shift keyed symbols
CN1822689A (en) Split mobile terminal
CN213906675U (en) Portable wireless bluetooth recording equipment
CN101107825B (en) Methods and apparatus for decoder selection in communication systems
CN106506029A (en) A kind of u piece of digital wireless audio transmission system and its transmission method
SE522704C2 (en) Transmission of audio data and non-audio data between a portable ch communication device and an external terminal
CN2882159Y (en) Split mobile terminal
CN100377581C (en) Digital broadcast receiver capable of converting radio-wave mode output
CN1695311A (en) Cordless wireless local loop phone
CN2757439Y (en) Blue teeth audio frequency adaptor
CN1175643C (en) Transmission method for signal processing between transmission/receiving interfaces
US20100322103A1 (en) Method and Network for Implementing Computer Voice Communication Based on Wireless Communication Terminal
CN1741538A (en) Radio microphone device using mobile communication terminal and its specific realizing method
CN1236591C (en) First-layer protocol realizing device and method for personal hand-held communication system
CN1251542C (en) Interface device for use between redio communicaton module and terminal
CN1200549C (en) Device and method for realizing wireless short message service based on fixed route
CN110234046A (en) A kind of interpretation method based on binary channels earphone, device and system
CN201167314Y (en) Frequency modulation transceiver base on USB interface
CN200973101Y (en) CDMA network modem
CN1523913A (en) IP telephone set for mobile phone and mobile phone thereof, method for realizing mobile IP telephone

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070321

Termination date: 20100129