[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/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 - [SOLVED]Audio codec shield with Arduino Due
Page 10 of 12

Re: Audio codec shield with Arduino Due

PostPosted: Fri Jul 31, 2015 11:09 am
by guest
you are getting closer. the scope shots show the problem - the SS pin is toggled too early. you are correct that the SS should be the LRC and the SCK the BCK in the WM8731 datasheet pictures. try to replicate what i did for the maple, and then check the scope again and see what happens. basically, do the following:

set SS high
transfer first data packet on SPI
set SS low

Re: Audio codec shield with Arduino Due

PostPosted: Fri Jul 31, 2015 9:42 pm
by youthreewire
First data packet means a byte or a bit. Because I am thinking that it is first bit, I already tried to make it low after the first byte but I did not get any data.

Re: Audio codec shield with Arduino Due

PostPosted: Fri Jul 31, 2015 10:25 pm
by youthreewire

Re: Audio codec shield with Arduino Due

PostPosted: Sat Aug 01, 2015 1:29 am
by youthreewire

Re: Audio codec shield with Arduino Due

PostPosted: Sat Aug 01, 2015 2:52 am
by youthreewire
I am getting this graph.As you can see the yellow peak now overlaps with the green peak.Not at the cycle of the rising edge but just at the falling edge. Is this graph right or should I change something more?
IMG_20150801_151815.jpg
IMG_20150801_151815.jpg (197.55 KiB) Viewed 21424 times

"lout" reads as 0 and "lin" reads a constant 917504 .What shall I do now?

Re: Audio codec shield with Arduino Due

PostPosted: Sat Aug 01, 2015 4:05 am
by youthreewire
I tried now again and I get these values (it is either of these 3 or 4 values).
serial values.jpg
serial values.jpg (42.5 KiB) Viewed 21424 times

Re: Audio codec shield with Arduino Due

PostPosted: Sat Aug 01, 2015 4:11 am
by youthreewire
I am getting some thing on the "lin" and "rin" but it is always a number starting with 91000 and I think it might be because these integer variables in Due are 32 bit but the values read from the codec are 16 bit. Could you please give your opinion on this.
lin and rin.jpg
lin and rin.jpg (70.41 KiB) Viewed 21424 times

Re: Audio codec shield with Arduino Due

PostPosted: Sat Aug 01, 2015 4:19 am
by youthreewire
When I am making noise before the mic these values are changing but I now have to see if they can be set to 16 bit. I did lout=lin and rout=rin but I do not get an echo back. Now I have declared these integers as short int which means 16 bit but the ISR gets stuck if I used short int. I do not know how to get an echo now. Could you test my code if you have a Due?

Re: Audio codec shield with Arduino Due

PostPosted: Sat Aug 01, 2015 4:58 am
by youthreewire
WIERD thing, When I connect the oscilloscope probes to tap the SCK and SS pin I get the mic values responding to sound and additionally if I change the sensitivity (by pressing a button) on the probe I also get an echo back on one of the speakers of the headphone.Now when I remove the probes I just constant values 917504. What could be the problem?

Re: Audio codec shield with Arduino Due

PostPosted: Sat Aug 01, 2015 11:22 pm
by guest
that oscilloscope shot looks good.

so, if i understand correctly, it works when the scope is connected, but not elsewise? if so, first - congratulations on getting it working, but second, it must be ringing on the lines messing things up. put a 10pF capacitor where you had the scope probe and see if it makes it work.