It worked for quite some time when I connected the probe but now it is not working either if I connect to scope or not. So how shall I debug this?I am getting constant values like 917504 and these values stop coming from the serial port after some time. The serial port gets stuck but the ISR keeps running (as I am blinking an led on pin13). Please let me know.
But there is some other problem. Right now I am getting only 16 bits.I might have to add some more lines in the SPI to get two 16 bits (i.e 32 bits in total for two 16 bit values like lin and rin). My main loop stops spitting out serial port values but he ISR still runs.
- It is currently Thu Jan 26, 2023 7:26 pm • All times are UTC - 8 hours [ DST ]
[SOLVED]Audio codec shield with Arduino Due
Re: Audio codec shield with Arduino Due
can you post your SPI code?
i wouldnt use the serial port at all at this point. it just makes it more dfficult. just do a loopback test to see if it works (rout = rin, etc). also, it stops working if the clock gets out of sync. so make sure that the timer/counter block is working properly. its possible its off by just a bit, goes in and out of sync.
i wouldnt use the serial port at all at this point. it just makes it more dfficult. just do a loopback test to see if it works (rout = rin, etc). also, it stops working if the clock gets out of sync. so make sure that the timer/counter block is working properly. its possible its off by just a bit, goes in and out of sync.
- guest
- Site Admin
- Posts: 449
- Joined: Thu May 20, 2010 11:58 pm
Re: Audio codec shield with Arduino Due
I could not match the timing for 44khz,22khz but at 8 khz I am able to match the timing. I am getting the scope plots as below but stil I am not getting any output.
- IMG_20150803_121533.jpg (174.36 KiB) Viewed 22068 times
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Re: Audio codec shield with Arduino Due
Now I am getting clean values. The problem was that the clock of the codec was at 11mhz and not at 5.5Mhz. Some how the clock was not getting set to 5.5Mhz although you mentioned earlier that that should be the clock.
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Re: Audio codec shield with Arduino Due
I change to 16BIT SPI on the due and I am getting nice plots.
- IMG_20150803_141020.jpg (112.9 KiB) Viewed 22068 times
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Re: Audio codec shield with Arduino Due
excellent, glad its working. i will look into the 11MHz thing.
- guest
- Site Admin
- Posts: 449
- Joined: Thu May 20, 2010 11:58 pm
Re: Audio codec shield with Arduino Due
also, have you tuned your scope probes? there seems to be a lot of ringing in those plots. it could be the circuit, or the probes. there should be a square wave source on the scope that you can connect the probe to, and then turn the small trimmer till the ringing goes away.
- guest
- Site Admin
- Posts: 449
- Joined: Thu May 20, 2010 11:58 pm
Re: Audio codec shield with Arduino Due
No I did not tune the probes but it is working great now. Thank you for your support.
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Who is online
Users browsing this forum: No registered users and 1 guest