LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transmission of audio by serial port?

i have tested the audio and serial examples from labview without problems but i need to transmit audio by a serial port.
i think the problem is to change the number 8 bits and 16 bits to string so could somebody help me please?
maybe a little example would be great
0 Kudos
Message 1 of 6
(3,376 Views)
I hope this is what you wanted to do, now all you have to do is the math and ideally implement a codec Smiley Tongue.

See the following for more information.
http://en.wikipedia.org/wiki/Mu-law_algorithm
http://en.wikipedia.org/wiki/A-law_algorithm
http://en.wikipedia.org/wiki/Companding


Message 2 of 6
(3,365 Views)
your help means a lot to me thanks so much.
i'm really novice with labview
i made this vi with your help and i think the transmisor now works but i have problems with the receiver
i'm testing it in just one computer now
i really hope that you could test it and tell me what am i doing wrong
btw could it works in real time or i need to stop the transmission in order to receive the data?
thanks again for your help

Mensaje editado por jvinu2000

0 Kudos
Message 3 of 6
(3,363 Views)
The way your code is implemented at the moment, there will not be any data written to the serial port untill the 'stop' button is pressed, this then allows the receive data 'loop' to start. The receive loop can not start untill after the first data block sent, not an issue; until you consider that the transmit loop never gets to restart. Think about why you decided to implement the system in this way!
 
I also think that you need to consider that you send a block of data the size of the sound device configuration (default 8192 bytes). It strikes me that it would be easier to attempt to recieve the block as a whole. Read carefully the information on the VISA Read function!
 
Also the default setting for the audio device is 8 bit, but everything inside the code is setup for 16 bit data, this has considerable implications (see everything below and the links previously posted). Perhaps the default setting is correct, perhaps you need to understand the issues on bandwidth and dynamic range etc?
 
Yes it can work for both simultaneous tranmission and reception (Full Duplex) but you will need to make decisions based on some straight forward calculations to arrive at suitable settings. You will also need to remove the 'dependancy' you have created between transmit and receive elements in your code (the transmit data outside of all loops). You should (I hope) be aware of what is required for the calculations that you will need to make and you should consider the information given by the links I provided previously as well.
 
The following link should help if you are not familiar with the concepts involved : -
(sorry the link is to an English language site, but you only need the idea to find information in your own langauge).
 
What I believe to be equivalent is here: -
If you need help with any of the terms or concepts, just drop a post in on this link and I (or others) will be happy to try to explain (although my language skills are restricted to two other languages, sorry).
 
 
0 Kudos
Message 4 of 6
(3,338 Views)
i made some changes in the program could you test it please?
pd: if the parameters are not find just change it. it seems like the program start with the defalt values
thanks for your help
0 Kudos
Message 5 of 6
(3,325 Views)
please could somebody help me? i really need to make it work tomorrow
0 Kudos
Message 6 of 6
(3,280 Views)