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.
Interrupt with TMR0
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel