From c5f23b28307fdc4aa9b64cbb2440e9608eaadc45 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 3 May 2011 00:32:18 +0000 Subject: cleaned dottime calculation added test signal git-svn-id: https://svn.spreadspace.org/mur.sat@8 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/ttx/dottime.calc | 40 ++++++++++++++++++++-------------------- software/ttx/ttx.asm | 34 ++++++++++++++++++++++++++++++---- 2 files changed, 50 insertions(+), 24 deletions(-) (limited to 'software') diff --git a/software/ttx/dottime.calc b/software/ttx/dottime.calc index 285eb06..5a793f1 100644 --- a/software/ttx/dottime.calc +++ b/software/ttx/dottime.calc @@ -1,23 +1,23 @@ - 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 + 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 = ================== diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm index e0b8a9b..2030cf7 100644 --- a/software/ttx/ttx.asm +++ b/software/ttx/ttx.asm @@ -62,7 +62,7 @@ init option movlw b'11111110' tris GPIO - bsf GPIO,CWOUT + bcf GPIO,CWOUT clrf TMR0 movlw BEACON_INT movwf SECCNT @@ -87,10 +87,36 @@ dot_inner return send_beacon - movlw b'00000001' - xorwf GPIO,f + ;; test send out: + ;; .- . - + bsf GPIO,CWOUT + movlw DOT + call dottime + bcf GPIO,CWOUT - + movlw ESPACE + call dottime + + bsf GPIO,CWOUT + movlw DASH + call dottime + bcf GPIO,CWOUT + + movlw CSPACE + call dottime + + bsf GPIO,CWOUT + movlw DOT + call dottime + bcf GPIO,CWOUT + + movlw WSPACE + call dottime + + bsf GPIO,CWOUT + movlw DASH + call dottime + bcf GPIO,CWOUT return -- cgit v1.2.3