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

N79E059A Writing to Data Flash EEProm

Hi,
I am new to N79E059A 40 pin DIP package. This controller has 4k Data EEprom for storing or reading the data. I am able to write to data eeprom. Any guidance on writing the data flash will be helpful.

  • Not sure here if you mean the program flash or not, since you first say that you can write to "data eeprom" and then say that you can not write to "the data flash".

    EEPROM and flash are more or less the same thing.

    Flash is just a cooler name for describing that the EEPROM memory happens to support fast block-sized or full device-sized erase while the older and more traditional EEPROM requires individual cells or small blocks of maybe 8-32 bytes to be erased at a time.

    It's a big difference between In Application Programming (IAP) to write to the program flash, and to write to the 4kB EEPROM memory. If the processor supports IAP, then there should be application notes or information in the datasheet how to do it. If you mean the 4kB EEPROM, then I don't see what information you need since you already claim you are able to write to it.

  • Flash is just a cooler name for describing that the EEPROM memory happens to support fast block-sized or full device-sized erase while the older and more traditional EEPROM requires individual cells or small blocks of maybe 8-32 bytes to be erased at a time.

    same thing simpler
    flash (usually) refer to parallel addressable memory, EEPROM (usually) refer to serial memory

  • But the simplification isn't really simpler, since there is a significant difference in how EEPROM/flash is used that goes beyond if the memory has a serial or a parallel interface.

    With a EEPROM, you normally directly write the data without any erase request. If the erase block size is larger than one byte, then the chip hides this internally. So the EEPROM behaves like a RAM but with different access times for reads and writes. And with the limitation that the cells wears out.

    With flash, you need to erase the block before writing - unless for some types of flash if you just wanted to add more data to a block that had the last part already erased. So whatever interface the memory has, the program code will be nowhere near how you access RAM or EEPROM.

    Serial/parallel is more a question of size. A flash fits more - normally much, much more - data per surface unit because the simplification of having block-erase. So flash memory chips are normally hundreds of kilobits up to many gigabits large. And it's meaningful to have a parallel interface if the memory is large, to give higher bandwidth.

    Because of the very large cell size of a EEPROM, they very seldom get past a couple of megabit and are often down in the kilobit size range. So it's normal to optimize for pin count, unless the EEPROM happen to be internal to the processor where they tend to be direct-mapped, allowing trivial writes like:

    eeprom[addr] = value;
    

    But the main question in this thread is if the OP is talking about the program storage, so requesting help with IAP.

  • Okies,
    To make my things clear this uC has 4k data eeprom or non-volatile data memory to store data for reading and writing purpose. It supports ISP method for writing to data eeprom. In Atmel's 89S8253 writing to data eeprom is different.

    In Nuvoton N79E059A to write to data flash or data eeprom or non-volatile data memory there is an ISP procedure which is given in sample code from Nuvotn's website. I can write the data value at a particular address say 0xF000 for the first time. If I write again on the same address the process fails and it returns me 0x00, which means either failed write process or failed read process.

    I need some guidance in this situation.

  • Writing twice to the same location of a flash memory is expected to fail, since the flash block needs to be erased before it is possible to write different information to it.

    Note that ISP is In System Programming. So you can from the outside of the system program the memory without removing the chip. Sometimes by connecting a programming probe but now normally by connecting to some form of serial port on the hardware.

    IAP on the other hand is In Application Programming. Which means that your running program can run commands that will change the contents of the memory.

    So ISP documentation will not help you if the goal is to perform IAP. And if it's flash memory, then there should be some information about how to prepare a flash block so it is ready for new data.