Transmitting PCM audio

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not sure if this is the appropriate forum to post in, but I'm working on a project where I'm wanting to transmit PCM G.711 audio between two microcontrollers. I have experience with the ATMega2560 and used a XBee module to wireless transmit between microcontrollers.

 

Would a microcontroller like the ATMega2560 be capable of transmitting PCM audio? I figured it might not be since the specs might be too limiting in order to do what I want. I've tried researching this online and I've struggled to find a definitive answer. And if possible, would I need to implement code utilizing a protocol specialized for audio like I2S? I've used UART for transmitting data and it seems that UART wouldn't be able to handle audio data.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

sublime wrote:
it seems that UART wouldn't be able to handle audio data

What makes you say that?

 

I guess it depends on what, exactly, you mean by, "audio data" ...

 

G.711 is just plain telephone "toll quality":

 

  • Sampling frequency 8 kHz
  • 64 kbit/s bitrate (8 kHz sampling frequency × 8 bits per sample)

https://en.wikipedia.org/wiki/G.711#Features 

 

Should be no problem getting that over a UART.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

sublime wrote:

it seems that UART wouldn't be able to handle audio data

 

What makes you say that?

 

I guess it depends on what, exactly, you mean by, "audio data" ...

 

G.711 is just plain telephone "toll quality":

 

  • Sampling frequency 8 kHz
  • 64 kbit/s bitrate (8 kHz sampling frequency × 8 bits per sample)

https://en.wikipedia.org/wiki/G.711#Features 

 

Should be no problem getting that over a UART.

 

 

Ah, I see. That solves one of my worries.

 

Would I be able to continuously stream through Bluetooth or XBee? I've read that both send data through packets but doing so continuously would be too resource intensive. I'm not sure if there's another alternative to continuously stream data.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

So long as the time to transmit one packet is less than the update time for the data in the packet, you should be OK. Problem comes if you are slower. You would, of course, need to buffer the packet on the receive end so that the receiver can dole out the data while a new packet is coming in. Maybe 2 parallel (eg, "ping-pong") buffers.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah, okay that makes sense. I'll have to look into that more and figure out how to implement the code for that. Thanks!