I2C silly addressing question
I need to use 2 I2C chips at once (finally) but I can't seem to find
any description on how to set the addresses!
All examples I've seen are single chip and all set the three address
pins low. I'm assuming I'd use a pullup resistor (say 10k) on A0 and
ground the other two to give a chip address of "1" but, A1 for an
address of "2" and A0+A1 for 3, etc. I'm a bit leary about frying a
chip though so can anyone confirm this for me?
Signed Chicken Little.
any description on how to set the addresses!
All examples I've seen are single chip and all set the three address
pins low. I'm assuming I'd use a pullup resistor (say 10k) on A0 and
ground the other two to give a chip address of "1" but, A1 for an
address of "2" and A0+A1 for 3, etc. I'm a bit leary about frying a
chip though so can anyone confirm this for me?
Signed Chicken Little.
Comments
devices. 10K pullups on the address pins work well, once I overlooked
the pullups and just connected the address pins directly to +5V, and the
chip lived to tell the story.
Your addressing logic is correct, pulling A0 up will give the chip an
address of "1", all the way up to pulling all pins up for an address of
"7".
(you may already be aware of this), most I2C pins seem to have the LSB
for the address in the left/top position (depending on how you look at
the chip), while the stamp example code puts the LSB in the rightmost
position, so your code will have the address bits in the "mirror image"
of the pullups on the chip.
All in all, the I2C support is awesome, using 2 pins I can communicate
with an RTC, an ADC, some extra RAM and an LCD...
On Fri, 2002-10-25 at 08:16, ghidera2000 wrote:
> I need to use 2 I2C chips at once (finally) but I can't seem to find
> any description on how to set the addresses!
>
> All examples I've seen are single chip and all set the three address
> pins low. I'm assuming I'd use a pullup resistor (say 10k) on A0 and
> ground the other two to give a chip address of "1" but, A1 for an
> address of "2" and A0+A1 for 3, etc. I'm a bit leary about frying a
> chip though so can anyone confirm this for me?
>
Vss (ground) for a "0." You won't fry anything by connecting directly -- but
the pull-ups are not hurting anything either.
-- Jon Williams
-- Parallax
In a message dated 10/25/02 7:16:59 AM Central Daylight Time,
ghidera2000@y... writes:
> I need to use 2 I2C chips at once (finally) but I can't seem to find
> any description on how to set the addresses!
>
> All examples I've seen are single chip and all set the three address
> pins low. I'm assuming I'd use a pullup resistor (say 10k) on A0 and
> ground the other two to give a chip address of "1" but, A1 for an
> address of "2" and A0+A1 for 3, etc. I'm a bit leary about frying a
> chip though so can anyone confirm this for me?
>
>
[noparse][[/noparse]Non-text portions of this message have been removed]
An RTC, 2 x EEPROM, and a I2C to Parallel chip.
go to http://www.lennard.net.nz/electronics/ad.html#datalogger2
to have a look.
I've had a bit of fun with it over the last 2 days - logging the
temperature in my lounge, light level, and other things.
The code is a mess, but it's not bad for a first attempt.
Menu driven user interface, etc...
cheers,
Ben, Wellington, New Zealand.
--- In basicstamps@y..., "ghidera2000" <ghidera2000@y...>
wrote:
> I need to use 2 I2C chips at once (finally) but I can't seem to
find
> any description on how to set the addresses!
>
> All examples I've seen are single chip and all set the three
address
> pins low. I'm assuming I'd use a pullup resistor (say 10k) on
A0 and
> ground the other two to give a chip address of "1" but, A1 for an
> address of "2" and A0+A1 for 3, etc. I'm a bit leary about frying a
> chip though so can anyone confirm this for me?
>
> Signed Chicken Little.