PDA

View Full Version : Error - Fatal Out Of Memory ( With Array)



stormdacta
- 26th August 2007, 14:27
Hi all

I have this error compiling my program (PIC16F84A)

*****************************************
DEFINE OSC 4

INCLUDE "modedefs.bas"

OUTPUT PORTB.4
OUTPUT PORTB.5
OUTPUT PORTB.6
OUTPUT PORTB.7

VALOR_DISP var byte[4]

VALOR_DISP[0] var PORTB.4
VALOR_DISP[1] var PORTB.5
VALOR_DISP[2] var PORTB.6
VALOR_DISP[3] var PORTB.7


END

ERROR:
FATAL OUT OF MEMORY (pbpw.exe)

***********************************************

This code is for send to array (VALOR_DISP) a 4-bit (0010) code for 7-segment display
and sendit to pins

I test my program per parts, and in variable declarations VALOR_DISP[x] VAR PORTB.x
the program crash.

I dont write any code after this ( fortest purpose ). Only this minimal code get this error

Whats happens guys ????

Robson
- 26th August 2007, 14:36
You cannot define
VALOR_DISP var byte[4] as BYTE

VALOR_DISP var PORTB.4 and in the same time as an ALIAS.

You should use an other Variablename for aliasing a PORTPIN.