Ich glaub , ich greif Dir vor , dann weiß ich , der Code paßt 100%
_________________________________________________________________________________________________
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
' sozusagen der "Header"
$regfile = "attiny44.dat" ' Hier wird dem Compiler gesagt um welchen Chip es sich handelt ! *** sehr wichtig ! ***
$crystal = 1000000 ' Auslieferungszustand ist 1Mhz , das muß im Code immer identisch mit der Hardware sein
$hwstack = 30
$swstack = 30
$framesize = 30
' Mit dem Befehl : config wird anfangs festgelegt welcher Pin was ist
config porta.0 =output
config porta.1 =output
config porta.2 =output
config porta.3 =output
config porta.4 =output
config porta.5 =output
config porta.6 =output
config porta.7 =output
config portb.0 =output
config portb.1 =output
config portb.2 =output
config portb.3 =output
Schleifen beginn ....
do
porta.6=1 ' PORTA.6=1 ..... PORTA.6 = an
waitms 200 ' waitms sind Wartepause. Es gibt waitms (ms) / waitus (us) / wait (s)
' hier wird also 200ms gewartet
porta.7=1
waitms 200
portb.2=1
waitms 200
portb.1=1
waitms 200
portb.0=1
waitms 200
porta.0=1
waitms 200
porta.1=1
waitms 200
porta.2=1
waitms 200
porta.3=1
waitms 200
porta.4=1
waitms 200
porta.5=1
waitms 2000
'---------------
porta.6=0 ' PORTA.6=0 ..... PORTA.6 = aus
waitms 200
porta.7=0
waitms 200
portb.2=0
waitms 200
portb.1=0
waitms 200
portb.0=0
waitms 200
portb.3=0
waitms 200
porta.0=0
waitms 200
porta.1=0
waitms 200
porta.2=0
waitms 200
porta.3=0
waitms 200
porta.4=0
waitms 200
porta.5=0
waitms 2000
' Zustände am Pin werden immer mit '1' (AN) oder '0' (AUS) gesetzt oder abgefragt
loop
end
Diesen Code dann bitte als xxxxx.bas speichern.