That's not a problem... learning opportunuities.
USE I2CWRITE with the same settings as I2CREAD should work
you just need to test your pushbbuton...
Code:
lcdout $fe,1 ' Obrisi displej
lcdout $fe,2 ' Prvi red prvi karakter
lcdout "Time: ", hex(H),":", hex(M)," ", hex(S)
lcdout $fe,$c0 ' Drugi red, prvi karakter
lcdout "Date: ", hex(D),".", hex(Mn),".20",hex(Y)
'<== Here
Pause 500
goto Main ' Ponovi sve
but certainely better if you use something like
Code:
lcdout $fe,1 ' Obrisi displej
lcdout $fe,2 ' Prvi red prvi karakter
lcdout "Time: ", hex(H),":", hex(M)," ", hex(S)
lcdout $fe,$c0 ' Drugi red, prvi karakter
lcdout "Date: ", hex(D),".", hex(Mn),".20",hex(Y)
While Delay<5000 ' Delay loop of 500 mSec
' Select case pushbutton and set/hour time here+I2CWRITE
' if there's no push button pressed Do a PAUSEUS 100 and increment
' Delay Variable.
'
'
Wend
goto Main ' Ponovi sve
yeah just an idea. not everything on a plate and you'll have to do some homework around the above.
Bookmarks