summaryrefslogtreecommitdiff
path: root/software/ttx
diff options
context:
space:
mode:
Diffstat (limited to 'software/ttx')
-rw-r--r--software/ttx/ttx.asm37
1 files changed, 20 insertions, 17 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm
index d04381a..fa0511c 100644
--- a/software/ttx/ttx.asm
+++ b/software/ttx/ttx.asm
@@ -66,6 +66,8 @@ PENTLECNT EQU H'0047'
BUF EQU H'0050'
;; all pages
+BEACONCNTH EQU H'007C'
+BEACONCNTL EQU H'007B'
SECCNT EQU H'007D'
W_TEMP EQU H'007E'
STATUS_TEMP EQU H'007F'
@@ -141,6 +143,9 @@ init
movlw BEACON_INT
movwf SECCNT
+ clrf BEACONCNTL ; TODO: read Beaconcnt from EEPROM
+ clrf BEACONCNTH
+
bsf INTCON,GIE
goto main
@@ -529,34 +534,32 @@ send_beacon
call dottime
clrf PARITY
+ ;; CALLSIGN
call send_callsign
+
+ ;; -------
movlw WSPACE
call dottime
- movlw b'10101010'
- movwf BUF
- movlw b'01010101'
- movwf BUF + 1
- movlw b'00001111'
- movwf BUF + 2
- movlw b'11110000'
- movwf BUF + 3
- movlw b'11000011'
- movwf BUF + 4
- movlw b'00111100'
- movwf BUF + 5
- movlw b'01011111'
- movwf BUF + 6
-
- movlw BUF
+ ;; BEACON CNT
+ movlw BEACONCNTH
movwf FSR
- movlw .10
+ movlw .3
call send_base32
+ ;; -------
movlw WSPACE
call dottime
+
+ ;; PARITY
call send_parity
+
+ incfsz BEACONCNTL,f
+ goto beacon_end
+ incf BEACONCNTH,f
+ ;; TODO write new cnt value to EEPROM
+beacon_end
bcf GPIO,CWENABLE
return