summaryrefslogtreecommitdiff
path: root/software/ihu/ttx.inc
diff options
context:
space:
mode:
Diffstat (limited to 'software/ihu/ttx.inc')
-rw-r--r--software/ihu/ttx.inc72
1 files changed, 69 insertions, 3 deletions
diff --git a/software/ihu/ttx.inc b/software/ihu/ttx.inc
index 82b8d14..6c05672 100644
--- a/software/ihu/ttx.inc
+++ b/software/ihu/ttx.inc
@@ -46,11 +46,32 @@ ttx_send_next_bit
nop
nop
nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
bcf PORTD,TTX_SCL
nop
nop
nop
nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
rlf TTX_BYTE,f
decfsz TTX_BIT_CNT,f
goto ttx_send_next_bit
@@ -68,12 +89,36 @@ ttx_recv_next_bit
nop
nop
nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
bcf PORTD,TTX_SCL
nop
nop
nop
nop
nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
rlf TTX_BYTE,f
btfsc PORTD,TTX_SDA
bsf TTX_BYTE,0
@@ -135,23 +180,44 @@ ttx_csum_error
ttx_send
call ttx_send_frame
movwf TTX_BYTE
+ movwf TXREG
call ttx_break
+ bsf PORTD,TTX_SDA
bsf STATUS,RP0
bcf TRISD,TTX_SDA
bcf STATUS,RP0
- btfsc TTX_BYTE,0
- bcf PORTD,TTX_SDA
btfss TTX_BYTE,0
- bsf PORTD,TTX_SDA
+ bcf PORTD,TTX_SDA
bsf PORTD,TTX_SCL
nop
nop
nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
bcf PORTD,TTX_SCL
nop
nop
nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
bsf STATUS,RP0
bsf TRISD,TTX_SDA
bcf STATUS,RP0