Interrupts!

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Legoman
Posts: 2
Joined: Sat Dec 15, 2007 3:45 pm
Location: UK

Interrupts!

Post by Legoman »

Hi, im trying to use a timer interrupt to trigger the interrupt service routine and read a value from the ADC. however when trying to compile the ISR doesnt like to call any functions and spits an error at me.

any help woule be appreciated.

its a 16F876 btw.

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times

Post by Sean »

Hello Legoman,

The ADC component functions: SampleADC, ReadAsInt and ReadAsByte can be included in the macro called by the timer interrupt. The returned value and any control flags can then be saved to global variables.

It is advisable not to do too much more from within the interrupt service routine, but return as quickly as possible to the main program.

Post Reply