EPPROM

bemin: Only If I know the exact address for the line on your book

It's MY book. I'm not going to give you direct access to it.

THAT is the point. The Arduino does NOT make the EEPROM directly accessible to anything.

If you want to know what is on page 937 of my book, you have to ask me for the data on page 937. If you (the PC) want to know what is in EEPROM address 937, you (some application on the PC) have to ask the Arduino for that data.

How can I read from the computer to the EEPROM

The Arduino program requests data from the PC over the Serial connection. The PC sends it one byte at a time and the Arduino reads over the Serial connection and puts it into sequential locations in the EEPROM starting at an address that you decide. By definition you know that address.

The PC can request the file to be sent to it by sending a message over the Serial connection to the Arduino. The Arduino responds by reading the EEPROM from the start address byte by byte and sending each of them over the Serial interface to the PC.

Note that you need specially written programs on both the PC and the Arduino to do this.

I am not clear why you would want to do this. What problem are you trying to solve ?

bemin: Yes, but is ther away to read the flash memory using serial port

avrdude, the program used to upload programs to AVR chips, also has the ability to read the flash memory (and EEPROM, fuses, and lock bits if the programmer supports it) and save it to a file on your computer. It can also load a file on your computer into flash, EEPROM, fuses, or lock bits. That's how sketches get uploaded normally.

The catch is that avrdude uses the programming mode of the microcontroller, which requires resetting the processor and interrupting normal operation while the programming actions are happening. This might or might not be a problem for you.

Just like PROGMEM, the avr-gcc compiler has an EEMEM attribute that lets you define variables that reside in EEPROM memory. This lets you define default values for an EEPROM table that you can flash in without having to write a special sketch or initialization function to write those values in yourself. Unfortunately, there's no way to upload EEPROM information with the normal Arduino bootloader. Optiboot (the bootloader Arduino uses) has that functionality disabled, and there's no way to even use those commands in the normal Arduino workflow. You would need to either use avrdude from the command line to upload the eeprom file, or create custom boards.txt and platforms.txt files that allow you to select the eeprom memory to upload to with an external programmer. I've done this myself, so I know it's possible.