Nie chce zakładać owego tematu wiec napisze w starym.Napisałem taki soft do zegarka miałem pod ręka tylko polski help do bascoma i soft do innego zegarka tylko na AT89C405. Proszę o pomoc i wyrozumiałość ponieważ bascoma znam bardzo krotko. Nie wyświetla tego co powinien na początku widać cyfry odlicza sekundy potem się coś rypie i już nic nie wyświetla.Z góry dziekuje.:
Poprawiłem tytuł - Regulamin. [c_p]
$regfile "Attiny2313.dat"
$crystal = 1000000
Config Portb = &B11111111
Portb = &B00000000
Config Portd = &B0000000
Portd = &B1111111
Dim Sek_jedn As Byte , Sek_dzies As Byte , Min_jedn As Byte,
Dim Min_dzies As Byte , Godz_jedn As Byte , Godz_dzies As Byte
Dim A As Byte , B As Byte
Dim Licznik As Integer
B = 0
Sek_jedn = 0
Sek_dzies = 0
Min_jedn = 0
Min_dzies = 0
Godz_jedn = 0
Godz_dzies = 0
A = 1.5
Config Timer0 = Timer , Prescale = 64
On Timer0 Przerwanie_co_2ms
Enable Interrupts
Enable Timer0
Timer0 = 6
Licznik = 0
Start Timer0
Do
Do
Loop Until Pind.6 = 1
If Sek_jedn = 10 Then
Sek_jedn = 0
Incr Sek_dzies
End If
If Sek_dzies = 6 Then
Sek_dzies = 0
Incr Min_jedn
End If
If Min_jedn = 10 Then
Min_jedn = 0
Incr Min_dzies
End If
If Min_dzies = 6 Then
Min_dzies = 0
Incr Godz_jedn
End If
If Godz_jedn = 10 Then
Godz_jedn = 0
Incr Godz_dzies
End If
If Godz_dzies = 2 Then
Godz_dzies = 0
Godz_jedn = 0
End If
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
If Sek_jedn = 0 Then
Gosub Zero
End If
If Sek_jedn = 1 Then
Gosub Jeden
End If
If Sek_jedn = 2 Then
Gosub Dwa
End If
If Sek_jedn = 3 Then
Gosub Trzy
End If
If Sek_jedn = 4 Then
Gosub Cztery
End If
If Sek_jedn = 5 Then
Gosub Piec
End If
If Sek_jedn = 6 Then
Gosub Szesc
End If
If Sek_jedn = 7 Then
Gosub Siedem
End If
If Sek_jedn = 8 Then
Gosub Osiem
End If
If Sek_jedn = 9 Then
Gosub Dziewiec
End If
'############################
If sek_dzies = 0 Then
Gosub Zero
End If
If Sek_dzies = 1 Then
Gosub Jeden
End If
If Sek_dzies = 2 Then
Gosub Dwa
End If
If Sek_dzies = 3 Then
Gosub Trzy
End If
If Sek_dzies = 4 Then
Gosub Cztery
End If
If Sek_dzies = 5 Then
Gosub Piec
End If
If Sek_dzies = 6 Then
Gosub Szesc
End If
If Sek_dzies = 7 Then
Gosub Siedem
End If
If Sek_dzies = 8 Then
Gosub Osiem
End If
If Sek_dzies = 9 Then
Gosub Dziewiec
End If
'***********************************
If Min_jedn = 0 Then
Gosub Zero
End If
If Min_jedn = 1 Then
Gosub Jeden
End If
If Min_jedn = 2 Then
Gosub Dwa
End If
If Min_jedn = 3 Then
Gosub Trzy
End If
If Min_jedn = 4 Then
Gosub Cztery
End If
If Min_jedn = 5 Then
Gosub Piec
End If
If Min_jedn = 6 Then
Gosub Szesc
End If
If Min_jedn = 7 Then
Gosub Siedem
End If
If Min_jedn = 8 Then
Gosub Osiem
End If
If Min_jedn = 9 Then
Gosub Dziewiec
End If
'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
If Min_dzies = 0 Then
Gosub Zero
End If
If Min_dzies = 1 Then
Gosub Jeden
End If
If Min_dzies = 2 Then
Gosub Dwa
End If
If Min_dzies = 3 Then
Gosub Trzy
End If
If Min_dzies = 4 Then
Gosub Cztery
End If
If Min_dzies = 5 Then
Gosub Piec
End If
If Min_dzies = 6 Then
Gosub Szesc
End If
If Min_dzies = 7 Then
Gosub Siedem
End If
If Min_dzies = 8 Then
Gosub Osiem
End If
If Min_dzies = 9 Then
Gosub Dziewiec
End If
'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
If godz_jedn = 0 Then
Gosub Zero
End If
If Godz_jedn = 1 Then
Gosub Jeden
End If
If Godz_jedn = 2 Then
Gosub Dwa
End If
If Godz_jedn = 3 Then
Gosub Trzy
End If
If Godz_jedn = 4 Then
Gosub Cztery
End If
If Godz_jedn = 5 Then
Gosub Piec
End If
If Godz_jedn = 6 Then
Gosub Szesc
End If
If Godz_jedn = 7 Then
Gosub Siedem
End If
If Godz_jedn = 8 Then
Gosub Osiem
End If
If Godz_jedn = 9 Then
Gosub Dziewiec
End If
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
If Godz_dzies = 1 Then
Gosub Jeden
End If
If Godz_dzies = 2 Then
Gosub Jeden
End If
Loop
End
Przerwanie_co_2ms:
Counter0 = Counter0 + 6
Incr Licznik
If Licznik = 500 Then
Licznik = 0 'wyzeruj zmienną licznik
Incr Sek_jedn
End If
Return
Odstep:
Delay : Delay : Delay : Delay : Delay : Delay : Delay : Delay : Delay : Delay
Zero:
Portb = 255
Waitms A
Portb = 129
Waitms A
Portb = 129
Waitms A
Portb = 255
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Jeden:
Portb = 4
Waitms A
Portb = 2
Waitms A
Portb = 255
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Dwa:
Portb = 249
Waitms A
Portb = 137
Waitms A
Portb = 137
Waitms A
Portb = 143
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Trzy:
Portb = 129
Waitms A
Portb = 137
Waitms A
Portb = 137
Waitms A
Portb = 255
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Cztery:
Portb = 15
Waitms A
Portb = 8
Waitms A
Portb = 252
Waitms A
Portb = 8
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Piec:
Portb = 143
Waitms A
Portb = 137
Waitms A
Portb = 137
Waitms A
Portb = 249
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Szesc:
Portb = 255
Waitms A
Portb = 145
Waitms A
Portb = 145
Waitms A
Portb = 241
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Siedem:
Portb = 1
Waitms A
Portb = 241
Waitms A
Portb = 9
Waitms A
Portb = 7
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Osiem:
Portb = 255
Waitms A
Portb = 137
Waitms A
Portb = 137
Waitms A
Portb = 255
Waitms A
Portb = 0
Waitms A
Gosub Odstep
Dziewiec:
Portb = 143
Waitms A
Portb = 137
Waitms A
Portb = 137
Waitms A
Portb = 255
Waitms A
Portb = 0
Waitms A
Gosub OdstepPoprawiłem tytuł - Regulamin. [c_p]