diff options
author | Christian Pointner <equinox@mur.at> | 2011-05-03 21:48:26 +0000 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2011-05-03 21:48:26 +0000 |
commit | 4a7a6636506c84d60936b91f8819188c79ac1bc7 (patch) | |
tree | a6ecaf78e8c9faba9d904f96f553d3390605e251 | |
parent | dtmf mit sox (diff) |
first working version
git-svn-id: https://svn.spreadspace.org/mur.sat@14 7de4ea59-55d0-425e-a1af-a3118ea81d4c
-rw-r--r-- | software/ttx/Makefile | 2 | ||||
-rw-r--r-- | software/ttx/nmx-calc.ods | bin | 16719 -> 16807 bytes | |||
-rw-r--r-- | software/ttx/ttx.asm | 96 |
3 files changed, 60 insertions, 38 deletions
diff --git a/software/ttx/Makefile b/software/ttx/Makefile index 79975eb..526edd3 100644 --- a/software/ttx/Makefile +++ b/software/ttx/Makefile @@ -10,7 +10,7 @@ ## Please visit the project hompage at sat.mur.at for further information. ## ## -## Copyright (C) 2011 Christian Pointner <equinox@spreadspace.org> +## Copyright (C) 2011 Christian Pointner <equinox@mur.at> ## ## This file is part of mur.sat. ## diff --git a/software/ttx/nmx-calc.ods b/software/ttx/nmx-calc.ods Binary files differindex 907f03d..8b85fb8 100644 --- a/software/ttx/nmx-calc.ods +++ b/software/ttx/nmx-calc.ods diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm index abfd472..c9826c7 100644 --- a/software/ttx/ttx.asm +++ b/software/ttx/ttx.asm @@ -10,7 +10,7 @@ ;; Please visit the project hompage at sat.mur.at for further information. ;; ;; - ;; Copyright (C) 2011 Christian Pointner <equinox@spreadspace.org> + ;; Copyright (C) 2011 Christian Pointner <equinox@mur.at> ;; ;; This file is part of mur.sat. ;; @@ -36,17 +36,21 @@ ;; ------------------------------------- ;; DEFINES -BEACON_INT EQU .60 +BEACON_INT EQU .5 SECCNT EQU H'0008' -DOT EQU .36 -DASH EQU .108 -ESPACE EQU .36 -CSPACE EQU .108 -WSPACE EQU .252 -CWSPEED EQU .192 -DOTCNT0 EQU H'000A' -DOTCNT1 EQU H'000B' +CHAR EQU H'0009' +CHARCNT EQU H'000A' +ELEMENT EQU H'000B' +ELECNT EQU H'000C' + +DOT EQU .85 +DASH EQU .255 +ESPACE EQU .85 +CSPACE EQU .255 +CWSPEED EQU .168 +DOTCNT0 EQU H'0010' +DOTCNT1 EQU H'0011' CWOUT EQU GP0 @@ -62,7 +66,7 @@ init option movlw b'11111110' tris GPIO - bcf GPIO,CWOUT + bsf GPIO,CWOUT clrf TMR0 movlw BEACON_INT movwf SECCNT @@ -74,7 +78,7 @@ init ;; Morse Codes: 0=dot, 1=dash getcw addwf PCL,f - retlw b'00000000' ; SPACE + nop retlw b'00010000' ; ! retlw b'01001000' ; " retlw b'00000000' ; # @@ -137,7 +141,7 @@ getcw ;; Morse Code Length getcwlen addwf PCL,f - retlw .0 ; SPACE + nop retlw .5 ; ! retlw .6 ; " retlw .0 ; # @@ -196,6 +200,18 @@ getcwlen retlw .4 ; X retlw .4 ; Y retlw .4 ; Z + + ;; test string +string + addwf PCL,f + nop + retlw 'T' - ' ' + retlw 'A' - ' ' + retlw 'S' - ' ' + retlw '.' - ' ' + retlw 'R' - ' ' + retlw 'U' - ' ' + retlw 'M' - ' ' ;; ------------------------------------- ;; SUBROUTINES @@ -214,41 +230,47 @@ dot_inner decfsz DOTCNT1,f goto dot_outer return - + + ;; ------------------------------------- send_beacon - ;; test send out: - ;; .- . - - bsf GPIO,CWOUT - movlw DOT - call dottime - bcf GPIO,CWOUT + movlw .7 + movwf CHARCNT - movlw ESPACE - call dottime +beacon_next_char + movf CHARCNT,w + call string + call getcw + movwf ELEMENT + movf CHARCNT,w + call string + call getcwlen + movwf ELECNT - bsf GPIO,CWOUT - movlw DASH - call dottime +beacon_next_element bcf GPIO,CWOUT - - movlw CSPACE - call dottime - - bsf GPIO,CWOUT + btfss ELEMENT,7 movlw DOT + btfsc ELEMENT,7 + movlw DASH call dottime - bcf GPIO,CWOUT + bsf GPIO,CWOUT - movlw WSPACE - call dottime + rlf ELEMENT,f + + decfsz ELECNT,f + goto beacon_element_space - bsf GPIO,CWOUT - movlw DASH + movlw CSPACE call dottime - bcf GPIO,CWOUT - + decfsz CHARCNT,f + goto beacon_next_char return +beacon_element_space + movlw ESPACE + call dottime + goto beacon_next_element + ;; ------------------------------------- ;; MAINLOOP main |