Hello,
I find an error during the compilation of which I can not understand its origin.
It is a mathematical operation on a word variable.
I attach a test list that generates the error and a screen with the generated error.
#OptionExplicit' -' -
#Chip16F1847, 32
#ConfigOSC=INT, MCLR_OFF' -' Timers
#DefineMAXTIMERS8
#DefineTMR_ORASTARTTimer(0)
#DefineTMR_MINUTOSTARTTimer(1)
#DefineTMR_ORASTOPTimer(2)
#DefineTMR_MINUTOSTOPTimer(3)
#DefineTMR_GIORNITimer(4)
#DefineTMR_MASKRELETimer(5)
#DefineTMR_ATTIVOTimer(6)
#DefineTMR_ABILITATOTimer(7)' -' Per la gestione dell'orariodeitimersDimwStart(MAXTIMERS)AsWordDimwStopp(MAXTIMERS)AsWordDimwIncre(MAXTIMERS)AsWordDimTimer(8)AsByte'main:
CalcolaValoriTimer(1)End' ========================================================================' Calcola i valori con l'orarioperlaprogrammazionedituttiitimers' ------------------------------------------------------------------------SubCalcolaValoriTimer(InNTimerAsByte)' LeggiTimer NTimer 'ReadfromEEPromwStart(NTimer-1)= [Word] TMR_ORASTART*60+TMR_MINUTOSTART' Ora startwStopp(NTimer-1)= [Word] TMR_ORASTOP*60+TMR_MINUTOSTOP' Ora Stop'-IfwStart(NTimer-1)>wStopp(NTimer-1)ThenwIncre(NTimer-1)=wStoppwStopp(NTimer-1)=wStopp(NTimer-1)+1440ElsewIncre(NTimer-1)=0EndIfEndSub'
Hello,
I find an error during the compilation of which I can not understand its origin.
It is a mathematical operation on a word variable.
I attach a test list that generates the error and a screen with the generated error.
Problem solved !
After two hours of repricing I realized that I had not put the index on the wstop variable.
This is the advancing old age ...
:-)
wIncre (NTimer -1) = wStopp
wherewStopp
needed an array index.Easy to do, hard to debug.