[En-Nut-Discussion] TWI Initialisation

Peter Sodermanns peter.sodermanns at aixcon.de
Tue Feb 7 15:44:46 CET 2006


Harald,

this is the call of TwMasterTransact:

  data_to_RTC[0] = 0x55;
  result = TwMasterTransact(0x6F, data_to_RTC, 1, 0, 0, 1000);
  printf_P(PSTR("TwMasterTransact MasterError = %d, result = %d\n"), 
TwMasterError(), result);

I want to read a realtime clock ISL1208 (therefor your sample x12rtc.c 
is exactly what I need), but so far there are only the 2 pullup's connected.
So I expect to see the start edge and the transmission of the slave 
address. And those pullup's aren't the smartest guys, having no idea how 
to send an ACK, so TIMEOUT is ok.
But the problem is that I can't see any signals at the output pins with 
my oscilloscope.
Is there some initialisation missing, have any other registers in 
ATmega128 to be set to enable TWI?


Regards,
             Peter


P.S.:

With installing V 4.0.2 I had some problems:
First, make stopped at not finding irqstack.c
I found the file in nut\arch\avr\dev and copied all those c-files into 
nut\dev.
Second stop at irqreg.c which is completely missing. I had to take it 
from my older V 3.9.1.
I know this is a "bad" solution but it works. What am I to change to get 
the "good" solution?




More information about the En-Nut-Discussion mailing list