Timer Interrupt spits out a decimal point
Posted: Sun Mar 03, 2013 3:58 pm
Why am I getting a decimal point printed for every interrupt?
I don't even have a print statement.
Is there some debug code doing this?
I don't even have a print statement.
Is there some debug code doing this?
Code: Select all
#include "LPC17xx.bas"
Dim Every_x_ms as integer
SUB ON_TIMER ( msec, dothis ) '
TIMER1_ISR = dothis + 1 ' set function of VIC
VICIntEnable = VICIntEnable or (1<<2) ' Enable interrupt
T1_MR0 = msec-1 ' set up match number of ms
T1_MCR = 3 ' Interrupt and Reset on MR0
T1_IR = 1 ' clear interrupt
T1_TC = 0 ' clear timer counter
T1_TCR = 1 ' TIMER1 Enable
ENDSUB '
INTERRUPT SUB DO_TimerInterrupt '
T1_IR = 1 ' Clear interrupt
ENDSUB '
main:
Every_x_ms = 100
ON_TIMER(Every_x_ms, ADDRESSOF DO_TimerInterrupt) '
WHILE (1)
WAIT(100)
LOOP
END