In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Rsadeika wrote: Below is a short snippet of the code where I made the changes. In the variables area I now get a comiler error 3, variable exceed available ram. The cmdCode_MSB var Byte, is high lighted in yellow. I thought the SX52 had over 200 bytes of ram available, I do not think that I have over two hundred variables in the code. ' ------------------------------------------------------------------------- ' Device Settings ' ------------------------------------------------------------------------- DEVICE SX52, OSCHS2, BOR42 FREQ 50_000_000 ID "MyBot" ' ------------------------------------------------------------------------- ' IO Pins ' ------------------------------------------------------------------------- RX PIN Rd.7 INPUT TX PIN Rd.6 OUTPUT IR PIN RB.0 INPUT ' ------------------------------------------------------------------------- ' Constants ' ------------------------------------------------------------------------- ' Dividers for ISR UART ' -- values set for 4.34 uS interrupt rate Baud2400 CON 96 Baud4800 CON 48 Baud9600 CON 24 Baud19K2 CON 12 Baud38K4 CON 6 Baud57K6 CON 4 Baud1x0 CON Baud57K6 ' 1 bit period (ISR counts) Baud1x5 CON Baud1x0 * 3 / 2 ' 1.5 bit periods Yes CON 1 No CON 0 ' ------------------------------------------------------------------------- ' Variables ' ------------------------------------------------------------------------- flags VAR Byte rxReady VAR flags.0 ' serial byte avialable rxCmd VAR flags.1 ' receiving IR command rxBit VAR flags.2 ' measuring bit width? hasKey VAR flags.3 ' IR cmd code available idx VAR Byte tix VAR Word ' (ISR) for DELAY_MS 'serial VAR Byte (16) ' bank for serial vars 'txCount VAR serial(0) 'txDivide VAR serial(1) 'txLo VAR serial(2) 'txHi VAR serial(3) 'rxCount VAR serial(4) 'rxDivide VAR serial(5) 'rxByte VAR serial(6) txCount var Byte txDivide var Byte txLO var Byte txHi var Byte rxCount var Byte rxDivide var Byte rxByte var Byte 'sircs VAR Byte (16) ' bank for SIRCS vars 'sircsTix VAR sircs(0) ' ISR divider 'cmdWork_LSB VAR sircs(1) ' work space for cmd 'cmdWork_MSB VAR sircs(2) 'bitCount VAR sircs(3) ' track bits received 'bitWidth VAR sircs(4) ' measure bit width 'cmdCode_LSB VAR sircs(5) ' key code 'cmdCode_MSB VAR sircs(6) ' device code 'keyCode VAR sircs(5) 'devCode VAR sircs(6) sircsTix var Byte cmdWork_LSB var Byte cmdWork_MSB var Byte bitCount var Byte bitWidth var Byte cmdCode_LSB var Byte cmdCode_MSB var Byte keyCode var Byte devCode var Byte tmpB1 VAR Byte ' work vars tmpW1 VAR Word ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=182347#m182653 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)