diff options
-rwxr-xr-x | software/tests/beacon/decode.pl | 2 | ||||
-rw-r--r-- | software/ttx/ttx.asm | 20 |
2 files changed, 15 insertions, 7 deletions
diff --git a/software/tests/beacon/decode.pl b/software/tests/beacon/decode.pl index 2d570c0..85739b3 100755 --- a/software/tests/beacon/decode.pl +++ b/software/tests/beacon/decode.pl @@ -25,7 +25,7 @@ foreach(@beacons) { my $cntval = unpack("n", MIME::Base32::decode($cnt . "=")) >> 1; my $csval_recv = unpack("C", MIME::Base32::decode($checksum . "=")) >> 3; - my $csval_calc = 0; + my $csval_calc = ord('E') - ord(' '); my @values = unpack("C*", $preamble); @values = (@values, unpack("C*", $cnt)); foreach(@values) { $csval_calc ^= $_ - ord(' '); } diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm index 6fe1cf6..79fabdf 100644 --- a/software/ttx/ttx.asm +++ b/software/ttx/ttx.asm @@ -38,13 +38,13 @@ ;; DEFINES ;; constants -DOT EQU .256 - .29 -DASH EQU .256 - .87 +DOT EQU .256 - .21 ;.29 +DASH EQU .256 - .63 ;.87 ESPACE EQU DOT CSPACE EQU DASH -WSPACE EQU .256 - .203 +WSPACE EQU .256 - .147 ;.203 ENABLE_TIME EQU DOT -BCONINT_DEF EQU .7 ; *2 = Beacon Interval in seconds +BCONINT_DEF EQU .4 ; *2 = Beacon Interval in seconds ;; I/O Pins CWENABLE EQU GP0 @@ -157,8 +157,10 @@ init movwf SECCNT clrf STATE ; TODO: read State from EEPROM - clrf BEACONCNTL ; TODO: read Beaconcnt from EEPROM - clrf BEACONCNTH + movlw .42 + movwf BEACONCNTL ; TODO: read Beaconcnt from EEPROM + movlw .23 + movwf BEACONCNTH movlw BCONINT_DEF ; TODO: read Beacon Interval from EEPROM movwf BEACON_INT @@ -565,6 +567,12 @@ send_beacon call dottime clrf PARITY + movlw 'E' - ' ' + call send_char + + movlw WSPACE + call dottime + call send_callsign movlw WSPACE |