Previous in Forum: ETAP 7.0   Next in Forum: Edison vs Tesla
Close
Close
Close
6 comments
Rate Comments: Nested
Anonymous Poster #1

An I2C with Codec Problem

03/25/2013 11:05 AM

Hi all,

I am currently programming a codec with I2C using a microcontroller. Now when I am sending the data, the Audio Codec IC recieves the data successfully, but when I am reading what I have sent to the codec I recieve a wrong byte. Also it seems that the byte I send is irrellevant, since I always read from the IC the same value. What do you think its happening?

Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1639
Good Answers: 73
#1

Re: An I2C with Codec Problem

03/25/2013 12:49 PM

Are you using a security (non-copy) protocol?

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Reply
Member

Join Date: Mar 2013
Posts: 8
#2
In reply to #1

Re: An I2C with Codec Problem

03/25/2013 1:18 PM

No Just using normal I2C. In some registers I can write data and then when I read the slave(codec) I find the sent data which is good! but in other registers, the sent data is not the same as that of the reply done by the slave, ie the register is stored with a wrong value. But the value seems to be always the same as if it does not change, but in the datasheet nothing is mentiones :/

Reply
Power-User

Join Date: Aug 2008
Location: Melbourne, Australia
Posts: 476
Good Answers: 32
#3
In reply to #2

Re: An I2C with Codec Problem

03/25/2013 10:23 PM

What Codec are you using?

Which registers are changing and which are not?

__________________
johny451
Reply
Member

Join Date: Mar 2013
Posts: 8
#4
In reply to #3

Re: An I2C with Codec Problem

03/26/2013 4:29 AM

ADAV803

http://www.analog.com/static/imported-files/data_sheets/ADAV803.pdf

Reply
Power-User

Join Date: Aug 2008
Location: Melbourne, Australia
Posts: 476
Good Answers: 32
#6
In reply to #4

Re: An I2C with Codec Problem

03/26/2013 7:16 PM

It would be helpful if you had access to a logic analyser or at worst a 2 channel CRO. Check your setup timing carefully. They indicate setup times over a uS in some cases. Have you successfully used I2C to talk to other devices or is this the first time on this platform?

__________________
johny451
Reply
Guru
Hobbies - Musician - New Member Greece - Member - New Member

Join Date: Mar 2007
Location: Greece / Athens
Posts: 722
Good Answers: 28
#5

Re: An I2C with Codec Problem

03/26/2013 6:35 AM

Be sure about the proper h/w implementation of the I2C interface. However, this should not be the case, as you succesfully access some of the registers. Are you using the "Block Read & Write" method? Take a look on this issue in the I2C section of the datasheet. Probably, you don't actually access the proper registers (i.e. proper addresses), as you might think so.

__________________
George
Reply
Reply to Forum Thread 6 comments
Copy to Clipboard

Users who posted comments:

G.K. (1); Johny451 (2); NotUrOrdinaryJoe (1); sgal0027 (2)

Previous in Forum: ETAP 7.0   Next in Forum: Edison vs Tesla

Advertisement