Hi!
I tried the compiler, but I can not create XDATA variables.
I selected the large model.
program test1;
var i: integer; xdata;
begin
i: = 2;
end.
and I get a "not enough RAM 'i'" error.
How can I use external memory with this compiler?
XDATA problem (v2.20)
-
- Posts: 66
- Joined: 04 Oct 2008 18:39
- Location: Germany
Re: XDATA problem (v2.20)
Hi zka67,
which µC did u choose?
another error:
which µC did u choose?
another error:
Code: Select all
program test1;
var i: integer; xdata;
begin
i := 2; // colon and equality sign must be written together (in one word).
end.
-
- Posts: 66
- Joined: 04 Oct 2008 18:39
- Location: Germany
Re: XDATA problem (v2.20)
Assuming you took a look at the datasheet of the AT89S8253, you could recognize,
that this µC lacks the internal (S)RAM. Those chips (like the famous 8052) were made
to work almost with external RAM (like a 62256).
Download the datasheet of this µC and carefully read the descriptions of following pins:
ALE
EA
PSEN
change "xdata" to "idata" in your program, but dont expect to have more than 256 bytes of RAM
Regards
that this µC lacks the internal (S)RAM. Those chips (like the famous 8052) were made
to work almost with external RAM (like a 62256).
Download the datasheet of this µC and carefully read the descriptions of following pins:
ALE
EA
PSEN
change "xdata" to "idata" in your program, but dont expect to have more than 256 bytes of RAM
Regards
Re: XDATA problem (v2.20)
Yes, I am aware of this, but I can not write a program with external memory?
These microcontrollers are able to 64 kbytes code and 64 kbytes of data memory combined treatment.
In the compiler is not possible to override the memory settings?
Example: {$M CODE Start, CODE Size, XDATA Start, XDATA Size, Heap Size}
I am currently use the Turbo 51, but seeking a better compiler.
These microcontrollers are able to 64 kbytes code and 64 kbytes of data memory combined treatment.
In the compiler is not possible to override the memory settings?
Example: {$M CODE Start, CODE Size, XDATA Start, XDATA Size, Heap Size}
I am currently use the Turbo 51, but seeking a better compiler.
-
- Posts: 66
- Joined: 04 Oct 2008 18:39
- Location: Germany
Re: XDATA problem (v2.20)
The µC you mentioned has at least 256 bytes of internal RAM.
If you need more RAM you have to switch to another mikro or search Google for
a suitable layout for your µController.
These microcontrollers are able to 64 kbytes code and 64 kbytes of data memory combined treatment.
But only, if you combine them with external RAM (and ROM). There are many schematics on the internet
using external RAM chips.
If you need more RAM you have to switch to another mikro or search Google for
a suitable layout for your µController.
These microcontrollers are able to 64 kbytes code and 64 kbytes of data memory combined treatment.
But only, if you combine them with external RAM (and ROM). There are many schematics on the internet
using external RAM chips.
Re: XDATA problem (v2.20)
You're talking about something else, like my problem.
I am aware of the construction of the microcontroller, I have designed more dozens of circuit already.
The problem remains as to why not to use external memory to the compiler?
This problem is independent of the type of microcontroller and the structure of hardware.
I have designed and built some circuit that includes two pieces AT28C256 flash memory and two pieces 65256 ram around the AT89S8253.
I looking a Pascal compiler that can handle the external memory and can generate code up to 64 kbytes.
Your compiler can be solved? If not, I would be totally unnecessary buy your program.
Edit: Meanwhile I found the solution. I opened the AT89S8253.mlk file, and I changed some things in it:
and remove the comment, and
This is the answer I was looking for, but I had to figure out.
I am aware of the construction of the microcontroller, I have designed more dozens of circuit already.
The problem remains as to why not to use external memory to the compiler?
This problem is independent of the type of microcontroller and the structure of hardware.
I have designed and built some circuit that includes two pieces AT28C256 flash memory and two pieces 65256 ram around the AT89S8253.
I looking a Pascal compiler that can handle the external memory and can generate code up to 64 kbytes.
Your compiler can be solved? If not, I would be totally unnecessary buy your program.
Edit: Meanwhile I found the solution. I opened the AT89S8253.mlk file, and I changed some things in it:
Code: Select all
<DEVICE_NAME>AT89S8253</DEVICE_NAME>
<ROM>
<MIN_ADDR>0x0000</MIN_ADDR>
<MAX_ADDR>0xFFFF</MAX_ADDR>
</ROM>
- <XDATA>
<MIN_ADDR>0x0000</MIN_ADDR>
<MAX_ADDR>0xFFFF</MAX_ADDR>
</XDATA>
This is the answer I was looking for, but I had to figure out.
-
- Posts: 66
- Joined: 04 Oct 2008 18:39
- Location: Germany
Re: XDATA problem (v2.20)
Sorry, but I misunderstood you.
If you take a further look at AT89S8253.MLK you will find this:
Maybe that's what you are looking for.
If you take a further look at AT89S8253.MLK you will find this:
Code: Select all
<!-- User can setup external RAM interface by uncommenting XDATA node
<XDATA>
<MIN_ADDR>0x00</MIN_ADDR>
<MAX_ADDR>0xFF</MAX_ADDR>
</XDATA> -->
<!-- User can setup external ROM interface by uncommenting PDATA node
<PDATA>
<MIN_ADDR>0x00</MIN_ADDR>
<MAX_ADDR>0x4A</MAX_ADDR>
</PDATA> -->
Re: XDATA problem (v2.20)
For me this is a new compiler, and many things are not described in the documentation, including also the .mlc files.
Here is the address values in bytes or pages mean?
If the XDATA memory is 64 kilobytes, the MAX_ADDR value 0xFFFF or 0xFF?
Code: Select all
<XDATA>
<MIN_ADDR>0x00</MIN_ADDR>
<MAX_ADDR>0xFF</MAX_ADDR>
</XDATA>
If the XDATA memory is 64 kilobytes, the MAX_ADDR value 0xFFFF or 0xFF?