tyassin
Advanced Member level 1
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.
Thank you
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