In generated .asm there is only the 10us routine, but the ms one is missing:
;********************************************************************************
;Subroutines included in program
;********************************************************************************
Delay_10US
D10US_START
movlw 16
movwf DELAYTEMP
D10US_LOOP
decfsz DELAYTEMP, F
goto D10US_LOOP
decfsz SysWaitTemp10US, F
goto D10US_START
return
Is really not an error but something that doesn't work as expected...
The same code in my last post :
_______________________________________________________________________
do while true
set LED1 ON
rebote = ReadAD(AN0)
set LED1 OFF
set LED2 ON
wait (rebote - ReadAD(AN0)) ms ' THIS DELAY
set LED2 OFF
loop
_______________________________________________________________________
In generated .asm there is only the 10us routine, but the ms one is missing:
;********************************************************************************
;Subroutines included in program
;********************************************************************************
Delay_10US
D10US_START
movlw 16
movwf DELAYTEMP
D10US_LOOP
decfsz DELAYTEMP, F
goto D10US_LOOP
decfsz SysWaitTemp10US, F
goto D10US_START
return
;********************************************************************************
FN_READAD
banksel ADCON1
..............
.............
;********************************************************************************
When assembling i have the error: Symbol not previously defined (Delay_MS)
This code works ok:
______________________________________________________________________________
do while true
set LED1 ON
rebote = ReadAD(AN0)
set LED1 OFF
set LED2 ON
tiempo = rebote - ReadAD(AN0)
wait tiempo ms
set LED2 OFF
loop
_____________________________________________________________________________
Just to report this behavior....
greatings.
The update should solve this as well, the compiler wasn't dealing with spaces in the Wait command properly. Thanks for reporting the bug!