Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

starting with I2C for two controllers - need example code

Status
Not open for further replies.

yviswanathbe

Full Member level 4
Joined
Jun 14, 2007
Messages
221
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,298
Activity points
3,066
regarding i2c

Dear Friends,

I have 2 microcontrolles Atmega16 and Atmega8 connected in I2C configuration.
and RTC DS1307 also sharing I2C connection.
Master is Atmega16 and
remaining two are slaves.

I have done interfacing using I2C between Controller and RTC,bt i dint do for two controllers.DS1307 will have its own address for communicating on I2C,bt what is the address of the controllr?

Can any body share me how to start with I2C for two controllers?
Please sugest me with some example code for Master-Slave communication.

Thanks & Regards,
Y.Viswanath.
 

Re: regarding i2c

The device datasheets are fairly indepth as to this info. You set you slave address in the TWAR register.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top