summaryrefslogtreecommitdiff
path: root/software/ttx/ttx.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2012-01-30 16:20:54 +0000
committerChristian Pointner <equinox@mur.at>2012-01-30 16:20:54 +0000
commit41667b2f3fb80a3b0c020727012d2946e9e5a367 (patch)
treebedf3615f5753b332084b2b966706feee4316ac4 /software/ttx/ttx.asm
parentfixed ack pulse (diff)
try slower mode for ihu-ttx communcation
git-svn-id: https://svn.spreadspace.org/mur.sat@242 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ttx/ttx.asm')
-rw-r--r--software/ttx/ttx.asm21
1 files changed, 15 insertions, 6 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm
index e579a3b..1580f34 100644
--- a/software/ttx/ttx.asm
+++ b/software/ttx/ttx.asm
@@ -151,9 +151,12 @@ ext_int_send_csum
swapf RX_CMD,w
andlw b'00001111'
movwf RX_CMD
-ext_int_wait_ack
+ext_int_wait_ack_low
+ btfsc GPIO,SCLK
+ goto ext_int_wait_ack_low
+ext_int_wait_ack_high
btfss GPIO,SCLK
- goto ext_int_wait_ack
+ goto ext_int_wait_ack_high
btfss GPIO,SDAT
bsf RX_STATE,complete
bsf STATUS,RP0
@@ -423,6 +426,9 @@ rx_byte
movlw .8
movwf RX_BIT_CNT
clrf INDF
+rx_byte_clk_low
+ btfsc GPIO,SCLK
+ goto rx_byte_clk_low
rx_byte_clk_high
btfss GPIO,SCLK
goto rx_byte_clk_high
@@ -437,7 +443,7 @@ rx_byte_clk_high
rx_byte_next
rlf INDF,f
- goto rx_byte_clk_high
+ goto rx_byte_clk_low
;; -------------------------------------
rx_send_csum
@@ -446,6 +452,9 @@ rx_send_csum
bcf STATUS,RP0
movlw .8
movwf RX_BIT_CNT
+rx_send_clk_low
+ btfsc GPIO,SCLK
+ goto rx_send_clk_low
rx_send_clk_high
btfss GPIO,SCLK
goto rx_send_clk_high
@@ -463,7 +472,7 @@ rx_send_clk_high
rx_send_next
rlf RX_CSUM,f
- goto rx_send_clk_high
+ goto rx_send_clk_low
;; -------------------------------------
dottime
@@ -795,12 +804,12 @@ seccnt_zero
movf BEACON_INT,w
movwf SECCNT
btfss NVSTATE,safe
- call send_beacon
+ ;; call send_beacon
goto powerdown
;; this gets called whenever a message was received from ihu
msg_received
- call send_ack
+ ;; call send_ack
bcf RX_STATE,complete
clrf RX_STATE