Bekomme leider immer noch folgendes:
1:23:8 statt 01:23:08
was um himmels willen mache ich falsch?!?
Und wie kann ich die Strings in einen großen packen???
Das mit dem $baud ist mir bewusst ich bin grad nur an einer Demo und da hab ich es mir erlaubt das wegzulassen.
PS: Mein aktueller Source:
Code:$regfile = "m128def.dat" $crystal = 16000000 $baud = 9600 Config Timer1 = Timer , Prescale = 256 Enable Timer1 On Timer1 Tini Enable Interrupts Dim Tresult As String * 8 Dim Dresult As String * 8 Dim D1 As String * 2 Dim D2 As String * 2 Dim D3 As String * 2 Dim Year As Byte Dim Month As Byte Dim Day As Byte Dim Hour As Byte Dim Minute As Byte Dim Second As Byte minute = 58 Do '....Hauptprogramm Loop End Tini: Timer1 = 3036 Second = Second + 1 If Second = 60 Then Gosub Addminute If Minute = 60 Then Gosub Addhour If Hour = 24 Then Gosub Addday If Day = 30 Then Gosub Addmonth If Month = 12 Then Gosub Addyear D1 = Format(str(second) , "00") D2 = Format(str(minute) , "00") D3 = Format(str(hour) , "00") Print Hour ; ":" ; Minute ; ":" ; Second ' Tresult = Hour + ":" + Minute + ":" + Second ' Print Tresult Return Addminute: Minute = Minute + 1 Second = 0 Return Addhour: Hour = Hour + 1 Minute = 0 Return Addday: Day = Day + 1 Hour = 0 Return Addmonth: Month = Month + 1 Day = 0 Return Addyear: Year = Year + 1 Month = 0 Return







Zitieren

Lesezeichen