Browse Source

Improved the locking mechanism by adding a 1 second delay after locking.

Stan Janssen 7 years ago
parent
commit
822fcab444
1 changed files with 14 additions and 2 deletions
  1. 14 2
      minimalmode3.asm

+ 14 - 2
minimalmode3.asm

@@ -276,6 +276,7 @@ lock
     bsf     PORTA, 5
     call    delay100        ; Blocking 100ms delay
     bsf     PORTA, 4        ; Stop the motor
+    call    delay1000
     goto    idle
     
 
@@ -316,14 +317,25 @@ delay_wait
     bcf     T0CON, TMR0ON        ; Stop the timer
     return
 
+delay500
+    movlw   d'5'
+    movwf   DLYCOUNT
+    goto    delay_repeat
+
+delay1000
+    movlw   d'10'
+    movwf   DLYCOUNT
+    goto    delay_repeat
+
 delay2000
     movlw   d'20'
     movwf   DLYCOUNT
+    goto    delay_repeat
 
-delay2000_repeat
+delay_repeat
     call    delay100
     decfsz  DLYCOUNT, f
-    goto    delay2000_repeat
+    goto    delay_repeat
     return
 
     end