Also ich benutze die Lib von Peter Fleury... So wie ich das sehe, ist er auf 100KHz eingestellt.
Code aus der i2cmaster.s
Sehe ich das richtig, das ich nur folgende Zeilen ändern muss:Code:.section .text ;************************************************************************* ; delay half period ; For I2C in normal mode (100kHz), use T/2 > 5us ; For I2C in fast mode (400kHz), use T/2 > 1.3us ;************************************************************************* .stabs "",100,0,0,i2c_delay_T2 .stabs "i2cmaster.S",100,0,0,i2c_delay_T2 .func i2c_delay_T2 ; delay 5.0 microsec with 4 Mhz crystal i2c_delay_T2: ; 4 cycles rjmp 1f ; 2 " 1: rjmp 2f ; 2 " 2: rjmp 3f ; 2 " 3: rjmp 4f ; 2 " 4: rjmp 5f ; 2 " 5: rjmp 6f ; 2 " 6: nop ; 1 " ret ; 3 " .endfunc ; total 20 cyles = 5.0 microsec with 4 Mhz crystal
um auf 10KHz umzustellen?Code:.stabs "",100,0,0,i2c_delay_T2 .stabs "i2cmaster.S",100,0,0,i2c_delay_T2
Nutze im mom 4,7KOhm Widerstände, meinste die sind zu groß?
LG Hannes
//edit:
Habs jetzt mal folgendermaßen probiert:
Trozdem das selbeCode:.stabs "",10,0,0,i2c_delay_T2 .stabs "i2cmaster.S",10,0,0,i2c_delay_T2







Zitieren

Lesezeichen