[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4759: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
Open Music Labs Forums • View topic - DATA OUT

DATA OUT

DATA OUT

Postby mechancial » Wed Jun 04, 2014 4:19 pm

Is there a way to get bytes off of the Audio Codec Shield?

I would like to record audio, transcribe to digital, then transmit the digital in sequential packets of 512bytes each.

Input is by microphone ( I made the MIC_VB and IN_L mods ), Arduino UNO.

Has anyone had luck with spi, iic, serial, progmem, sdcard or spdr ?
I've been experimenting with all and habn't found a solution that doesn't crash.

If there's an example out there, getting data off of the board, that'd open a lot more uses.

Thanks!
mechancial
 
Posts: 4
Joined: Wed Jun 04, 2014 11:58 am

Re: DATA OUT

Postby guest » Thu Jun 05, 2014 10:07 am

the easiest should be the uart. if you are only interested in mono, thats 44.1ksps * 16b/sample = 705kbps. the issue here, is that this is not a standard computer baud rate. i think there is some hack to get it to do 1Mbps. this is also faster than i2c can run on most devices. the spi might also be able to do it. how much data do you want to send, and where do you want it to go? for an SD card, a specific library would have to be written.
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: DATA OUT

Postby mechancial » Thu Jun 05, 2014 11:14 am

Thanks for your reply... UART is fine for me; can I write to uart from within the ISR?

Sorry if this is a silly question, I'm a hobbyist. So far everytime I've tried to communicate by serial it kills the ISR...

I've got another arduino board with an SD shield and it's writing packets of 512 bytes of empty data. I can handle populating the array and writing the correct data if I could get it out of the Audio Codec Board.

For UART would I write to pin1 on the Audio Codec Board and read from pin0 on the SDcard board?

Here's my ISR code below, it's based on the buffer example (SIZE = 512).

Very grateful for an example code that would help to get the array out of the audio codec board.





ISR(TIMER1_COMPA_vect, ISR_NAKED) {
AudioCodec_data(&left_in, &right_in, left_out, right_out);
left_out = delaymem[location];
delaymem[location++] = left_in;
if (location >= SIZE) {
for (int counter = 0; counter < SIZE; counter++){
// OUTPUT delaymem[counter];
// SEND TO UART?
}
location = 0; // reset location
}
reti();
}
mechancial
 
Posts: 4
Joined: Wed Jun 04, 2014 11:58 am

Re: DATA OUT

Postby guest » Thu Jun 05, 2014 3:31 pm

you should be able to do that, although first check the write rate of your SD card. fill up a buffer, and time how long it takes to write it to the SD card. or even better, write 10 buffers worth, and see how long that takes. im suspecting there is some downtime between buffers. you can use millis() to measure this time. my concern is that data will come in faster than you can write it out.

also, a special uart routine will need to be written, and i can help with that. the reciever will need to let the transmitter know when it is ready for more data, as it may not be able to handle the max data rate at all times.
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: DATA OUT

Postby mechancial » Thu Jun 05, 2014 7:02 pm

Pulling a single byte or a short chain of bytes from the codec shield would be a nice start.
Is it possible to pull one byte out of the ISR?
At the moment, is there ANY method, or example of extracting data from the shield?

Looking through the forum, it seems several people have hoped to pull data, I wish I could figure it out, I'm 8 hours into testing different methods. Need help.... I believe this is a trivial task for someone who knows how to chat with WM8731.

I'm starting to get the impression that I need to put WM8731 on a breadboard and talk to it directly, which seems to be a big undertaking. I was hoping that the Audio Codec Shield would help to short-cut that.

If there's no existing example, is there a resource that can point me toward someone who can help dump the buffer from the audio codec shield?
mechancial
 
Posts: 4
Joined: Wed Jun 04, 2014 11:58 am

Re: DATA OUT

Postby mechancial » Fri Jun 06, 2014 8:22 am

mechancial
 
Posts: 4
Joined: Wed Jun 04, 2014 11:58 am

Re: DATA OUT

Postby guest » Fri Jun 06, 2014 11:10 am

guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: DATA OUT

Postby guest » Wed Jun 11, 2014 9:07 pm

guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm


Return to Audio Codec Shield

Who is online

Users browsing this forum: No registered users and 2 guests


cron