Hello,
The program blocks completely when j' call: " Adc0 = ADC.Read (0) " in a routine d' interruption. But when I make l' call in the loop pricipale, any problem????????
for 18F4620 :
Clock = 20
(PR2 = 64) -----> Int callled all the 13 us
ADC.SetAcqTime(11)
ADC.SetConvTime(FOSC_4)
Interrupt RTC() ----> Here is Block All --> (OverSomethink ??????)
Adc0 = abs(ADC.Read(0))
delayus(50)
PIR1.1 = 0 ' clear interrupt flag
End Interrupt
While true ------> Here is OK
Adc0 = abs(ADC.Read(0))
wend
Calling ADC in interrupt. Block All !
Moderators: David Barker, Jerry Messina
Calling ADC in interrupt. Block All !
My first interest is working with a PWM signal.
Motor : 24 Volts 4 or 5 A.
Motor : 24 Volts 4 or 5 A.
Hello,
Read the Swordfish documentation (or Help file) concerning the Context saving/restoring in interrupt routines.
See http://www.sfcompiler.co.uk/downloads/SFManual.pdf (the pdf doc) Page 46 - Context Saving section.
Regards
octal
Read the Swordfish documentation (or Help file) concerning the Context saving/restoring in interrupt routines.
See http://www.sfcompiler.co.uk/downloads/SFManual.pdf (the pdf doc) Page 46 - Context Saving section.
Regards
octal
Thanks your !
Hello, Thanks very much.
If i understand, it's force the Interrupt to Wait the include Sub....
Here Is The Simple Result :
Interrupt RTC()
save(0,ADC.Read)
Adc0 = ADC.Read(0)
restore
PIR1.1 = 0 ' clear interrupt flag
End Interrupt
If i understand, it's force the Interrupt to Wait the include Sub....
Here Is The Simple Result :
Interrupt RTC()
save(0,ADC.Read)
Adc0 = ADC.Read(0)
restore
PIR1.1 = 0 ' clear interrupt flag
End Interrupt
My first interest is working with a PWM signal.
Motor : 24 Volts 4 or 5 A.
Motor : 24 Volts 4 or 5 A.