In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: RobotWorkshop, You did a good job documenting the problem. I believe you have found a discrepancy between the SX simulator and the SX48 hardware! The problem occurs with this assembly command: [CODE]MOV !RB,W[/CODE] It is described in the documentation as a read command. However, in the simulator the displayed TRIS value is actually taking on the value of the W register (as would happen under a write instruction). Additionally, the simulator does not appear to adjust the value of W to reflect the contents of the TRIS register during this same operation. The end result of the entire sequence of assembly instructions for the SX/B [B]LOW[/B] commands is currently this. The displayed simulator contents of the TRIS register will always reflect the highest nibble as outputs and the lowest nibble as inputs except for the selected bit, which will actually reflect the correct direction. I do not expect the actual hardware to behave this way. Can anyone comment on the behavior of real SX48 hardware under the above assembly statement? - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=183046#m183172 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)