summaryrefslogtreecommitdiff
path: root/bootloader/bootloader-887.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2013-07-20 13:26:47 +0000
committerChristian Pointner <equinox@spreadspace.org>2013-07-20 13:26:47 +0000
commit5510e238ce1a88b779f4d183a8b6dbd17e35ddca (patch)
treeeb05d4ade4ff84ae6ae1f26aac7c82042ac1c2f2 /bootloader/bootloader-887.asm
parentintroduced 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/bootloader-887.asm')
-rw-r--r--bootloader/bootloader-887.asm21
1 files changed, 15 insertions, 6 deletions
diff --git a/bootloader/bootloader-887.asm b/bootloader/bootloader-887.asm
index 9d1f564..8a34635 100644
--- a/bootloader/bootloader-887.asm
+++ b/bootloader/bootloader-887.asm
@@ -29,7 +29,9 @@
;; -------------------------------------
;; DEFINES (chip/com specific)
-#define BOOTPIN PORTC,7
+;; #define BOOTPIN PORTC,7 ; use this for com-uart
+#define BOOTPIN PORTA,5 ; use this for com-spi
+#define INTPIN PORTA,4 ; use this for com-spi
USERVECT EQU H'100'
ISRVECT EQU USERVECT + H'4'
FLASH_BOUNDARY EQU b'00001111' ; flash write boundary is at 16 bytes boundaries
@@ -67,9 +69,16 @@ flags EQU H'007D'
cnt EQU H'007F'
;; Boot Macro
-bootmacro macro
- ;; btfsc BOOTPIN
- ;; goto USERVECT
+;; bootmacro macro ; use this for com-uart
+;; btfsc BOOTPIN
+;; goto USERVECT
+;; goto com_init
+;; endm
+
+bootmacro macro ; use this for com-spi
+ bsf STATUS,RP0
+ bsf STATUS,RP1
+ bcf ANSEL,ANS4 ; RA5/SS as digital input -> BOOTPIN
goto com_init
endm
@@ -83,8 +92,8 @@ bootmacro macro
;; -------------------------------------
;; Bootloader (com specific subroutines and init)
-#include "com-16f887-uart.inc"
-;; #include "com-16f887-spi.inc"
+;; #include "com-16f887-uart.inc"
+#include "com-16f887-spi.inc"
;; -------------------------------------
;; Bootloader (generic init/body)