Go Down

Topic: multiple i2c devices? (Read 618 times) previous topic - next topic

borntokillyou

Hi I'm doing my school final year project. is there anyway to connect 2 i2c busses to the arduino uno, because i do not have enough ports. I need to connect an xbee shield and gsm module. any advice?

Nick Gammon

http://www.gammon.com.au/i2c
http://www.gammon.com.au/electronics

PaulS

Quote
is there anyway to connect 2 i2c busses to the arduino uno, because i do not have enough ports. I need to connect an xbee shield and gsm module.

Neither the gsm module (usually) or the XBee are I2C devices. What are the I2C devices that will be connected to the two buses?

Nick Gammon


Hi I'm doing my school final year project. is there anyway to connect 2 i2c busses to the arduino uno ...


You can connect 119 I2C devices to the one bus. Is that what you mean?
http://www.gammon.com.au/electronics

giuseppeurso

I think Nick means 'Phisically' wiring.
I'm wondering same thing as i'm in the need.
thanks for answers
Ciao!

Nick Gammon

You can connect them together, physically, and address them individually. What is the problem, exactly?

http://www.gammon.com.au/electronics

CrossRoads

Only 119? I thought the 7 address bits allowed for 128.  Are there some global addresses committed or something?

Xbee, GSM, those both need serial ports, don't they?
You can add an external dual UART for more comms.
NXP SC16C752 for example
http://www.nxp.com/products/interface_and_connectivity/uarts/two_channel/#products
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Nick Gammon


Only 119? I thought the 7 address bits allowed for 128.  Are there some global addresses committed or something?


Zero is reserved for broadcasting.

120 to 127 are reserved. However I can't find the supporting documentation at present. I guess they are reserving them so one day 120 could be used for extended addressing (eg. 120 + 1) could be used as 121, (120 + 2) could be used for 122 and so on. That would give you another 120 or so addresses.


Reading on, in this document: http://www.nxp.com/documents/user_manual/UM10204.pdf

There may be even more addresses reserved. Page 17 of that document lists them.

It looks like 0 to 7 are also reserved for the purposes documented there (0 being the broadcast address).

Plus 120 to 127 are reserved.
http://www.gammon.com.au/electronics

Go Up