In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: It seems like I should probably know the answer to this question but I have been unable to find a concise explanation. Can someone explain to me, "[I][B]Which SX/B operations can be performed with array elements and which ones require general purpose variables for use?[/B][/I]" It seems I have run out of general purpose variables in my SX/B program while trying to add Bean's [URL=http://forums.parallax.com/forums/attach.aspx?a=10328]background UART[/URL] code. In trying to understand the difference myself between using array variables vs. general purpose variables I came across several threads discussing Bank Switching. The most helpful thread I was able to find was this one discussing an [URL=http://forums.parallax.com/forums/default.aspx?f=7&m=146212]SX/B RAM Banking Scheme[/URL]. It made it sound like I can create a variable array along with some aliases then issue a Bank (something) statement before I attempt to use them followed by a Bank 0 statement when I am done. Is this correct? If so, what happens if an interrupt occurs and/or I use Bank statements within the interrupt? What precautions do I need to take to insure each code segment is always looking at the correct memory bank? My long-term goal is to understand how to make the best use of the SX RAM space even beyond the general purpose variable space that (I think) resides in Bank 1. My short term goal is to add [URL=http://forums.parallax.com/forums/default.aspx?f=7&m=151101&g=154773#m154773]Bean's interrupt based UART[/URL] to my existing program given that I have no more general purpose variables left! I do not know how to tell which (if any) of my existing variables can be moved to an array. There have been a few discussions before mentioning a few specific commands but if this is plainly stated somewhere for all the commands I have somehow managed to overlook it. Thanks in advance for the help that I know will come. :smile: - Sparks P.S. The following threads seemed relevant to this topic: [URL=http://forums.parallax.com/forums/default.aspx?f=7&m=151101&g=154773#m154773]Simultaneous serial send and receive using only 1 interrupt routine.[/URL] [URL=http://forums.parallax.com/forums/default.aspx?f=7&m=55179&g=55400#m55400]SX/B Compiler Variables Limits [/URL] [URL=http://forums.parallax.com/forums/default.aspx?f=7&m=146212]SX/B RAM Banking Scheme [/URL] [URL=http://forums.parallax.com/forums/default.aspx?f=7&m=147040]Variable Space & Lookup Table [/URL] [URL=http://forums.parallax.com/forums/default.aspx?f=7&m=158347]More than 24 VAR BYTE declarations in SX/B [/URL] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=179709 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)