lpcware

Coridium SuperPro+ BASIC Compiler

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by dgarofolo on Tue Jul 17 06:03:08 MST 2012
I am trying to connect a quadrature (rotory) encoder to my Coridium SuperPro+ board, using their free BASICtools compiler. It needs to run on a timed interrupt to ensure an adequate polling rate. I can't figure out how to get the interrupts to work as explained in the help files. Does anyone have any experience with this BASIC compiler? Below is my test code. I would expect that every second it would print a higher value for X. I get zeros, so the Interrupt Sub must not be running? Any suggestions or sample code would be greatly appreciated.

DIM X As Integer

INTERRUPT SUB every20msec:
X = X + 1
ENDSUB

main:

ON TIMER 20 every20msec

PRINT "DO SOME OTHER STUFF TOO"
PRINT X
Wait (1000)

GOTO Main

END

Outcomes