Товарищи, помоги разобраться с AVR315 по работе с i2c.
Почему в обработчике прерывания TWI нет никакой реакции на событие START? Как тогда начинается передача SLA+R/W
ISR (TWI_vect)
{
static unsigned char TWI_bufPtr;
switch (TWSR)
{
case TWI_START: // START has been transmitted
case TWI_REP_START: // Repeated START has been transmitted
TWI_bufPtr = 0; // Set buffer pointer to the TWI Address location
case TWI_MTX_ADR_ACK:
......
default:
TWI_state = TWSR; // Store TWSR and automatically sets clears noErrors bit.
// Reset TWI Interface
TWCR = (1<<TWEN)| // Enable TWI-interface and release TWI pins
(0<<TWIE)|(0<<TWINT)| // Disable Interupt
(0<<TWEA)|(0<<TWSTA)|(0<<TWSTO)| // No Signal requests
(0<<TWWC);
}