diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-07-20 13:26:47 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-07-20 13:26:47 +0000 |
commit | 5510e238ce1a88b779f4d183a8b6dbd17e35ddca (patch) | |
tree | eb05d4ade4ff84ae6ae1f26aac7c82042ac1c2f2 /bootloader/com-16f887-spi.inc | |
parent | introduced boot macro (diff) |
com spi for 887 now fits within flash boundary
TODO: test this - not sure if this works...
git-svn-id: https://svn.spreadspace.org/pic/trunk@89 a09c6847-51d9-44de-8ef2-e725cf50f3c7
Diffstat (limited to 'bootloader/com-16f887-spi.inc')
-rw-r--r-- | bootloader/com-16f887-spi.inc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/bootloader/com-16f887-spi.inc b/bootloader/com-16f887-spi.inc index e4b8d2a..08a3b84 100644 --- a/bootloader/com-16f887-spi.inc +++ b/bootloader/com-16f887-spi.inc @@ -20,8 +20,6 @@ ;; along with spreadspace pic utils. If not, see <http://www.gnu.org/licenses/>. ;; -#define INTPIN PORTA,4 - ;; --- transmit byte and add it to csum com_tx_byte movwf SSPBUF @@ -53,12 +51,11 @@ com_rx_got_byte movf SSPBUF,w return - ;; ----- initialize com (not a subroutine, com_init is called by generic_init + ;; ----- initialize com (this is called by bootmacro, it's not a subroutine - no return at the end) com_init - ;; bank 3 - bsf STATUS,RP0 - bsf STATUS,RP1 - bcf ANSEL,ANS4 ; RA5/SS as digital input + ;; bank 3 - we are already there, see bootmacro + btfsc BOOTPIN + goto USERVECT ;; bank 1 bcf STATUS,RP1 @@ -68,7 +65,7 @@ com_init movwf SSPSTAT bcf TRISC,5 ; RC5(SDO) = out bcf INTPIN ; interrupt line to master - + ;; bank 0 bcf STATUS,RP0 movlw b'00100100' ; SSPEN=1,CKP=0,SSPM=0100(SPI Slave with SS) |