Interrupt with TMR0

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

Moderators: Benj, Mods

Post Reply
calimero88
Posts: 19
Joined: Fri Jul 27, 2007 2:56 pm

Interrupt with TMR0

Post by calimero88 »

Bonjour, good morning

My program :

Scan analog Input : conversion and display to LCD with a period 1 seconde ( 1scan/ seconde) :
Mesure tension( Volt ) and courant(Amp) : calcul Power ( Watt) and Energy ( Watt/H ) and display Tension courant Power and energy to LCd 4*20

Difficulty to config and use function Interrupt with Tmr0 ( PIC 18F5550 with Xtal 8.000Mhz )

My program is not runing correct

thank.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Interrupt with TMR0

Post by Benj »

Hello

Your best bet is to firstly seperate the timer0 interrupt function to make sure it is triggering at the correct speed. You could for example increment a byte variable each interrupt and output the value to a I/O port. Using LEDs it would then be fairly easy to check the interrupt speed is correct for your settings. Remember in the interrupt properties to connect the timer's clock to CLKI and not T0CKI.

Post Reply