Also, ich habe das Programm mit Bascom geschrieben. MIttlerweile habe ich auch ein bisschen weitergemacht, so dass es jetzt keinen Taster, der noch was macht, gibt.
Es ist auch noch nicht fertig.
Aber das "Waitms 10000" kommt nur an einer Stelle vor und es sind immer 13 - 15s, statt 10s!!
Hier der Code:
Code:$regfile = "m32def.dat" $framesize = 32 $swstack = 32 $hwstack = 32 $crystal = 16000000 Config Watchdog = 32 Config Porta.0 = Output Config Porta.1 = Output Config Porta.2 = Output Config Porta.3 = Output Config Porta.4 = Output Config Porta.6 = Output Config Pina.7 = Input Porta.7 = 1 Porta.0 = 1 Porta.1 = 1 Porta.2 = 1 Porta.3 = 1 Porta.4 = 1 Porta.6 = 0 Dim A As Byte Dim B As Byte Dim C As Byte Dim D As Byte Dim E As Byte A = 0 B = 0 C = 0 D = 0 E = 0 Do Waitms 10000 If A = 5 Then A = 0 Porta.0 = 1 Porta.1 = 1 Porta.2 = 1 Porta.3 = 1 Porta.4 = 1 If B = 9 Then B = 0 End If Else A = A + 1 End If If A = 0 Then End If If A = 1 Then Porta.0 = 0 End If If A = 2 Then Porta.1 = 0 End If If A = 3 Then Porta.2 = 0 End If If A = 4 Then Porta.3 = 0 End If If A = 5 Then Porta.4 = 0 End If Loop Until Pina.7 = 0 End
Was macht den ein Quarz, wenn er keine Zeitintervalle misst?
Danke,
Thomas







Zitieren
Lesezeichen