This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

about defining charactre arrays

hey
i a working at insignia technologies and i have a problem with defining character arrays
actually i am programming a 89C51RD2 chip using flash magic and i have a problem with programs that have array size espeially two dimensional arrays of size of 150 and more as well as structures
"Although the program compiles" but the LCD which initially displays any message doesnt seem to respond to the new program and just goes blank
could anyone please help me with this definition of two dimensional arrays of size 100 and more as well as structures.THis is urgent please
Could anyone tell me the reason why this is happening and what could be done to avoid this

  • Methinks you need to look at where the arrays (or structures) are being stored. Arrays of significant size (>150) will need to be stored in XDATA. Check to see what memory model you have chosen. There is plenty of information on this website regarding this. Although I'm not familiar with the cpu you are using, some parts need to have their internal XDATA memory enabled in the c startup file.

  • If your application used to work, the most obvious question is what was the change you made that caused the application to stop working.

    Arrays are generally quite straightforward to define. Are you, perhaps, trying to form an array of strings? That can be a little more confusing.

    In sort, this forum will need more information before it can help you.

  • Hi maheshwari, you must make sure that big arrays and structures are declared in xdata memory area. Additionally the 89c51rd2 has 1024 bytes internal RAM accessed via MOVX instructions, make sure your arrays and structures doesnt go beyond that limit.

    One extra tip is checking the memory enabling bits, the 89c51rd2 normally only has 256 bytes of XRAM enabled by default, to modify this behaviour you must set bits XRS1 and XRS0 in register AUXR(8Eh).

    Check the device datasheet for more details.

  • hello sir
    can you guide me a little bit on how to store data on the on chip ROM while the program is in application?
    Is there a way to do so?
    Do we have any 89series IC that can be used
    to store data in the ROM .
    if at all there isnt a way ,in case of external memory interfacing,we going to use a I2C interface do tell me about how to go about it?
    Which sites can i refer in order to get the full details about the interfacing?

    p.s:SEE IF YOU HAVE ANY REPLY FOR THE FIRST(ON CHIP ROM FOR DATA WHILE PROGRAM IS IN APPLICATION).THAT WILL SAVE ON HARDWARE ,RIGHT!

  • store data on the on chip ROM
    ROM = Read Only Memory.

    How do you propose to "store data in the on chip Read Only Memory.

    Erik

  • can you guide me a little bit on how to store data on the on chip ROM while the program is in application?

    As Erik said no way to store data in the OnChip ROM, though if you are working with the Atmel T89C51XX2 family of devices this is possible due to the fact that the onchip ROM is in fact a FLASH memory and one of the most nice features of the chip is that you can use the so-called in-application programming, which means you can write the FLASH memory from your own application. To do this you just have to use a number of API's provided in the onchip boot rom area.

    Additionally some T89s do have an additional 2Kb data EEPROM on chip, which can also be used to store data on chip, but the way to access this memory is a little bit different, but i will not rewrite the datasheets here, please read all what you need in the chips manuals downloadable from the atmel website.

    http://www.atmel.com

  • actually we have flash memory but we have to store data as permanant stuff that is the flash memory gets erased once the power goes off right!
    so we are thinking of interfacing additional eprom to it.
    but is there any other option present
    do tell me about this

  • "the flash memory gets erased once the power goes off right!"

    Pardon?!?!?

    Flash is non-volatile; meaning it does not lose its data when the power turns off!