summaryrefslogtreecommitdiff
path: root/software
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2012-01-29 11:28:26 +0000
committerChristian Pointner <equinox@mur.at>2012-01-29 11:28:26 +0000
commit7c478be0ee2084b338cf3c0d742e28931a04f6bc (patch)
tree60962e6b9388cd0ed2f3d93a8c32976ef8bfd83e /software
parentmake sure FST + IRP are fitting (diff)
fixed ack pulse
git-svn-id: https://svn.spreadspace.org/mur.sat@241 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software')
-rw-r--r--software/ihu/ihu.asm7
-rw-r--r--software/ihu/ttx.inc13
2 files changed, 17 insertions, 3 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index c213698..d2ae016 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -301,9 +301,10 @@ init
movwf DTMF_BUF_PTR
clrf DTMF_CS
- bcf PORTD,TTX_RESET ;reset TTX
bcf PORTD,TTX_SCL
bcf PORTD,TTX_SDA
+ nop
+ bcf PORTD,TTX_RESET ;reset TTX
clrf TMR0
bsf INTCON,GIE
@@ -394,9 +395,11 @@ main_read_bytes
movlw BUF
movwf FSR
- movlw 0xA2
+ movlw 0xA0
call ttx_send
+ goto main
+
xorlw .0
btfss STATUS,Z
goto main_error
diff --git a/software/ihu/ttx.inc b/software/ihu/ttx.inc
index 2098340..82b8d14 100644
--- a/software/ihu/ttx.inc
+++ b/software/ihu/ttx.inc
@@ -123,7 +123,7 @@ ttx_get_csum
call ttx_break
call ttx_recv_byte
movf TTX_BYTE,w
- xorwf TTX_CSUM,w
+ xorwf TTX_CSUM,w
btfss STATUS,Z
goto ttx_csum_error
retlw .0
@@ -136,6 +136,10 @@ ttx_send
call ttx_send_frame
movwf TTX_BYTE
call ttx_break
+
+ bsf STATUS,RP0
+ bcf TRISD,TTX_SDA
+ bcf STATUS,RP0
btfsc TTX_BYTE,0
bcf PORTD,TTX_SDA
btfss TTX_BYTE,0
@@ -145,5 +149,12 @@ ttx_send
nop
nop
bcf PORTD,TTX_SCL
+ nop
+ nop
+ nop
+ bsf STATUS,RP0
+ bsf TRISD,TTX_SDA
+ bcf STATUS,RP0
+ movf TTX_BYTE,w
return
;; -------------------------------------