Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Did I cook the I2C lines ?

Status
Not open for further replies.

zkt_PiratesDen

New Member
I`m using a pic16f87 to control tda7439 (datasheet) sound processor chip.**broken link removed**
The tda calls for control via the I2C buss. It was easier write test code in Mbasic than use the pics I2C registers. The code was verified to satisfy the tda`s timing and data reguirements in the Mbasic debugger.( it outta work). And for that matter it did. It successfully switched the tda`s mux input selector a few times. Repeated atrtempts to switch the mux have failed. In the process of trying to figure out why, I noticed that i had overlooked changing the pic`s scl and sda lines to inputs during the time that the tda sends the acknowledgement pulse.
"4.4 Acknowledge
The master (浵P) puts a resistive HIGH level on the SDA line during the acknowledge clock pulse (see fig.
15). The peripheral (audio processor) that acknowledges has to pull-down (LOW) the SDA line during this clock pulse."
Would someone more versed in hardware please refer to page 16, fig.30, (the hardware structure of the sda pin) and comment on whether or not the tda chip has been damaged ?
much thanks (its real pain soldering wires to a so28)
 
You've basically connected two output pins together, so both will have fought to control the SDA line - the TDA ones though are open-collector (as I2C requires), so it's only a problem if the PIC SDA pin was set HIGH at the same time?. What is the spec of the TDA pins?, a PIC can provide about 30mA of current - it's unlikely to have damaged the PIC.
 
BUS INPUT (tda)
VIL Input Low Voltage 1 V
VIH Input High Voltage 3 V
IIN Input Current VIN = 0.4V -5 0 5 µA
VO Output Voltage SDA Acknowledge IO = 1.6mA 0.4 0.8 V

The last bit of all 3 words send on sda was a zero so the sda line would have been low. (unless I hit the wrong keyboard key. and thats certainly been known to happen)
the pic is ok -scope shows clock
so the tda is ok ? and something else whet wrong ?
 
But:
It was easier write test code in Mbasic than use the pics I2C registers. The code was verified to satisfy the tda`s timing and data reguirements in the Mbasic debugger.( it outta work). And for that matter it did. It successfully switched the tda`s mux input selector a few times.
So unless I inadvertantly changed the code it outta still work.
Guess the best thing to do is slow the data rate trransfer down slow enought to see the transitions on the scope and look for the tda`s ack pulse. Much easier than soldering up a new chip.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top