Witam! Ponownie poruszę temat obsługi TWI, procek to atmega32. Jak wiadomo flagę TWINT kasujemy poprzez wpisanie logicznej jedynki. Jest ona ustawiana sprzętowo, a czy jest możliwość ustawienia jej programowo, hmm... poprzez ustawienie logicznego zera? Do czego zmierzam, w datasheecie (strona 184) odnoście wysyłania danych tuż po wysłaniu adresu i trybu slave'a jest napisane:
Cytuj:
"When SLA+W has been successfully transmitted, a data packet should be transmitted. This is done by writing the data byte to TWDR. TWDR must only be written when TWINT is High. If not, the access will be discarded, and the Write Collision bit (TWWC) will be set in the TWCR Register.
Czyli chcąc spełnić to założenie, jeśli się da ustawić programowo TWINT to przed wpisaniem danych do TWDR dobrze by było to zrobić. A jeśli się nie da to pozostaje kontrola TWWC?