Das ist jetzt mein aktuelles Programm
Code:
$regfile = "M32def.dat"                                     ' chip
$crystal = 16000000                                         ' frequenz
$baud = 19200                                               ' baud rate

                                         ' we do not use software emulated I2C but the TWI

Config Scl = Portc.0                                        ' we need to provide the SCL pin name
Config Sda = Portc.1                                        ' we need to provide the SDA pin name


Dim Lowtemp As Byte
Dim Hightemp As Byte
Dim Value As Word      '!!!!!!!
I2cinit


Do

I2cstart
I2cwbyte 144
I2cwbyte &HEE                                'Temperaturmessung anstoßen
I2cstop

I2cstart
I2cwbyte 144
I2cwbyte &HAA                                'Temperaturmessung Lesekommando
I2cstop

I2cstart
I2cwbyte 145
I2crbyte Lowtemp , Ack                       'LSB holen
I2crbyte Hightemp , Nack                     'MSB holen

I2cstop

Value = Lowtemp * 10
If Hightemp = 128 Then
  Value = Value + 5
End If

Print value
' oder LCD value

waitms 500                                         'kurze Pause
Loop


End
Dieses Programm funktioniert glaub ich mal so weit. Die temperatur wir aber ohne Komma angezeigt.
was bedeutet denn das rechnen mit value +5 oder *10?

kann ich das ganze nicht mit hardware twi lösen?
da sind doch die befehle auch kürzer.