[SOLVED] AVR TWI Module interrogation of several Slaves devices

Status
Not open for further replies.

tyassin

Advanced Member level 1
Joined
Jul 22, 2004
Messages
467
Helped
86
Reputation
170
Reaction score
41
Trophy points
1,308
Activity points
3,804
Hello,

I am using an AVR uP with TWI module. I have one master device and several slaves which are also AVR uP with the TWI module.
I am interested in having the master interrogating each slave in turn. So I would like a function where the slaves will do nothing until the master has interrogated them. My question is will the below sentence do that.
Code:
TWCR = (1<<TWEA) | (1<<TWEN);
    
      while (!(TWCR & (1<<TWINT)));

Thank you
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…