I have a problem concerning TWI and interrupts in general and i seems that I am unable to solve it and I am running out of ideas.
This is what I am trying to do:
I have two PCB and each of them has an Atmega32. These to MCUs have to talk to each other by TWI. I have a regular clock and on every pulse I try to send data from one of the MCUs(the Master device). The clock is interrupt driven (Timer1). So is the TWI.
The TWI sends data during the timer interrupt. IS THIS CORRECT?
When I use the step mode of driving the master in AVRStudio it seems to be sending the data, but the slave receives nothing. What is more, the master always receives ACK from the slave!!!!!!
Does anyone have an idea what could be wrong?