summaryrefslogtreecommitdiff
path: root/software
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-05-27 01:16:57 +0000
committerChristian Pointner <equinox@mur.at>2011-05-27 01:16:57 +0000
commit14cb22b0d527e8c1ac1108ba03787bef78f41d27 (patch)
tree0d78e6d2871da42baf083ee4de2d59bf20a6fba2 /software
parentFirst version of MainProcessingUnit mpu. (diff)
ported code to 12F519
git-svn-id: https://svn.spreadspace.org/mur.sat@28 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software')
-rw-r--r--software/ttx/ttx.asm38
1 files changed, 20 insertions, 18 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm
index c1c65fd..7931771 100644
--- a/software/ttx/ttx.asm
+++ b/software/ttx/ttx.asm
@@ -30,29 +30,31 @@
;; -------------------------------------
;; PREAMBLE
- LIST p=10F206
- include "p10f206.inc"
- __config _MCLRE_OFF & _CP_OFF & _WDT_OFF
-
+ LIST p=12F519
+ include "p12f519.inc"
+ ;; __config _IntRC_OSC & _IOSCFS_4MHz & _MCLRE_ON & _CP_OFF & _CPDF_OFF & _WDTE_OFF
+ __config _IntRC_OSC & _IOSCFS_4MHz & _MCLRE_OFF & _CP_OFF & _CPDF_OFF & _WDTE_OFF
+
;; -------------------------------------
;; DEFINES
BEACON_INT EQU .5
-SECCNT EQU H'0008'
+SECCNT EQU H'0007'
-CHAR EQU H'0009'
-CHARCNT EQU H'000A'
-ELEMENT EQU H'000B'
-ELECNT EQU H'000C'
+CHAR EQU H'0008'
+CHARCNT EQU H'0009'
+ELEMENT EQU H'000A'
+ELECNT EQU H'000B'
DOT EQU .85
DASH EQU .255
ESPACE EQU .85
CSPACE EQU .255
CWSPEED EQU .100
-DOTCNT0 EQU H'0010'
-DOTCNT1 EQU H'0011'
+DOTCNT0 EQU H'000E'
+DOTCNT1 EQU H'000F'
-CWOUT EQU GP0
+CWENABLE EQU 0
+CWOUT EQU 1
;; -------------------------------------
;; OFFSET
@@ -61,12 +63,12 @@ CWOUT EQU GP0
;; -------------------------------------
;; INIT
init
- bcf CMCON0,CMPON
movlw b'11110110'
option
- movlw b'11111110'
- tris GPIO
- bsf GPIO,CWOUT
+ movlw b'11111100'
+ tris PORTB
+ bcf PORTB,CWOUT
+ bcf PORTB,CWENABLE
clrf TMR0
movlw BEACON_INT
movwf SECCNT
@@ -250,13 +252,13 @@ beacon_next_char
goto beacon_invalid_char
beacon_next_element
- bcf GPIO,CWOUT
+ bsf PORTB,CWOUT
btfss ELEMENT,7
movlw DOT
btfsc ELEMENT,7
movlw DASH
call dottime
- bsf GPIO,CWOUT
+ bcf PORTB,CWOUT
rlf ELEMENT,f