I have been experimenting with using some simulator functions of MPLab, namely the stopwatch and stimulus. Part of my program is this simple code for a delay. I put breakpoints at the second decfsz and nop. Using "animate," only the breakpoint at decfsz is found. If I inactivate that breakpoint, it loops continuously. However, when I use "run", it stops at the NOP and gives an accurate time with the stopwatch.
Why doesn't it stop at the NOP breakpoint with animate, but does with run?
Thanks.
John
(I have not cleaned up the Microchip template)
Why doesn't it stop at the NOP breakpoint with animate, but does with run?
Thanks.
John
(I have not cleaned up the Microchip template)
Rich (BB code):
;***** VARIABLE DEFINITIONS
d1 equ d'9'
d2 equ d'14'
;**********************************************************************
ORG 0x3FF ; processor reset vector
movlw 0x50
; Internal RC calibration value is placed at location 0x3FF 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
movlw b'11011011'
tris GPIO
movlw b'00000000'
option
start
movlw 0x06
movwf d1
movlw 0x08
movwf d2
Delay_0
decfsz d1,f
goto $+2
decfsz d2,f
goto Delay_0
goto $+1
nop
END