summaryrefslogtreecommitdiff
path: root/software/ihu/ihu.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-07-25 02:04:21 +0000
committerChristian Pointner <equinox@mur.at>2011-07-25 02:04:21 +0000
commitdd52ba2388271d3b646b013ae45efa90564d0cfd (patch)
tree3f2f1043772b119af85a58acee75af4f833dd09b /software/ihu/ihu.asm
parentswitched to 125kHz for TTX (diff)
first working communication between ihu and ttx
ttx has 2s watchdog now ttx main timer wakes every second better input check for sending chars git-svn-id: https://svn.spreadspace.org/mur.sat@54 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/ihu.asm')
-rw-r--r--software/ihu/ihu.asm63
1 files changed, 63 insertions, 0 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index fba1121..bf87899 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -170,7 +170,26 @@ uart_rx_fe
;; -------------------------------------
ttx_send_byte
+ bsf PORTD,TTX_SCL
movwf TTX_BYTE
+ clrf TTX_CNT
+ bcf PORTD,TTX_SCL
+ttx_pre
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ decfsz TTX_CNT,f
+ goto ttx_pre
movlw .8
movwf TTX_CNT
ttx_next_bit
@@ -179,7 +198,51 @@ ttx_next_bit
btfss TTX_BYTE,7
bcf PORTD,TTX_SDA
bsf PORTD,TTX_SCL
+ 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
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
rlf TTX_BYTE,f
decfsz TTX_CNT,f
goto ttx_next_bit