Page 1 of 1

Timer interrupts in BASIC

Posted: Mon Feb 11, 2013 1:05 am
by YahooArchive
I am using the ARMmite PRO with the ARM Basic Compiler
So I see how to enable the internal clock timer with ON TIMER but how do you
stop the timer? Also it seems that the very first interrupt occurs early and
then the following interrupts are at the specified time interval
paulsandland @ gmail.com

Re: Timer interrupts in BASIC

Posted: Mon Feb 11, 2013 1:08 am
by YahooArchive
> I am using the ARMmite PRO with the ARM Basic Compiler
> So I see how to enable the internal clock timer with ON TIMER but how do you
stop the timer? Also it seems that the very first interrupt occurs early and
then the following interrupts are at the specified time interval

Turn off the interrupt by writing to the interrupt enable register, in the help
files at

http://www.coridium.us/ARMhelp/scr/v7on.html

The timer is free running so the first interrupt will occur when the timer hits
the interval (the timer was set to 0 at the start of the program so if your
program takes a lot of time to startup, the first interrupt may occur sooner).

The ON keyword will continue to be supported for ARM7 parts (LPC21xx), but
INTERRUPT SUB are really the way to go.