In SX Microcontrollers, SX/B Compiler and SX-Key Tool, robotworkshop wrote: I don't recall seeing this question come up before but when exactly does the Interrupt routine as defined in an SX/B program really start executing? Does it wait until after the housekeeping stuff is done like configuring the I/O ports, etc or does it fire up right away? Suppose you want to hold off starting up the ISR routine for a little bit when your program starts. Would it be best to just set a flag in the ISR, let it run, and use that to tell the ISR to do its job? Or, would you want to disable the interrupts until you are ready for them. One case in particular is when using a program on the SX chip with a background UART in the ISR. If it is connected to another device which is powered at the same time and the device may misbehave by sending junk as it starts then it would be reasonable to put in a delay or otherwise tell the background serial code to ignore anything on the line for a second or so after power is applied. This is one issue I just ran across when using an SX48 for a new project. I wired up a display to show any data sent to it on the serial line. I noticed a couple garbage characters on power up and if I can add a delay before the ISR starts that should fix that issue. Best Regards, Robert ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=234188 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)