I'm never use TWI before, except tiny bit-banging nighty builds. I now need to program TWI eeprom from my atmega32A using dedicated h/w TWI engine. I carefully read TWI section in doc8155.pdf, but unfortunately this particularly section not contains working example (unlike USART section, etc., which completely well described). Ideally i search for complete working example in assembler, but at least can you please show me where search for these:
Q1. Many dual-purpose pins is exactly known where to be redefined, like USART rxd/txd; but not TWI: i can't find when exactly these pins lost their GPIO functionality and overriden to TWI hardware and becomes open-collector i/o (and in reverse order: TWI o/c i/o -> GPIO).
Q2. Is there atmega's TWI initialization (and finalization) sequence is standardised by Atmel or no? Where i can read about it?
Q3. Is there any assembler example to set SCK baud rate?
PS. Sorry, i can't understand in C code.