In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Hi Paul, this is a tricky one... When SX/B generates code for an SX18/20, it defines addresses $07 for __PARAM1, $08 for __PARAM2, etc. When generating code for the SX28, the addresses have an offset of 1, i.e. __PARAM1 is located at $08, etc. This is because the SX28 maps port C into address $07, where an SX18/20 device, not supporting port C allows to use address $07 as a "regular" register. I did not check the SXSim code in detail do far, but I'm pretty sure that I forgot to handle address $07 correctly. IOW, for now, SXSim assumes that $07 is mapped to port C even when it simulates an SX18/20. Because of this, you may write to $07 whatever you want but when reading $07, SXSim will return the status of the (non-existing) simulated port C bits instead of what you have written to $07 before. Having noticed that, I'll also have to check if this is handled correctly for the simulated SX48/52 devices with the additional ports D and E mapped into $08 and $09. I have added this topic to my SXSim TODO list, and I'll take care of it as soon as possible. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=6&m=53539#m90625 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)