Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] large array variables in ram

Status
Not open for further replies.

Rk_on_edaboard

Junior Member level 3
Joined
Apr 5, 2013
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,452
i am using 89s52 microcontroller, c programming in keil.
my question is can i use array of 256 bytes in main function ?
if yes then how?:-|

please reply
 

Hi Rk,
Not familiar with the 89s52 in particular. But the rule is, anything declared in any function(also in main()) is an auto variable which gets stored in RAM. If I am not wrong, the entire RAM available in 89s52 is just 256 bytes which makes this impossible. If you are about to deal with constant data, consider using the programmable flash part within the IC.

Raj Gunaseelan.
 
if your array is fixed then u can store it in ROM and with this method u can store array in upto ROM memory limitation.
use code infront of declaration that is it will look like as

code unsigned char array[100]={0};

but this will constant
 
hello,

Have a look on FRAM

FRAM click™ is an accessory board in mikroBUS™ form factor. It’s a compact and easy solution
for adding Ferroelectric Random Access Memory to your design. It features MB85RS256A 256K
Ferroelectric Random Access Memory. FRAM click™ communicates with the target board microcontroller via mikroBUS™ SPI (MISO, MOSI, SCK, CS), RST and PWM lines. The board is designed to use 3.3V power supply only.
LED (GREEN) indicates the presence of power supply.
FRAM click™ with it’s MB85RS256A IC is a 256K FRAM (Ferroelectric Random Access Memory) module which consists of 32,768 words x 8 bits. The MB85RS256A use the ferroelectric process and silicon gate CMOS process technologies to form nonvolatile memory cells. This memory can be used for 1010 read/write operations, and does not take long time to write data like Flash memories or EEPROM. Maximum operating frequency is 25MHz
 
thanks for yours valuable reply.
i am creating 16x64 led matrix display using 74595(for cathode,column ) , 74ls138(anode and is row) and 89s52.
for that i want to display character in 16x14 font.
i have created font and their codes.one character has 224 hex codes.
so i require array which can store these 224 codes of one character.
for that if you all have any idea please tell me.
I also defined array as xdata but it is not working .

please reply
 

I don't know your 89s52 MCU, but it's seems this MCU can acces
to external (devices) RAM with ALE signal ?
if not..
use external devices like a FRAM or EEPROM with I2C protocol.. 2 wires SDA SCL
to store led matrix table
if base is 96 car => 21.504 bytes
non printable char from 0 to 31 not included !!!

EEPROM 24LC256 => 32K*8 is OK..
maybe you can arrange your big table in EEPROM , modulo 64 bytes to speed up the reading of eeprom
by page of 64 bytes (instead of byte per byte) into a table of RAM size 64 bytes .
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top