In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: If you want to call subroutines from an interrupt do this: ' ------------------------------------------------------------------------- INTERRUPT ' ------------------------------------------------------------------------- GOTO ISR_Start ' ------------------------------------------------------------------------- readI2C SUB 1 ' ------------------------------------------------------------------------- ISR_Start: if Sensor = 0 THEN for temp4 = 0 to 10 lcdChr = readI2C temp4 writeI2C temp4 + 20 pause 1 next SOUND Piezo, 80, 200 ' Audible Alert to say ready to get started pause DelayForBounce endif RETURNINT ' {cycles} '======== PROGRAM START '======== readI2c: ' put code here RETURN Bean ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=89749#m89757 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)