In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: You cannot declare SUBs before the INTERRUPT command. Do this: [code] ' ------------------------------------------------------------------------- INTERRUPT 50_000 GOTO ISR_Start ' ------------------------------------------------------------------------- ' ------------------------------------------------------------------------- ' Subroutine Declarations ' ------------------------------------------------------------------------- CHECK_SPINNING SUB 0 ' MEM_OUT SUB 3 ' write value to memory MEM_IN SUB 2 ' read byte from memory ' ------------------------------------------------------------------------- ISR_Start: Ch1: [/code] You have some problems in your code though. For example from within the interrupt routine you are using "GOTO Check_Spinning", but that is a subroutine. If you really just want to call the Check_Spinning subroutine, just use "Check_Spinning" without the goto. Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=251649#m251652 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)