Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

I2C again

I2C again

2007-07-01 by Dave VanHorn

Ok, before I start banging on this again..

I have the Devantech sonar connected, verified per docs that SDA and
SCL are connected to the right pins on the M128, and they are pulled
high, and that the scope sees valid high and low levels. 

I have the code that IMHO should start a ping, but I'm not getting an
ACK to the slave address.   I start the bus, I send E1 (E0 ID + 1 bit
for write) with ACK requested, and what I see on the bus is E1
followed by a high bit, which means NAK.   It's as if the sonar
dosen't hear me.
I also tried it on the  broadcast address 00, which gives me the same
result.

Tired different speeds, noticing that the devantech docs don't say
what speed to use.

Any ideas?

Re: [AVR-Chat] I2C again

2007-07-01 by John Samperi

At 03:30 AM 2/07/2007, you wrote:
>it's as if the sonar dosen't hear me.

Does the TWI driver work ok with ANYTHING yet? Is there something (links??)
to set the address of the device?

Ca you get a DS1307 RTC chip (easily available) and test the driver with that?

Or post a link to the device you want to use so that we can have a 
pip? (Not a ping :-) )

>Tired different speeds, noticing that the devantech docs don't say
>what speed to use.

It "SHOULD" work with 100KHz TWI.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.9.14/882 - Release Date: 30/06/2007 3:10 PM

Re: [AVR-Chat] I2C again

2007-07-01 by David VanHorn

On 7/1/07, John Samperi <samperi@ampertronics.com.au> wrote:
> At 03:30 AM 2/07/2007, you wrote:
> >it's as if the sonar dosen't hear me.
>
> Does the TWI driver work ok with ANYTHING yet?

This is the only I2C device I have, so I don't know.
I have several, but they all act the same.

>Is there something (links??)  to set the address of the device?

I'm supposed to be able to set it by I2C commands, no links.
It should respond to $00, and $E0 as shipped.


> Ca you get a DS1307 RTC chip (easily available) and test the driver with that?

Not so easy here. If it's not at Radio Shack, it's a no-go at this point.

> Or post a link to the device you want to use so that we can have a
> pip? (Not a ping :-) )

http://www.robot-electronics.co.uk/htm/srf08tech.shtml

> >Tired different speeds, noticing that the devantech docs don't say
> >what speed to use.
>
> It "SHOULD" work with 100KHz TWI.

One would think so.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.