In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: The SX/B command high ra compiles into MOV W,#$1F ; high ra MOV M,W MOV !RA,#0 MOV RA,#$FF If ra was already set to all outputs there is no problem. If ra however was set to inputs, but the latch holds zeroes, then changing to outputs makes the pins low and the mov ra,#$FF makes the pin high. So there is a (possible) glitch. I think the order should be MOV RA,#$FF MOV W,#$1F ; high ra MOV M,W MOV !RA,#0 If the pins are already outputs, the pins get the right value. If the pins were inputs, the pins also get the right value, but without a glitch. So the order should be: set latch, then set direction. regards peter ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=144827 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)