summaryrefslogtreecommitdiff
path: root/software
diff options
context:
space:
mode:
Diffstat (limited to 'software')
-rw-r--r--software/ttx/ttx.asm39
1 files changed, 16 insertions, 23 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm
index 316ce46..a3a38ee 100644
--- a/software/ttx/ttx.asm
+++ b/software/ttx/ttx.asm
@@ -37,9 +37,6 @@
;; -------------------------------------
;; DEFINES
-CNT0 EQU H'0008'
-CNT1 EQU H'0009'
-
;; -------------------------------------
;; OFFSET
org 0
@@ -47,34 +44,30 @@ CNT1 EQU H'0009'
;; -------------------------------------
;; INIT
init
- bsf CMCON0,NOT_COUTEN
+ ;; bsf CMCON0,NOT_COUTEN
bcf CMCON0,CMPON
- movlw b'11000110'
+ movlw b'11110110'
option
- movlw b'11111011'
+ movlw b'11111110'
tris GPIO
- bcf GPIO,GP2
-
+ bsf GPIO,GP0
+
;; -------------------------------------
;; MAINLOOP
main
- movlw .255
- movwf CNT0
-
-outer
- movlw .255
- movwf CNT1
-
-inner
- decfsz CNT1,f
- goto inner
-
- decfsz CNT0,f
- goto outer
+ movf TMR0,w
+ btfss STATUS,Z
+ goto main
+
+ bcf GPIO,GP0
- movlw b'00000100'
- xorwf GPIO,f
+waitfor0
+ movf TMR0,w
+ btfsc STATUS,Z
+ goto waitfor0
+ bsf GPIO,GP0
+
goto main
;; -------------------------------------