diff options
Diffstat (limited to 'software/ttx')
-rw-r--r-- | software/ttx/dottime.calc | 49 | ||||
-rw-r--r-- | software/ttx/nmx-calc.ods | bin | 0 -> 16719 bytes | |||
-rw-r--r-- | software/ttx/ttx.asm | 28 |
3 files changed, 77 insertions, 0 deletions
diff --git a/software/ttx/dottime.calc b/software/ttx/dottime.calc new file mode 100644 index 0000000..285eb06 --- /dev/null +++ b/software/ttx/dottime.calc @@ -0,0 +1,49 @@ + movlw n 1 + + call dottime 2 | +---------------- | +dottime | + movwf DOTCNT1 1 | +dot_outer | + movlw m 1 + | + movwf DOTCNT0 1 | | +dot_inner + | | + x * nop x | y |z | t + decfsz DOTCNT0,f 1 (2) | | | + goto dot_inner 2 + | | + decfsz DOTCNT1,f 1 (2) | | + goto dot_outer 2 + | + return 2 + + + + + y = ( x + 1 + 2 ) * m - 1 = xm + 3m - 1 + z = ( 1 + 1 + y + 1 + 2) * n - 1 = ( 4 + xm + 3m ) * n - 1 = 4n + 3mn + xmn - 1 + + t = 1 + 2 + 1 + z + 2 = 5 + 4n + 3mn + xmn + = ================== + + @ n = m = 256 (0): tmax = 197637 + 65536x µs + @ n = m = 1: tmin = 12 + x µs + +for x=0: tmin = 12, tmax = 197637 + x=1: tmin = 13, tmax = 263173 + x=2: tmin = 14, tmax = 328709 + x=3: tmin = 15, tmax = 394245 + x=4: tmin = 16, tmax = 459781 + x=5: tmin = 17, tmax = 525317 + x=6: tmin = 18, tmax = 590853 + x=7: tmin = 19, tmax = 656389 + + +m(dot) = m(dot) = 36 +m(dash) = 3*m(dot) = 108 +m(element space) = m(dot) = 36 +m(character space) = 3*m(dot) = 108 +m(word space) = 7*m(dot) = 252 + + @ m = 36; tmax = 5 + 112n + 36xn + @ m = 108: tmax = 5 + 328n + 108xn + @ m = 252: tmax = 5 + 760n + 252xn + + n => CWSPEED + x => nop count
\ No newline at end of file diff --git a/software/ttx/nmx-calc.ods b/software/ttx/nmx-calc.ods Binary files differnew file mode 100644 index 0000000..907f03d --- /dev/null +++ b/software/ttx/nmx-calc.ods diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm index 02ec011..e0b8a9b 100644 --- a/software/ttx/ttx.asm +++ b/software/ttx/ttx.asm @@ -39,6 +39,15 @@ BEACON_INT EQU .60 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' + CWOUT EQU GP0 ;; ------------------------------------- @@ -61,9 +70,28 @@ init ;; ------------------------------------- ;; SUBROUTINES +dottime + movwf DOTCNT1 +dot_outer + movlw CWSPEED + movwf DOTCNT0 +dot_inner + nop + nop + nop + nop + decfsz DOTCNT0,f + goto dot_inner + decfsz DOTCNT1,f + goto dot_outer + return + send_beacon movlw b'00000001' xorwf GPIO,f + + + return ;; ------------------------------------- |