witam mam panel z przyciskami wpietymi w 2 pfc8574 jeden ma adres 32 a drogi 36 (tak wnioskuje z nog zwartych do masy lub do 1) chce sobie podsluchac co ten proceor wysyla do jakiegos tam urzadzenia i napislem sobie progrm oparty o komende I2creceive
listing :
czy taki program nie bedzie "zabieral" danych ktore che podsluchac docelowemu procesorowi ? czy program jest napisany wmiare poprawnie?[/code]
listing :
Code:
Dim A As Bit
Dim C As Bit
Dim D As Bit
Dim E As Bit
Config Sda = P0.1
Config Scl = P0.0
Dim Value1 As Byte
Dim Value2 As Byte
Do
I2creceive 32 , Value1
If Value1 = 1 Then
End If
If Value1 = 2 Then
End If
If Value1 = 4 Then
End If
If Value1 = 8 Then
End If
If Value1 = 128 Then
End If
If Value1 = 64 Then
End If
If Value1 = 32 Then
End If
If Value1 = 16 Then
End If
I2creceive 36 , Value 2
If Value2 = 1 Then
End If
If Value2 = 2 Then
End If
If Value2 = 128 Then
End If
Loop
End
czy taki program nie bedzie "zabieral" danych ktore che podsluchac docelowemu procesorowi ? czy program jest napisany wmiare poprawnie?[/code]