Код
$regfile = "m8def.dat"
$crystal = 8000000
$hwstack = 32
$swstack = 10
$framesize = 40
$lib "i2c.lbx" '
Config Lcdpin = Pin , Rs = Pinc.3 , E = Pind.6 , Db4 = Pinc.0 , Db5 = Pinc.1 , Db6 = Pinc.2 , Db7 = Pind.7
Config Lcd = 16 * 2
Cls
Lcd "Test lcd"
Waitms 800
Cls
Config Sda = Portc.4 ' I2C Data
Config Scl = Portc.5 ' I2C Clock
Config Twi = 100000
Twbr = 12
'Twsr = 0
I2cinit
Const Ad7746w = &H90
Const Ad7746r = &H91
Dim Highb As Byte , Midb As Byte , Lowb As Byte , ' Wert As Word At Highb Overlay
Dim I As Byte
Do
I2cstart
I2cwbyte Ad7746w
I2cwbyte &H91
I2cstop
I2cstart
I2cwbyte Ad7746r
I2crbyte Highb , Ack
I2crbyte Midb , Ack
I2crbyte Lowb , Nack
I2cstop
Locate 1 , 2
'Lcd "Wert: " ; Wert
Locate 2 , 1
Lcd Highb ; " " ; Midb ; " " ; Lowb
'Locate 2 , 6
Waitms 500
Loop
End
На экран выдает 255... Может кто работал с такой микрухой