summaryrefslogtreecommitdiff
path: root/software/ihu
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-09-26 21:19:25 +0000
committerChristian Pointner <equinox@mur.at>2011-09-26 21:19:25 +0000
commit313be20fb0a901721521b5b68009bbc8c7605f37 (patch)
treee68c92847816048197d1a85262cc5b24f7b16611 /software/ihu
parentdmtftest now sends sign until s is pressed (diff)
dtmf decoder works
git-svn-id: https://svn.spreadspace.org/mur.sat@168 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu')
-rw-r--r--software/ihu/ihu.asm16
-rw-r--r--software/ihu/tables.inc19
2 files changed, 33 insertions, 2 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index 55d79a7..f763407 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -134,10 +134,20 @@ STATUS_TEMP EQU H'007F'
bcf STATUS,RP0
bcf STATUS,RP1
+ btfsc INTCON,INTF
+ goto int_dtmf
btfsc PIR1,RCIF
goto int_uart_rx
goto interrupt_end
+int_dtmf
+ movf PORTD,w
+ andlw b'00001111'
+ call dtmfSign
+ movwf TXREG
+ bcf INTCON,INTF
+ goto interrupt_end
+
int_uart_rx
call uart_rx_byte
btfsc PIR1,RCIF
@@ -203,12 +213,12 @@ init
bcf STATUS,RP1
movlw b'10010000'
movwf RCSTA
- movlw B'01000000'
+ movlw B'01010000'
movwf INTCON
clrf PORTB
- bsf PORTD,DTMF_PWRDWN
+ bcf PORTD,DTMF_PWRDWN
bcf PORTD,TTX_RESET ;reset TTX
bcf PORTD,TTX_SCL
bcf PORTD,TTX_SDA
@@ -271,6 +281,8 @@ main
btfsc STATUS,Z
goto main
+ goto main
+
movlw BUF
movwf FSR
call rtc_get_time
diff --git a/software/ihu/tables.inc b/software/ihu/tables.inc
index 5a72504..63d4ddc 100644
--- a/software/ihu/tables.inc
+++ b/software/ihu/tables.inc
@@ -49,6 +49,25 @@ digit
retlw 'E'
retlw 'F'
+dtmfSign
+ addwf PCL,f
+ retlw 'D'
+ retlw '1'
+ retlw '2'
+ retlw '3'
+ retlw '4'
+ retlw '5'
+ retlw '6'
+ retlw '7'
+ retlw '8'
+ retlw '9'
+ retlw '0'
+ retlw '*'
+ retlw '#'
+ retlw 'A'
+ retlw 'B'
+ retlw 'C'
+
mul10
addwf PCL,f
retlw .0