thierryneuch
Member level 2

the bug is on (movlw .15) --->movlw D'15'
- - - Updated - - -
the bug is on (movlw .15) --->movlw D'15'
- - - Updated - - -
Code:
;**********************************************************************
;* ********************Programme pricnipal********************
;**********************************************************************
Wait
movf TMR0,f ;set Z in STATUS if TMR0 = 0
btfss STATUS,Z ;bit test the Z bit, skip if set (= Zero)
goto Wait ;not zero yet so keep checking
decfsz Delay,f ;subtract 1 from Delay and see if zero
goto Wait ;not reached zero yet so keep checking
;'Delay' has reached zero so ~1 second has elapsed
movlw D'15' ;reload 'Delay' again
movwf Delay ; code to read the ADC comes next
- - - Updated - - -
the bug is on (movlw .15) --->movlw D'15'
Code:
;**********************************************************************
;* ********************Programme pricnipal********************
;**********************************************************************
Wait
movf TMR0,f ;set Z in STATUS if TMR0 = 0
btfss STATUS,Z ;bit test the Z bit, skip if set (= Zero)
goto Wait ;not zero yet so keep checking
;reload 'Delay' again
movwf Delay
; code to read the ADC comes nextdecfsz Delay,f ;subtract 1 from Delay and see if zero
goto Wait ;not reached zero yet so keep checking
;'Delay' has reached zero so ~1 second has elapsed
movlw D'15'
- - - Updated - - -
Code:
;**********************************************************************
;* ********************Programme pricnipal********************
;**********************************************************************
Wait
movf TMR0,f ;set Z in STATUS if TMR0 = 0
btfss STATUS,Z ;bit test the Z bit, skip if set (= Zero)
goto Wait ;not zero yet so keep checking
decfsz Delay,f ;subtract 1 from Delay and see if zero
goto Wait ;not reached zero yet so keep checking
;'Delay' has reached zero so ~1 second has elapsed
movlw D'15' ;reload 'Delay' again
movwf Delay
; code to read the ADC comes next
Last edited by a moderator: