User Manual

TMCM-3230 TMCL
Firmware Manual Firmware Version V1.07 | Document Revision V1.05 2017-OCT-10
19 / 103
9
WAIT TICKS , 0, 50
SIO 3, 2, 0
11
WAIT TICKS , 0, 50
JA Loop
13
//Here is the interrupt handling routine
15
Timer0Irq:
GIO 0, 2 //check if OUT0 is high
17
JC NZ, Out0Off //jump if not
SIO 0, 2, 1 // switch OUT0 high
19
RETI // end of interrupt
Out0Off:
21
SIO 0, 2, 0 // switch OUT0 low
RETI // end of interrupt
In the example above, the interrupt numbers are being used directly. To make the program better readable
use the provided include le Interrupts.inc. This le denes symbolic constants for all interrupt numbers
which can be used in all interrupt commands. The beginning of the program above then looks as follows:
#include Interrupts.inc
2
VECT TI_TIMER0 , Timer0Irq
SGP TI_TIMER0 , 3, 1000
4
EI TI_TIMER0
EI TI_GLOBAL
©2017 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com