VARIABLE DEFINITIONS
temp EQU 0x08 ;example variable definition
Delay_Var1 EQU 0x09
Delay_Var2 EQU 0x0a
;**********************************************************************
ORG 0x1FF ; processor reset vector
; Internal RC calibration value is placed at location 0x1FF by Microchip
; as a movlw k, where the k is a literal value.
ORG 0x000 ; coding begins here
movwf OSCCAL ; update register with factory cal value
bsf OSCCAL,0
start
nop ; example code
movlw 0xFF ; example code
movwf temp ; example code
; remaining code goes here
movlw B'11110011
movwf CMCON0
movlw B'11111100
tris GPIO
Null_Loop
bsf GPIO,0
bsf GPIO,1
call Delay
bcf GPIO,0
bcf GPIO,1
call Delay
goto Null_Loop
Delay
clrf Delay_Var1
Delay_Loop2
clrf Delay_Var2
Delay_Loop1
nop
nop
decfsz Delay_Var2,F
goto Delay_Loop1
decfsz Delay_Var1,F
goto Delay_Loop2
return
END ; directive 'end of Program'
*********** Question ????? ***********
movwf OSCCAL bsf OSCCAL,0(1)是否一開始都要如此設定 也適用於12c508,and 16f84嗎?
(2)start 後面的 nop 是有何作用呢 ?
movwf CMCON0(3)這又在做甚麼??
(4)Delay 多少時間呢 ?