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.

[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,802
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top