Hi,
there is nothing remain to clarify.
You really think so?
Then I need to clarify my statement:
It should be:
First you just u need to decide and tell us your specifications.
From my post#2:
* hardware:
You didn't show us. But microcontroller, Eeprom, signal lines are clear somehow, at least as long as you keep on standard connections.
* Uart communication protocol:
It is far away from beeing specified, at least you didn't show us. Start of frame, command(format, range) , parameters(format, range), end of frame...none is defined. (I recommend to read other communication protocol soecifications, to see how others do this, what to take care of, what has to be defined....and maybe you find a protocol that suits your needs. )
Sooner or later the receiver will receive an erroneous byte, a frame with missing start, a frame with missing end, a frame with missing data. If you want to avoid that your application hangs in such a case or if you want to avoid that all the Eeprom data become corrupt, then you need to decide how to handle these errors, how to make it immune against communication errors. I.e. how to process the incoming datastream.
Do you start to write data to the Eeprom immediately after the first data is received, or do you wait until the complete frame is received?
Maybe you need to add a checksum, maybe you need to define timeouts. It's on you to decide this...and for sure to tell us.
You want someone
to help you write the code. Don't expect someone writes the complete code for you.
So you should show what you have done so far, show us your ideas. Show us that you recognize this is your job, not our job. At least a program flow, as simple pencil draw on a sheet of paper.
Maybe you recognize that all this is just about Uart protocol. I don't want to talk about all the other (folowing) tasks, because you should learn to finish one task first, before starting the next. Don't try to build the whole world at once, this will fail.
Klaus