summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--software/ihu/ihu.asm182
-rw-r--r--software/ttx/ttx.asm12
2 files changed, 97 insertions, 97 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index d2ae016..f37b3db 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -296,7 +296,7 @@ init
clrf PORTB
- bsf PORTD,DTMF_PWRDWN
+ bcf PORTD,DTMF_PWRDWN
movlw DTMF_BUF
movwf DTMF_BUF_PTR
clrf DTMF_CS
@@ -400,50 +400,50 @@ main_read_bytes
goto main
- xorlw .0
- btfss STATUS,Z
- goto main_error
+;; xorlw .0
+;; btfss STATUS,Z
+;; goto main_error
- movlw 'O'
- movwf TXREG
- movlw .1
- call wait_ms
- movlw 'K'
- movwf TXREG
- movlw .1
- call wait_ms
- movlw '\r'
- movwf TXREG
- movlw .1
- call wait_ms
- movlw '\n'
- movwf TXREG
- movlw .1
- call wait_ms
- goto main
+;; movlw 'O'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; movlw 'K'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; movlw '\r'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; movlw '\n'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; goto main
-main_error
- movlw 'E'
- movwf TXREG
- movlw .1
- call wait_ms
- movlw 'R'
- movwf TXREG
- movlw .1
- call wait_ms
- movlw 'R'
- movwf TXREG
- movlw .1
- call wait_ms
- movlw '\r'
- movwf TXREG
- movlw .1
- call wait_ms
- movlw '\n'
- movwf TXREG
- movlw .1
- call wait_ms
- goto main
+;; main_error
+;; movlw 'E'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; movlw 'R'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; movlw 'R'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; movlw '\r'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; movlw '\n'
+;; movwf TXREG
+;; movlw .1
+;; call wait_ms
+;; goto main
;; --------------------
;; ADC Test
@@ -519,66 +519,66 @@ main_error
;; --------------------
;; DTMF Test program
- ;; movf TMP,f
- ;; btfsc STATUS,Z
- ;; goto main
+ movf TMP,f
+ btfsc STATUS,Z
+ goto main
- ;; movf DTMF_BUF,w
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf DTMF_BUF,w
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movf DTMF_BUF+1,w
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf DTMF_BUF+1,w
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movf DTMF_BUF+2,w
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf DTMF_BUF+2,w
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movf DTMF_BUF+3,w
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf DTMF_BUF+3,w
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movf DTMF_BUF+4,w
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf DTMF_BUF+4,w
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movlw ' '
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movlw ' '
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movf DTMF_CS,f
- ;; btfsc STATUS,Z
- ;; movlw '!'
- ;; btfss STATUS,Z
- ;; movlw 'x'
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf DTMF_CS,f
+ btfsc STATUS,Z
+ movlw '!'
+ btfss STATUS,Z
+ movlw 'x'
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movlw '\r'
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
- ;; movlw '\n'
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movlw '\r'
+ movwf TXREG
+ movlw .1
+ call wait_ms
+ movlw '\n'
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; clrf TMP
- ;; movlw DTMF_BUF
- ;; movwf DTMF_BUF_PTR
- ;; clrf DTMF_CS
+ clrf TMP
+ movlw DTMF_BUF
+ movwf DTMF_BUF_PTR
+ clrf DTMF_CS
- ;; goto main
+ goto main
;; --------------------
;; RTC Test program
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm
index 8c3015e..97fafac 100644
--- a/software/ttx/ttx.asm
+++ b/software/ttx/ttx.asm
@@ -32,7 +32,6 @@
LIST p=12F635
include "p12f635.inc"
- ;;__config _WUREN_OFF & _FCMEN_OFF & _IESO_OFF & _BOD_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_OFF & _WDT_ON & _INTRC_OSC_NOCLKOUT
__config _WUREN_OFF & _FCMEN_OFF & _IESO_OFF & _BOD_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT
;; -------------------------------------
@@ -43,7 +42,7 @@ DOT_DEF EQU .256 - .21 ; .29
DASH_DEF EQU .256 - .63 ; .87
WSPACE_DEF EQU .256 - .147 ; .203
TUNE_DEF EQU DOT_DEF
-BCNINTL_DEF EQU .256 - .120
+BCNINTL_DEF EQU .256 - .20
BCNINTH_DEF EQU .255
START_CHAR EQU 'N'
ACK_CHAR EQU 'A'
@@ -128,6 +127,7 @@ ext_int
movwf OSCCON
;; we are on high OSC now
bcf STATUS,RP0
+ bsf WDTCON,SWDTEN
clrf RX_CSUM
movf FSR,w
movwf RX_FSR_TMP
@@ -163,6 +163,7 @@ ext_int_wait_ack_high
goto ext_int_wait_ack_high
btfss GPIO,SDAT
bsf STATE,rxcomplete
+ bcf WDTCON,SWDTEN
bsf STATUS,RP0
movlw OSC_LOW
movwf OSCCON
@@ -386,8 +387,8 @@ init
bcf STATUS,RP0
;; bank 0
- ;; movlw b'00010110' ; TODO: watchdog??
- ;; movwf WDTCON
+ movlw b'00010010'
+ movwf WDTCON
movlw b'01010000'
movwf INTCON
@@ -493,7 +494,6 @@ dottime
dot_inner
btfss INTCON,T0IF
goto dot_inner
- clrwdt
return
;; -------------------------------------
@@ -819,8 +819,8 @@ beaconint_elapsed
;; this gets called whenever a message was received from ihu
msg_received
+ call send_ack
bcf STATE,rxcomplete
- ;; call send_ack
clrf RX_DLEN
powerdown