Pointer to eeprom

PeterN
 
Avatar
 
Subject:

Pointer to eeprom

 · 
Posted: 25.11.2013 - 16:47  ·  #1
Hello all,

I'm new on the forum but already several years busy with Avrco.
I've a small question about a project with the Mega:

I need to copy data from an external eeprom to the internal mega eeprom.
If I implement:
TwiInpP(ExtEepAdres,@Eeprom[$0100],$0040)
it won't work. Problem I gess is that pointer to internal Eeprom isn't allowed here?
Of course I can read every single byte in a buffer variable and write it, but is there no solution (like pointers) to copy every eeprom page in block? Because I'm running out of Ram I don't want to use an extra buffer in ram to do so.

Thanks for helping ;)
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Pointer to eeprom

 · 
Posted: 25.11.2013 - 19:23  ·  #2
Hello Peter,

it is physically impossible to move a block into the internal EEprom.
Only a byte wise writing can be done, because before or after any
byte written, the EEprom busy must be checked. Also the AVRco
internal EEprom block writes break a block into bytes and makes
single byte writes from it.

So you must use a byte-read byte-write in a loop if you must avoid
using an intermediate buffer. And also with a buffer, at least a byte
wise write is done by the system.

rolf
PeterN
 
Avatar
 
Subject:

Re: Pointer to eeprom

 · 
Posted: 26.11.2013 - 00:37  ·  #3
Thank you for the explanation. I will use a loop, it's not time critical so it's possible to do byte read byte write.

Peter(y)
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Pointer to eeprom

 · 
Posted: 26.11.2013 - 14:21  ·  #4
Hello Peter,

don't care about the code time. Each EEprom write byte takes a few msec
because the internal busy must be timed out.

rolf
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   79   93 · Page-Gen-Time: 0.027271s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI