hi ,
I am confuse with I2c device addresses.
How to assign address to deives which are connected to I2c .
I want to connect 10 microcontrollers to 8051 using I2c.Can anybody help me.
my email id is poonam.kothawade@gmail.com
Most I²C devices have a fixed address but if you are writing the code for all devices you can decide the address of your devices. Just make sure you don't pick the address of any other device that may share the bus.
thank u
so if i want to coonect 10 microcontrollers using i2c then for assigning addresses to them i need to connect 3 (A0A1A2) lines using port pins and how i can make them on ?
i want to send timming on all microcontrollers which is on main RTC
thank u
so if i want to coonect 10 microcontrollers using i2c then for assigning addresses to them i need to connect 3 (A0A1A2) lines using port pins and how i can make them on ?
Like Pommie said, either allocate each address in the software (just a single define at the beginning of the program), or write code to read a number of port pins, and allocate the address based on that value - simple switches (or links) and pull-up resistors. Each method has advantages and disadvantages.
i want to send timming on all microcontrollers which is on main RTC
Using I2C seems a VERY complicated way of doing something so simple? - I2C is for connecting chips together easily on a huge PCB, specifically a TV set originally - and is great for using I2C chips where you have no choice. However, for your requirement a simple serial link is all you need, and only needs one pin not two.
It depends entirely on what you're needing to do, and if it's two way or one way - a very simple method is to chain the serial ports in series, so each device passes the data on to the next.
For I2C all devices simply connect SDA and SCL to the bus lines, with single pullup resistors on each line.