In SX Microcontrollers, SX/B Compiler and SX-Key Tool, James Newton wrote: Although it probably doesn't apply to the OP's design, there are some interesting issues with multiple interrupt sources on the SX chips. Check out: [url=http://www.sxlist.com/techref/ubicom/sxints.htm ]http://www.sxlist.com/techref/ubicom/sxints.htm [/url] and especially the comments of Alexey Vladimirov near the bottom of the page: [quote="Alexey Vladimirov"] Each SX instruction in turbo mode executed in a 4-stage pipeline, consisting of the following steps: fetch instruction, decode opcode, execute opcode, write result. In the example mov !rb, w instruction at the second step simultaneously with instruction decode also read WKPND_B register and at the fourth step clear WKPND_B register. If another external interrupt on different portB pin occurs exactly at this time (at the 2,3,4 steps of the mov !rb, w execution), SX will loose this interrupt (as the WKPND_B register cleared and, therefore, pending bit for this interrupt also cleared without interrupt processing). It mean, that it is not possible to use 2 or more asynchronous external interrupts on the SX without loosing some interrupts. This problem related to all current (as of Jan 2001) SX revisions. [To work around this, check the pins by reading the actual port value after the first interrupt.] If you will use polling instead of interrupts - all will works OK. You can also use one external interrupt and poll other pins. However, if you have two asynchronous signals and you need interrupt on both (bridge application, for example), the only possible workaround we found - add some external glue logic (triggers for each interrupt with separate reset from SX port, as in any typical interrupt controller, like 8259) or change from interrupts to polling. [/quote]The page at: [url=http://www.sxlist.com/techref/ubicom/rtcc.htm ]http://www.sxlist.com/techref/ubicom/rtcc.htm [/url] also points out some little known information, although it only applies to the use of RTCC with an external clock signal. [quote="anon"] The SX literature says that the dual stage [url=http://www.sxlist.com/techref/ubicom/sync.htm][u]synchronizer[/u][/url] is _always_ activated on RTCC. If that is so, then the RTCC may actually be counting two LESS pulses than have actually been presented on the input pin. [/quote] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=232531#m232859 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)