In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote: Your ISR which uses lots of division is probably pushing the sub/func declarations past address $100 -- the declarations must be in the "lower half" of a memory page; i.e. $000-$0FF. The easiest way to ensure this is to move your ISR to the end of your program with a jump -- this way the code that follows, the sub/func declarations will be in the right spot... i.e. [code] INTERRUPT 100_000 GOTO Interrupt _Handler ' jump to where the ISR really is PROGRAM Start MEASURE_LO FUNC 2 MEASURE_HI FUNC 2 delay SUB 1, 2 Start: TRIS_disp = %00000000 rpm = 1 Main: ' lots more code Subroutine_And_Functions: Interrupt_Handler: LOW RA.3 digit1 = currentrpm / 100 currentrpm = __REMAINDER READ SegMap + currentrpm, display HIGH RA.3 LOW RA.2 digit1 = digit1 / 10 currentrpm = __REMAINDER READ SegMap + currentrpm, display HIGH RA.2 LOW RA.1 digit1 = digit1 / 10 currentrpm = __REMAINDER READ SegMap + currentrpm, display HIGH RA.1 RETURNINT [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=307740#m307759 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)