سلام
من پروژه زیر رو ساختم تو شبیه ساز پروتئوس کار می کنه ولی توی عمل جواب نمی ده
[PHP]$regfile = "m8def.dat"
$crystal = 8000000
Config Lcdpin = Pin , Db4 = Portb.2 , Db5 = Portb.3 , Db6 = Portb.4 , Db7 = Portb.5 , E = Portb.0 , Rs = Portb.1
Cursor Off
'************************************************* ******************************
Config Sda = Portb.7
Config Scl = Portb.6
'************************************************* ******************************
Dim S As Byte
Dim M As Byte
Dim H As Byte
Dim D As Word
Dim Y As Word
Dim Mo As Word
Dim W As Word
'************************************************* ******************************
Do
I2cstart
I2cwbyte &HD0
I2cwbyte 0
I2cstart
I2cwbyte &HD1
I2crbyte S , Ack
I2crbyte M , Ack
I2crbyte H , Ack
I2crbyte W , Ack
I2crbyte D , Ack
I2crbyte Mo , Ack
I2crbyte Y , Nack
I2cstop
'************************************************* ******************************
S = Makedec(s) : M = Makedec(m) : H = Makedec(h)
D = Makedec(d) : Mo = Makedec(mo) : Y = Makedec(y)
Y = 2000 + Y
'************************************************* ******************************
Home
Lcd H ; ":" ; M ; ":" ; S ; " "
Home L
Lcd Y ; "/" ; Mo ; "/" ; D ; " "
Loop
End 'end program[/PHP]روی ال سی دی
165:165:165
نمایش می ده
میشه راهنمایی کنید ممنون