In SX Microcontrollers, SX/B Compiler and SX-Key Tool, EmptyBit wrote: Is this an odd bug I have found in programming the SX48? I am creating a bit array table(3 bytes x 7 bytes). Each time the loop completes a run to fill the array, I clear it before restarting the fill process. I am using the OR statement to accomplish filling the bits into this array from data derived elswhere in the code. The code goes through the clearing of ram area and all zeros show in the debug screen at the start of the loop. This is using Guenthers SX48 book example. The first cycle through the code works fine. As long as the array does not change, the bits are stable. Then comes the problem where the bits do change on subsequent data changes that alter the array. Although I have clear all banks in this area prior to the change and refill, the OR'd value left behind includes the previous value OR'd with the new value within any register of the array that did change. I do understand OR'ing is a compound instruction using W as the temp, but a lot of other functions use W before it is used for the OR functions. The clearing of the ram area including the array are both indirectly addressed. No variable storage is in bank 0($10-$1f). Filling the array is also indirectly addressed. The only previous section to this routine is setting the Rb,Rc,Rd,Re for their respective modes. All variables are re-initialized within the routine which they are used. So, where is the previous OR'd value coming from, if all ram area, including global and variables are cleared, but as it should be(for one cycle) when reset? Spooky Ram Shadows? :confused: Any ideas for resolving this sure would be a BIG HUGE help. What can I do about this? :cry: DC ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=125487 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)