Forum

Einloggen | Registrieren | RSS  

Franzis Microcontoler ohne PC Betreiben?? (Elektronik)

verfasst von k.a.  E-Mail, 29.12.2009, 17:42 Uhr

Besser???

.include "tn13def.inc" ;soll 'ne lampe werden
rjmp anf
anf: ;anfang
sbi ddrb,3 ;3=ausgang
los:
nop
rjmp an ;Springe nach an
aus:
rcall war
rcall war
rcall war
rcall war
sbic pinb,4 ;taste getrückt?
rjmp an
rjmp aus
an:
sbi portb,3
rcall war
rcall war
cbi portb,3
sbic pinb,4 ;taste getrückt?
rjmp du
rjmp an
du: ;dunkel
rcall war
rcall war

dudu:
sbi portb,3
nop
cbi portb,3
nop
nop
nop
nop
nop
sbic pinb,4 ;taste getrückt?
rjmp hll
rjmp dudu
hll: ;etwas heller
rcall war
rcall war

hl:
cbi portb,3
nop
nop

sbic pinb,4 ;taste getrückt?
rjmp blin
rjmp dudu

blin: ;blinken
sbi portb,3
rcall war
cbi portb,3
rcall war
sbic pinb,4 ;taste getrückt?
rjmp lang
rjmp blin
lang: ;langsam blinken
rcall war
rcall war
sbi portb,3
rcall war
rcall war
cbi portb,3
sbic pinb,4
rjmp aus
rjmp lang
war: ;warteschleife
ldi r16,250
w1: ;1. Warteschl.
ldi r17,250
w2: ;2. Warteschl.
ldi r18, 1
w3: ;3. Warteschl
dec r18
brne w3
dec r17
brne w2
dec r16
brne w1
ret



Gesamter Thread:

Franzis Microcontoler ohne PC Betreiben?? - k.a., 25.12.2009, 18:28 (Elektronik)
Franzis Microcontoler ohne PC Betreiben?? - hws(R), 26.12.2009, 02:14
Franzis Microcontoler ohne PC Betreiben?? - Technik_Freak(R), 27.12.2009, 16:46
Franzis Microcontoler ohne PC Betreiben?? - k.a., 28.12.2009, 10:54
Franzis Microcontoler ohne PC Betreiben?? - hws(R), 28.12.2009, 17:15
Franzis Microcontoler ohne PC Betreiben?? - k.a., 29.12.2009, 17:24
Franzis Microcontoler ohne PC Betreiben?? - k.a., 29.12.2009, 17:42