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

saving to memory

i have a program that i have burned into my controller(p89v51rd2)...
now it has a vb interface and it receives hex file character by char...

i.e
:120000000ab2345

it receives as : ,1,2,0....and so on into a char array[1000]...and when i display it on to the hyperterminal it displays the dat send...

but when i put the power off and try to receive without
it shows junk values....
so my data is not stored permanently into my microcontroller...
so how do i access storage area of my controller so that i can store some data into it and carry my sytem to somewhere else and then retrieve the data there...

  • Have a look at IAP - In Application Programming - in the datasheet for your chip and in application notes available on the Keil site and the chip manufacturers site. Also search for IAP in this forum.

    Are you sure that Intel Hex is a good format to transfer the data in? Each row in the Intel Hex file contains an address, so you are not supposed to place the received data in sequence in an array but place the data at the location specified in the hex file.

    However, before you can flash the data, you must erase that flash sector. And before you erase a flash sector, you must make sure that it does not contain an important part of your application.

  • Presumably, that's because you are putting it into Volatile memory?

    You need to either put it into non-volatile memory, or provide a backup power supply so that your volatile memory doesn't lose its content!

  • actually i am making a portable programmer...
    so my prog that i have burned in my controller is to take a hex file as data and dump it to specific devices ...
    so i want to store the hex file as data...

  • More to the point, you need to store it somewhere non-volatile

    Whether you do that by using the on-chip Flash, or adding battery backup, or whatever is up to you...

    It's your requirement - you need to design your solution to meet that requirement!