Ich habe das Word-Dokument aus Sicherheitsgründen mal in AB-Edit geöffnet. Du solltest den Code hier einfach reinsetzen...
Code:
'Quarz an / Teiler aus / Jtag aus
$regfile = "m8535.dat"
$crystal = 8000000
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portb.5 , Db5 = Portb.4 , Db6 = Portb.3 , Db7 = Portb.2 , E = Portb.1 , Rs = Portb.0
Config Lcdbus = 4
Config Date = Dmy , Separator = .
Config Clock = Soft
Date$ = "21/10/07"
Time$ = "19:15:00"
Do
Gosub Uhr
Loop
Uhr:
Cls
Locate 1 , 5
Lcd Date$
Locate 2 , 1
Lcd Time$
Return
Ich würde es z.B. so machen:
Code:
'Quarz an / Teiler aus / Jtag aus
$regfile = "m8535.dat"
$crystal = 8000000
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portb.5 , Db5 = Portb.4 , Db6 = Portb.3 , Db7 = Portb.2 , E = Portb.1 , Rs = Portb.0
Config Lcdbus = 4
Config Date = Dmy , Separator = .
Config Clock = Soft
Date$ = "21/10/07"
Time$ = "19:15:00"
dim Secalt as byte
cls
Do
Gosub Uhr
Loop
Uhr:
if secalt <> _sec then
Locate 1 , 5
Lcd Date$
Locate 2 , 1
Lcd Time$
secalt = _sec
end if
Return
Lesezeichen