Witam. Mam taki problem. Napisa³em krótki programik podaj±cy adres uk³adu I2C. Z uk³adem PCF8583 dzia³a prawid³owo ale jak podepne DS1307 niewidzi go. Niewiem ju¿ w czym mo¿e tkwiæ problem. Mo¿e jako¶ pomo¿ecie?
'------------------------------------------------------------------------------- ' DS1307.BAS ' Moje ds1307 clock on the Mega16 futurlec board '------------------------------------------------------------------------------- $regfile = "m16def.dat" $lib "I2C.LBX" $lib "Ds1307clock.lib" $crystal = 8000000
'***LCD*** Config Lcdbus = 4 Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = Portd.2 , Db5 = Portd.3 , Db6 = Portd.4 , Db7 = Portd.5 , E = Portd.1 , Rs = Portd.0
Config Sda = Portb.1 Config Scl = Portb.0 Config I2cdelay = 100
Dim Adres As Byte Dim Adres2 As Byte
Lcd "Start poszukiwania" Adres2 = 0 Cls Lcd "Start" Cls For Adres = 0 To 254 Step 2 I2cstart I2cwbyte Adres I2cstop
If Err = 0 Then Lcd "uklad pod: " ; Adres Adres2 = Adres Else Cls Lcd "Brak ukladu: " ; Adres End If Waitms 500 Next Adres Cls Lcd "uklad pod " ; Adres2 Waitms 500 Lowerline Lcd "Koniec" Cursor Off End