summaryrefslogtreecommitdiff
path: root/software
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-07-22 19:12:37 +0000
committerChristian Pointner <equinox@mur.at>2011-07-22 19:12:37 +0000
commit1e4f38d708e48a8e3f05ba61587beeefb687bd54 (patch)
treef0aeb58b86d845b8fc69971c39b03d6b933e6485 /software
parentbeacon with powerdown works now (diff)
split up send_beacon on sperate functions
git-svn-id: https://svn.spreadspace.org/mur.sat@34 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software')
-rw-r--r--software/ttx/ttx.asm107
1 files changed, 82 insertions, 25 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm
index b6b7bbb..4c2a703 100644
--- a/software/ttx/ttx.asm
+++ b/software/ttx/ttx.asm
@@ -36,7 +36,7 @@
;; -------------------------------------
;; DEFINES
-BEACON_INT EQU .21 ; *2 = Beacon Interval in seconds
+BEACON_INT EQU .5 ; *2 = Beacon Interval in seconds
SECCNT EQU H'007D'
CHAR EQU H'0041'
@@ -50,6 +50,8 @@ ESPACE EQU .256 - .29
CSPACE EQU .256 - .87
WSPACE EQU .256 - .203
+ENABLE_TIME EQU .256 - .10
+
CWENABLE EQU GP0
CWOUT EQU GP1
SCLK EQU GP2
@@ -261,17 +263,52 @@ getcwlen
retlw .4 ; Y
retlw .4 ; Z
- ;; test string
-string
+base32
addwf PCL,f
nop
- retlw 'T' - ' '
retlw 'A' - ' '
+ retlw 'B' - ' '
+ retlw 'C' - ' '
+ retlw 'D' - ' '
+ retlw 'E' - ' '
+ retlw 'F' - ' '
+ retlw 'G' - ' '
+ retlw 'H' - ' '
+ retlw 'I' - ' '
+ retlw 'J' - ' '
+ retlw 'K' - ' '
+ retlw 'L' - ' '
+ retlw 'M' - ' '
+ retlw 'N' - ' '
+ retlw 'O' - ' '
+ retlw 'P' - ' '
+ retlw 'Q' - ' '
+ retlw 'R' - ' '
retlw 'S' - ' '
- retlw '.' - ' '
+ retlw 'T' - ' '
+ retlw 'U' - ' '
+ retlw 'V' - ' '
+ retlw 'W' - ' '
+ retlw 'X' - ' '
+ retlw 'Y' - ' '
+ retlw 'Z' - ' '
+ retlw '2' - ' '
+ retlw '3' - ' '
+ retlw '4' - ' '
+ retlw '5' - ' '
+ retlw '6' - ' '
+ retlw '7' - ' '
+
+ ;; fixed strings
+callsign
+ addwf PCL,f
+ nop
retlw 'R' - ' '
retlw 'U' - ' '
retlw 'M' - ' '
+ retlw '6' - ' '
+ retlw 'E' - ' '
+ retlw 'O' - ' '
;; -------------------------------------
;; SUBROUTINES
@@ -284,25 +321,18 @@ dot_inner
return
;; -------------------------------------
-send_beacon
- bsf GPIO,CWENABLE
- movlw .7
- movwf CHARCNT
-
-beacon_next_char
- movf CHARCNT,w
- call string
+send_char
+ movwf CHAR
call getcw
movwf ELEMENT
- movf CHARCNT,w
- call string
+ movf CHAR,w
call getcwlen
movwf ELECNT
movf ELECNT,f
btfsc STATUS,Z
- goto beacon_invalid_char
+ return
-beacon_next_element
+char_next_element
bsf GPIO,CWOUT
btfss ELEMENT,7
movlw DOT
@@ -314,20 +344,47 @@ beacon_next_element
rlf ELEMENT,f
decfsz ELECNT,f
- goto beacon_element_space
+ goto char_espace
+ return
- movlw CSPACE
+char_espace
+ movlw ESPACE
call dottime
-beacon_invalid_char
+ goto char_next_element
+
+ ;; -------------------------------------
+send_callsign
+ movlw .6
+ movwf CHARCNT
+
+callsign_next_char
+ call callsign
+ call send_char
decfsz CHARCNT,f
- goto beacon_next_char
- bcf GPIO,CWENABLE
+ goto callsign_cspace
return
-beacon_element_space
- movlw ESPACE
+callsign_cspace
+ movlw CSPACE
call dottime
- goto beacon_next_element
+ movf CHARCNT,w
+ goto callsign_next_char
+
+ ;; -------------------------------------
+send_base32
+ return ; TODO
+
+ ;; -------------------------------------
+send_beacon
+ bsf GPIO,CWENABLE
+ movlw ENABLE_TIME
+ call dottime
+
+ call send_callsign
+
+ bcf GPIO,CWENABLE
+ return
+
;; -------------------------------------
;; MAINLOOP