summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2013-08-12 12:58:40 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2013-08-12 12:58:40 (GMT)
commitf9e762f6fdc68eff667145b12abb563418f26b1e (patch)
tree957918bdf30aba3fb652aac03f8b2f696e46fd67
parente82a36467fd8bcf28b9155f946f71847e1de7e0f (diff)
deassert INT pin before wait for SS
git-svn-id: https://svn.spreadspace.org/pic/trunk@101 a09c6847-51d9-44de-8ef2-e725cf50f3c7
-rw-r--r--bootloader/com-16f1847-spi.inc6
-rw-r--r--bootloader/com-16f887-spi.inc4
2 files changed, 4 insertions, 6 deletions
diff --git a/bootloader/com-16f1847-spi.inc b/bootloader/com-16f1847-spi.inc
index e7ae182..02ef87d 100644
--- a/bootloader/com-16f1847-spi.inc
+++ b/bootloader/com-16f1847-spi.inc
@@ -31,14 +31,12 @@ com_tx_byte
com_tx_byte_wait1
btfss SSPSTAT,BF
goto com_tx_byte_wait1
+ movf SSP1BUF,w
movlb .0
+ bsf INTPIN
com_tx_byte_wait2 ; also wait for SS to go up again
btfss PORTB,5 ; this lowers the risk for raise conditions
goto com_tx_byte_wait2 ; with next byte (INT pin)
- movlb .4
- movf SSP1BUF,w
- movlb .0
- bsf INTPIN
return
;; ---- wait for byte to be received
diff --git a/bootloader/com-16f887-spi.inc b/bootloader/com-16f887-spi.inc
index 800b1da..051c275 100644
--- a/bootloader/com-16f887-spi.inc
+++ b/bootloader/com-16f887-spi.inc
@@ -30,11 +30,11 @@ com_tx_byte_wait1
btfss SSPSTAT,BF
goto com_tx_byte_wait1
bcf STATUS,RP0
+ movf SSPBUF,w
+ bsf INTPIN
com_tx_byte_wait2 ; also wait for SS to go up again
btfss PORTA,5 ; this lowers the risk for raise conditions
goto com_tx_byte_wait2 ; with next byte (INT pin)
- movf SSPBUF,w
- bsf INTPIN
return
;; ---- wait for byte to be received