diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-07-25 23:53:17 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-07-25 23:53:17 +0000 |
commit | 188be8138aa9b103a7d7c27e0c6866a8e01c5931 (patch) | |
tree | 492036641d2d7b78437878398a0425a3e3e79715 /bootloader | |
parent | fixed raise condition for SPI/SS and INT Pin (diff) |
bootloader 887 with com-spi works now
git-svn-id: https://svn.spreadspace.org/pic/trunk@93 a09c6847-51d9-44de-8ef2-e725cf50f3c7
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/bootloader-887.asm | 2 | ||||
-rw-r--r-- | bootloader/com-16f887-spi.inc | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/bootloader/bootloader-887.asm b/bootloader/bootloader-887.asm index 8a34635..889a8ac 100644 --- a/bootloader/bootloader-887.asm +++ b/bootloader/bootloader-887.asm @@ -24,7 +24,7 @@ LIST p=16F887 include "p16f887.inc" - __config _CONFIG1, _DEBUG_OFF & _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_OFF & _INTOSC + __config _CONFIG1, _DEBUG_OFF & _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_OFF & _WDT_OFF & _INTOSC __config _CONFIG2, _BOR21V & _WRT_256 ;; ------------------------------------- diff --git a/bootloader/com-16f887-spi.inc b/bootloader/com-16f887-spi.inc index 000e05b..4fb41c8 100644 --- a/bootloader/com-16f887-spi.inc +++ b/bootloader/com-16f887-spi.inc @@ -48,16 +48,13 @@ com_rx_byte goto com_rx_byte com_rx_got_byte - bsf STATUS,RP0 + bcf STATUS,RP0 movf SSPBUF,w return ;; ----- initialize com (this is called by bootmacro, it's not a subroutine - no return at the end) com_init ;; bank 3 - we are already there, see bootmacro - btfsc BOOTPIN - goto USERVECT - ;; bank 1 bcf STATUS,RP1 movlw b'01110000' ; set internal OSC to 8MHz @@ -69,6 +66,8 @@ com_init ;; bank 0 bcf STATUS,RP0 + btfsc BOOTPIN + goto USERVECT movlw b'00100100' ; SSPEN=1,CKP=0,SSPM=0100(SPI Slave with SS) movwf SSPCON bsf INTPIN |