In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: You need to use GOTO [code] '========================================================================== ' INTERRUPT ' ------------------------------------------------------------------------- ISR_Start: GOTO ISR_Code '========================================================================= PROGRAM Start '========================================================================= ' ------------------------------------------------------------------------- ' Program Code ' ------------------------------------------------------------------------- READKEY SUB 0 ' <<< Is this in the right place? Start: TRIS_Keys = %1111_0000 ' refresh IO state Keys = %0000_0000 ' Set Key Row Drive low for WKED WKED_B = %1111_1111 ' Falling edge detect WKEN_B = %0000_1111 ' Use bits 4-7 for inputs ST_B = %0000_1111 ' Bits 4-7 are Schmitt Trigger Inputs '... '------------------------------------------------------------------------- ISR_Code: PULSOUT RA.0, 1000 'FLASH TEST LED PULSOUT RA.1, 1000 PULSOUT RA.2, 1000 READKEY ' <<< THIS GENERATES COMPILER ERROR 'UNKNOWN COMMAND' ISR_Exit: Keys = %0000_0000 'Set Key Row Drive low for WKED WakePend = %0000_0000 'CLEAR INTERRUPT PENDING FLAG. RETURNINT SUB READKEY . . . ENDSUB '============================================================= [/code] Bean ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=465606#m465689 Need assistance? Send an email to the Forum Administrator at sysadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2010 (http://www.dotNetBB.com)