MOVLW B'01110100' ; set 8MHz & freq. stable mode MOVWF OSCCON ; OSC control reg.
;MOVLW B'11000000' ; set SMP & CKE ;MOVWF SSPSTAT ; SPI data input sample phase bit ; and SPI clock edge MOVLW 07H ; 00000111 MOVWF ADCON1 ; set PCFG<3:0> to 0111, C/R=0/0
BANKSEL PORTA CLRF PORTA ; clear all pin CLRF PORTB
CLRF INTCON ; ensure all interrupt are disable ; interrupt control reg. ;MOVLW B'01000000' ; set PEIE ;MOVWF INTCON ; peripheral interrupt enable bit
;MOVLW B'00001000' ; set SSPIF, SSP interrupt flag ;MOVWF PIR1 ; peripheral interrupt request reg.
;MOVLW B'00110000' ; set SSPEN & CKP MOVLW B'00100000' ; set SSPEN MOVWF SSPCON ; Initial SPI control reg.
都會出現以下的訊息,雖然無關燒錄~~但總希望能完美。
Clean: Deleting intermediary and output files. Clean: Deleted file "CAN_TEST_1.err". Clean: Deleted file "D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.cod". Clean: Deleted file "D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.hex". Clean: Deleted file "CAN_TEST_1.lst". Clean: Deleted file "D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST.mcs". Clean: Done. Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F819 "CAN_TEST_1.asm" /l"CAN_TEST_1.lst" /e"CAN_TEST_1.err" Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 54 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 57 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 60 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 66 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 72 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 104 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 108 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 200 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 213 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 224 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 235 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 247 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 254 : Register in operand not in bank 0. Ensure that bank bits are correct. Loaded D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.COD. BUILD SUCCEEDED: Fri Dec 09 11:22:41 2005