summaryrefslogtreecommitdiff
path: root/software/ihu/ihu.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-07-27 00:39:07 +0000
committerChristian Pointner <equinox@mur.at>2011-07-27 00:39:07 +0000
commite34f4cef5b441e5c4d69404e78166355a78e6162 (patch)
treedc119b8b9ade4e8910fb3ad0f4c0aa55bbf05473 /software/ihu/ihu.asm
parentihu-ttx implement read of csum @ihu (not yet tested) (diff)
ttx <-> ihu communication include checksum/ack works now
git-svn-id: https://svn.spreadspace.org/mur.sat@64 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/ihu.asm')
-rw-r--r--software/ihu/ihu.asm17
1 files changed, 9 insertions, 8 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index 8951980..848b25e 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -225,6 +225,7 @@ ttx_recv_byte
movlw .8
movwf TTX_BIT_CNT
ttx_recv_next_bit
+ rlf TTX_BYTE,f
bsf PORTD,TTX_SCL
nop
nop
@@ -232,17 +233,17 @@ ttx_recv_next_bit
bcf PORTD,TTX_SCL
nop
nop
+ nop
+ nop
+ nop
btfsc PORTD,TTX_SDA
bsf TTX_BYTE,0
btfss PORTD,TTX_SDA
bcf TTX_BYTE,0
- nop
- nop
- rlf TTX_BYTE,f
decfsz TTX_BIT_CNT,f
goto ttx_recv_next_bit
return
-
+
;; -------------------------------------
ttx_break
movlw .13
@@ -285,13 +286,13 @@ ttx_next_byte
xorwf TTX_CSUM,w
btfss STATUS,Z
goto ttx_csum_error
+ movlw '.'
+ movwf TXREG
return
ttx_csum_error
- bcf PORTD,TTX_RESET ;reset TTX
- nop
- nop
- bsf PORTD,TTX_RESET
+ movlw 'E'
+ movwf TXREG
return
;; -------------------------------------