In SX Microcontrollers, SX/B Compiler and SX-Key Tool, metron9 wrote: I was going to try and help you out so I did some poking around with the SX28 chip. File attached. If any of the statements are incorrect below please correct me, it is what I understand it now and may not be correct. The SXB Basic compiler uses memory variables $00 thru $0C for its own internal use. When you define your firat variable it uses the next available memory locations, $0D $0E, $0F ... up to $1F When you use the BANK command to switch between the 8 banks of memory you can use only memory locations $10 thru $1F in each of the banks bank1 thru Bank7 So those 3 bytes $0D, $0E, $0F in bank 0 throw you off when bank switching. The file attached I define v1, v2, and v3 as the first 3 byte variable names and then x1 .. x16 as 16 more variables. Then I can switch banks from 0 to 7 to get 64 bytes of variable space. One problem though, The compiler on pass 2 seems to have a problem aND GIVES A WARNING, the code runs in the debugger though so perhaps someone can tell us why it is giving a warning. Funny thing the x1=255 thru x4=255 code gives the warnings about current bank, if i comment out x1 thru x4 then it gives warnings on the next 4 code lines x5=255 thru x8=255 maby someone knows why. So warnings aside you could set up banks of 8 LED variables, use groups of 2 for your number of key hits to compare too and the other one for number of key hits current. Then switch banks and compare the next set of 8. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=150801#m150906 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)