list p=16f88 include p16f88.inc cblock 0x020 zeit1 zeit2 Ausgang endc org 0000h GOTO start org 0081h RETFIE start ;**************************************************** org 0000h goto main org 0200h ;*************************************************** main bsf STATUS, RP0 ; auf Bank 1 umschalten movlw B'00000000' ; PortB alle output movwf TRISB ; Schreiben bcf STATUS, RP0 ; auf Bank 0 zurückschalten ;************************************************** m2 movlw B'00001111' movwf TRISB ;**************************************************** ; Lauflicht m1 call schleife rlf Ausgang,3 decfsz Ausgang,0 goto m1 goto m2 ;********************************************************** ;Warteschleife schleife movlw .30 movwf zeit1 ;********************************************************* ; die top-Schleife verzögert 1 ms = 250 x 4µs top movlw .30 movwf zeit2 ; die top2-Schleife verzögert 4 Takte = 4 µs top2 nop decfsz zeit2, 1 goto top2 decfsz zeit1, 1 goto top retlw .0 end