Write faster on AT24C32 The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Eeprom write function does not seem to write in more than 100 locationsHow do you write to a free location on an external EEPROM?Problem reading an EEPROM chip using the I2C protocolEEPROM write timeUnderstanding bitwise operationsProblems Writing and Clearing 24FC512 EEPROM using Arduino UnoWhat values are the Atmel MCUs EEPROMs preloaded with?Extending EEPROM lifeWrite to EEPROM before shutdownHow to manage variable I2C read lengths requiring address incrementation (Wire/I2C/EEPROM IC emulation)

Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?

What's the point in a preamp?

How is simplicity better than precision and clarity in prose?

Can withdrawing asylum be illegal?

What does the torsion-free condition for a connection mean in terms of its horizontal bundle?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

Can the prologue be the backstory of your main character?

Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?

does high air pressure throw off wheel balance?

Can a 1st-level character have an ability score above 18?

In horse breeding, what is the female equivalent of putting a horse out "to stud"?

How does ice melt when immersed in water?

Keeping a retro style to sci-fi spaceships?

How long does the line of fire that you can create as an action using the Investiture of Flame spell last?

Is there a writing software that you can sort scenes like slides in PowerPoint?

rotate text in posterbox

Finding the path in a graph from A to B then back to A with a minimum of shared edges

Who or what is the being for whom Being is a question for Heidegger?

What do you call a plan that's an alternative plan in case your initial plan fails?

ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?

Wolves and sheep

Pandas DataFrames: Create new rows with calculations across existing rows

Is there a trick to getting spices to fix to nuts?

First use of “packing” as in carrying a gun



Write faster on AT24C32



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Eeprom write function does not seem to write in more than 100 locationsHow do you write to a free location on an external EEPROM?Problem reading an EEPROM chip using the I2C protocolEEPROM write timeUnderstanding bitwise operationsProblems Writing and Clearing 24FC512 EEPROM using Arduino UnoWhat values are the Atmel MCUs EEPROMs preloaded with?Extending EEPROM lifeWrite to EEPROM before shutdownHow to manage variable I2C read lengths requiring address incrementation (Wire/I2C/EEPROM IC emulation)










2















I'm using AT24C32 EEPROM chip from ATmel. I found code that will write and read bytes from chip.
Code writes and reads bytes correctly and without any problem.



But I have to write few 8-byte values often(every 10-15 seconds). I did "cut" those variables to 48 bit(so 6-byte variable) and with that I speeded up saving but it's still slow.



Is there any chance to speed up saving proccess? Code is below



void EEPROMClass::write48(int16_t address, uint64_t value)

uint8_t byteValue = (value & 0xFF);
write8(address, byteValue);

byteValue = ((value >> 8) & 0xFF);
write8(address + 1, byteValue);

byteValue = ((value >> 16) & 0xFF);
write8(address + 2, byteValue);

byteValue = ((value >> 24) & 0xFF);
write8(address + 3, byteValue);

byteValue = ((value >> 32) & 0xFF);
write8(address + 4, byteValue);

byteValue = ((value >> 40) & 0xFF);
write8(address + 5, byteValue);


void EEPROMClass::write8(int16_t const address, uint8_t const value)

Wire.beginTransmission(AT24C32);

Wire.write(highAddressByte(address));
Wire.write(lowAddressByte(address));

Wire.write(value);
delay(2);
Wire.endTransmission();



delay of 2ms is required otherwise EEPROM will write different value. Code has 4 "6-byte" variables(total of 24 bytes). Every byte is minimum 2ms, so total time to save only "6-byte" variables is 48ms(round to 50ms). That is too slow for me. How to speed up write function?










share|improve this question






















  • What type of speed do your application require? Please see benchmarks; github.com/mikaelpatel/Arduino-Storage

    – Mikael Patel
    yesterday















2















I'm using AT24C32 EEPROM chip from ATmel. I found code that will write and read bytes from chip.
Code writes and reads bytes correctly and without any problem.



But I have to write few 8-byte values often(every 10-15 seconds). I did "cut" those variables to 48 bit(so 6-byte variable) and with that I speeded up saving but it's still slow.



Is there any chance to speed up saving proccess? Code is below



void EEPROMClass::write48(int16_t address, uint64_t value)

uint8_t byteValue = (value & 0xFF);
write8(address, byteValue);

byteValue = ((value >> 8) & 0xFF);
write8(address + 1, byteValue);

byteValue = ((value >> 16) & 0xFF);
write8(address + 2, byteValue);

byteValue = ((value >> 24) & 0xFF);
write8(address + 3, byteValue);

byteValue = ((value >> 32) & 0xFF);
write8(address + 4, byteValue);

byteValue = ((value >> 40) & 0xFF);
write8(address + 5, byteValue);


void EEPROMClass::write8(int16_t const address, uint8_t const value)

Wire.beginTransmission(AT24C32);

Wire.write(highAddressByte(address));
Wire.write(lowAddressByte(address));

Wire.write(value);
delay(2);
Wire.endTransmission();



delay of 2ms is required otherwise EEPROM will write different value. Code has 4 "6-byte" variables(total of 24 bytes). Every byte is minimum 2ms, so total time to save only "6-byte" variables is 48ms(round to 50ms). That is too slow for me. How to speed up write function?










share|improve this question






















  • What type of speed do your application require? Please see benchmarks; github.com/mikaelpatel/Arduino-Storage

    – Mikael Patel
    yesterday













2












2








2








I'm using AT24C32 EEPROM chip from ATmel. I found code that will write and read bytes from chip.
Code writes and reads bytes correctly and without any problem.



But I have to write few 8-byte values often(every 10-15 seconds). I did "cut" those variables to 48 bit(so 6-byte variable) and with that I speeded up saving but it's still slow.



Is there any chance to speed up saving proccess? Code is below



void EEPROMClass::write48(int16_t address, uint64_t value)

uint8_t byteValue = (value & 0xFF);
write8(address, byteValue);

byteValue = ((value >> 8) & 0xFF);
write8(address + 1, byteValue);

byteValue = ((value >> 16) & 0xFF);
write8(address + 2, byteValue);

byteValue = ((value >> 24) & 0xFF);
write8(address + 3, byteValue);

byteValue = ((value >> 32) & 0xFF);
write8(address + 4, byteValue);

byteValue = ((value >> 40) & 0xFF);
write8(address + 5, byteValue);


void EEPROMClass::write8(int16_t const address, uint8_t const value)

Wire.beginTransmission(AT24C32);

Wire.write(highAddressByte(address));
Wire.write(lowAddressByte(address));

Wire.write(value);
delay(2);
Wire.endTransmission();



delay of 2ms is required otherwise EEPROM will write different value. Code has 4 "6-byte" variables(total of 24 bytes). Every byte is minimum 2ms, so total time to save only "6-byte" variables is 48ms(round to 50ms). That is too slow for me. How to speed up write function?










share|improve this question














I'm using AT24C32 EEPROM chip from ATmel. I found code that will write and read bytes from chip.
Code writes and reads bytes correctly and without any problem.



But I have to write few 8-byte values often(every 10-15 seconds). I did "cut" those variables to 48 bit(so 6-byte variable) and with that I speeded up saving but it's still slow.



Is there any chance to speed up saving proccess? Code is below



void EEPROMClass::write48(int16_t address, uint64_t value)

uint8_t byteValue = (value & 0xFF);
write8(address, byteValue);

byteValue = ((value >> 8) & 0xFF);
write8(address + 1, byteValue);

byteValue = ((value >> 16) & 0xFF);
write8(address + 2, byteValue);

byteValue = ((value >> 24) & 0xFF);
write8(address + 3, byteValue);

byteValue = ((value >> 32) & 0xFF);
write8(address + 4, byteValue);

byteValue = ((value >> 40) & 0xFF);
write8(address + 5, byteValue);


void EEPROMClass::write8(int16_t const address, uint8_t const value)

Wire.beginTransmission(AT24C32);

Wire.write(highAddressByte(address));
Wire.write(lowAddressByte(address));

Wire.write(value);
delay(2);
Wire.endTransmission();



delay of 2ms is required otherwise EEPROM will write different value. Code has 4 "6-byte" variables(total of 24 bytes). Every byte is minimum 2ms, so total time to save only "6-byte" variables is 48ms(round to 50ms). That is too slow for me. How to speed up write function?







eeprom






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 10 at 19:43









SilvioCroSilvioCro

867




867












  • What type of speed do your application require? Please see benchmarks; github.com/mikaelpatel/Arduino-Storage

    – Mikael Patel
    yesterday

















  • What type of speed do your application require? Please see benchmarks; github.com/mikaelpatel/Arduino-Storage

    – Mikael Patel
    yesterday
















What type of speed do your application require? Please see benchmarks; github.com/mikaelpatel/Arduino-Storage

– Mikael Patel
yesterday





What type of speed do your application require? Please see benchmarks; github.com/mikaelpatel/Arduino-Storage

– Mikael Patel
yesterday










2 Answers
2






active

oldest

votes


















5














after writing a value to EEPROM, and terminating the I2C connection with a STOP, the EEPROM enters a self writing mode to write what you have sent to it, to it's internal memory. (you don't actually write the values to the memory section; you write them to a buffer, and then the internal controller writes them to its memory section).



this "self writing mode" takes about 5ms, and you cant do nothing about it. but you can use "page writing" instead of byte writing. that 32K model, has a 32 bytes page buffer. you have to send all the bytes (as long as they are under 32 bytes) at once in one I2C transaction. this time, the chip fills its page buffer and then after a STOP, writes it all at once on its memory. in your code, you just write one byte in your buffer each time in a single transaction. like sending a bus with just one passenger at a time.



remember in this mode, you only set the address of the first byte. the next bytes automatically settle in the next addresses.






share|improve this answer

























  • Does exists "readpage" way to read faster?

    – SilvioCro
    2 days ago











  • And does read action requires delay?

    – SilvioCro
    2 days ago






  • 1





    the reading doesn't have the limitation of "page". you can read all the chip in one transaction (it can even rollover the memory bank and resend it). and it doesn't need a delay neither (it's as brief as microseconds so it's negligible). @SilvioCro

    – Tirdad Sadri Nejad
    yesterday






  • 1





    the 32 bytes is all data. the address is set the way you set it before, but only for the first item. and remember, in the page write mode, you write to a whole page. as your chip has 32bytes pages ( 128 * 32 bytes = 4096 bytes = 32Kbits), you can write a whole 32 bytes at one of the pages (1~128). to write properly, first 32 bytes settle to address 0 to 31, the next batch at 32 to 63 … .

    – Tirdad Sadri Nejad
    yesterday






  • 1





    and in the case you write to 18 bytes to address 24 (you don't have to send exactly 32 bytes. as I said, a maximum of 32 bytes), your data will rollover. byte0 -> 24 /byte1 -> 25 /byte2 -> 26 /byte3 -> 27 /byte4 -> 28 /byte5 -> 29 /byte6 -> 30 /byte7 -> 31 /byte8 -> 0 (still in the first page. it does not go to next page) /byte9 -> 1 (still in the first page. it does not go to next page)

    – Tirdad Sadri Nejad
    yesterday



















1














Mostly the best speed you get, is if you use the 'page' size, which is 32 bytes. It will take longer than 4 bytes, but less then 4 times 8 bytes.



You could do a check to see if using one page write (of 32 bytes) is faster than 6 times a one byte write.



However, it depends if you can change your design so it writes 32 bytes at a time.
E.g. by writing 60 seconds 4 times 8 bytes (32 bytes) in one page write, instead of every 15 seconds 8 bytes. This will be much faster.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("schematics", function ()
    StackExchange.schematics.init();
    );
    , "cicuitlab");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "540"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f63364%2fwrite-faster-on-at24c32%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5














    after writing a value to EEPROM, and terminating the I2C connection with a STOP, the EEPROM enters a self writing mode to write what you have sent to it, to it's internal memory. (you don't actually write the values to the memory section; you write them to a buffer, and then the internal controller writes them to its memory section).



    this "self writing mode" takes about 5ms, and you cant do nothing about it. but you can use "page writing" instead of byte writing. that 32K model, has a 32 bytes page buffer. you have to send all the bytes (as long as they are under 32 bytes) at once in one I2C transaction. this time, the chip fills its page buffer and then after a STOP, writes it all at once on its memory. in your code, you just write one byte in your buffer each time in a single transaction. like sending a bus with just one passenger at a time.



    remember in this mode, you only set the address of the first byte. the next bytes automatically settle in the next addresses.






    share|improve this answer

























    • Does exists "readpage" way to read faster?

      – SilvioCro
      2 days ago











    • And does read action requires delay?

      – SilvioCro
      2 days ago






    • 1





      the reading doesn't have the limitation of "page". you can read all the chip in one transaction (it can even rollover the memory bank and resend it). and it doesn't need a delay neither (it's as brief as microseconds so it's negligible). @SilvioCro

      – Tirdad Sadri Nejad
      yesterday






    • 1





      the 32 bytes is all data. the address is set the way you set it before, but only for the first item. and remember, in the page write mode, you write to a whole page. as your chip has 32bytes pages ( 128 * 32 bytes = 4096 bytes = 32Kbits), you can write a whole 32 bytes at one of the pages (1~128). to write properly, first 32 bytes settle to address 0 to 31, the next batch at 32 to 63 … .

      – Tirdad Sadri Nejad
      yesterday






    • 1





      and in the case you write to 18 bytes to address 24 (you don't have to send exactly 32 bytes. as I said, a maximum of 32 bytes), your data will rollover. byte0 -> 24 /byte1 -> 25 /byte2 -> 26 /byte3 -> 27 /byte4 -> 28 /byte5 -> 29 /byte6 -> 30 /byte7 -> 31 /byte8 -> 0 (still in the first page. it does not go to next page) /byte9 -> 1 (still in the first page. it does not go to next page)

      – Tirdad Sadri Nejad
      yesterday
















    5














    after writing a value to EEPROM, and terminating the I2C connection with a STOP, the EEPROM enters a self writing mode to write what you have sent to it, to it's internal memory. (you don't actually write the values to the memory section; you write them to a buffer, and then the internal controller writes them to its memory section).



    this "self writing mode" takes about 5ms, and you cant do nothing about it. but you can use "page writing" instead of byte writing. that 32K model, has a 32 bytes page buffer. you have to send all the bytes (as long as they are under 32 bytes) at once in one I2C transaction. this time, the chip fills its page buffer and then after a STOP, writes it all at once on its memory. in your code, you just write one byte in your buffer each time in a single transaction. like sending a bus with just one passenger at a time.



    remember in this mode, you only set the address of the first byte. the next bytes automatically settle in the next addresses.






    share|improve this answer

























    • Does exists "readpage" way to read faster?

      – SilvioCro
      2 days ago











    • And does read action requires delay?

      – SilvioCro
      2 days ago






    • 1





      the reading doesn't have the limitation of "page". you can read all the chip in one transaction (it can even rollover the memory bank and resend it). and it doesn't need a delay neither (it's as brief as microseconds so it's negligible). @SilvioCro

      – Tirdad Sadri Nejad
      yesterday






    • 1





      the 32 bytes is all data. the address is set the way you set it before, but only for the first item. and remember, in the page write mode, you write to a whole page. as your chip has 32bytes pages ( 128 * 32 bytes = 4096 bytes = 32Kbits), you can write a whole 32 bytes at one of the pages (1~128). to write properly, first 32 bytes settle to address 0 to 31, the next batch at 32 to 63 … .

      – Tirdad Sadri Nejad
      yesterday






    • 1





      and in the case you write to 18 bytes to address 24 (you don't have to send exactly 32 bytes. as I said, a maximum of 32 bytes), your data will rollover. byte0 -> 24 /byte1 -> 25 /byte2 -> 26 /byte3 -> 27 /byte4 -> 28 /byte5 -> 29 /byte6 -> 30 /byte7 -> 31 /byte8 -> 0 (still in the first page. it does not go to next page) /byte9 -> 1 (still in the first page. it does not go to next page)

      – Tirdad Sadri Nejad
      yesterday














    5












    5








    5







    after writing a value to EEPROM, and terminating the I2C connection with a STOP, the EEPROM enters a self writing mode to write what you have sent to it, to it's internal memory. (you don't actually write the values to the memory section; you write them to a buffer, and then the internal controller writes them to its memory section).



    this "self writing mode" takes about 5ms, and you cant do nothing about it. but you can use "page writing" instead of byte writing. that 32K model, has a 32 bytes page buffer. you have to send all the bytes (as long as they are under 32 bytes) at once in one I2C transaction. this time, the chip fills its page buffer and then after a STOP, writes it all at once on its memory. in your code, you just write one byte in your buffer each time in a single transaction. like sending a bus with just one passenger at a time.



    remember in this mode, you only set the address of the first byte. the next bytes automatically settle in the next addresses.






    share|improve this answer















    after writing a value to EEPROM, and terminating the I2C connection with a STOP, the EEPROM enters a self writing mode to write what you have sent to it, to it's internal memory. (you don't actually write the values to the memory section; you write them to a buffer, and then the internal controller writes them to its memory section).



    this "self writing mode" takes about 5ms, and you cant do nothing about it. but you can use "page writing" instead of byte writing. that 32K model, has a 32 bytes page buffer. you have to send all the bytes (as long as they are under 32 bytes) at once in one I2C transaction. this time, the chip fills its page buffer and then after a STOP, writes it all at once on its memory. in your code, you just write one byte in your buffer each time in a single transaction. like sending a bus with just one passenger at a time.



    remember in this mode, you only set the address of the first byte. the next bytes automatically settle in the next addresses.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited yesterday

























    answered Apr 10 at 20:02









    Tirdad Sadri NejadTirdad Sadri Nejad

    1913




    1913












    • Does exists "readpage" way to read faster?

      – SilvioCro
      2 days ago











    • And does read action requires delay?

      – SilvioCro
      2 days ago






    • 1





      the reading doesn't have the limitation of "page". you can read all the chip in one transaction (it can even rollover the memory bank and resend it). and it doesn't need a delay neither (it's as brief as microseconds so it's negligible). @SilvioCro

      – Tirdad Sadri Nejad
      yesterday






    • 1





      the 32 bytes is all data. the address is set the way you set it before, but only for the first item. and remember, in the page write mode, you write to a whole page. as your chip has 32bytes pages ( 128 * 32 bytes = 4096 bytes = 32Kbits), you can write a whole 32 bytes at one of the pages (1~128). to write properly, first 32 bytes settle to address 0 to 31, the next batch at 32 to 63 … .

      – Tirdad Sadri Nejad
      yesterday






    • 1





      and in the case you write to 18 bytes to address 24 (you don't have to send exactly 32 bytes. as I said, a maximum of 32 bytes), your data will rollover. byte0 -> 24 /byte1 -> 25 /byte2 -> 26 /byte3 -> 27 /byte4 -> 28 /byte5 -> 29 /byte6 -> 30 /byte7 -> 31 /byte8 -> 0 (still in the first page. it does not go to next page) /byte9 -> 1 (still in the first page. it does not go to next page)

      – Tirdad Sadri Nejad
      yesterday


















    • Does exists "readpage" way to read faster?

      – SilvioCro
      2 days ago











    • And does read action requires delay?

      – SilvioCro
      2 days ago






    • 1





      the reading doesn't have the limitation of "page". you can read all the chip in one transaction (it can even rollover the memory bank and resend it). and it doesn't need a delay neither (it's as brief as microseconds so it's negligible). @SilvioCro

      – Tirdad Sadri Nejad
      yesterday






    • 1





      the 32 bytes is all data. the address is set the way you set it before, but only for the first item. and remember, in the page write mode, you write to a whole page. as your chip has 32bytes pages ( 128 * 32 bytes = 4096 bytes = 32Kbits), you can write a whole 32 bytes at one of the pages (1~128). to write properly, first 32 bytes settle to address 0 to 31, the next batch at 32 to 63 … .

      – Tirdad Sadri Nejad
      yesterday






    • 1





      and in the case you write to 18 bytes to address 24 (you don't have to send exactly 32 bytes. as I said, a maximum of 32 bytes), your data will rollover. byte0 -> 24 /byte1 -> 25 /byte2 -> 26 /byte3 -> 27 /byte4 -> 28 /byte5 -> 29 /byte6 -> 30 /byte7 -> 31 /byte8 -> 0 (still in the first page. it does not go to next page) /byte9 -> 1 (still in the first page. it does not go to next page)

      – Tirdad Sadri Nejad
      yesterday

















    Does exists "readpage" way to read faster?

    – SilvioCro
    2 days ago





    Does exists "readpage" way to read faster?

    – SilvioCro
    2 days ago













    And does read action requires delay?

    – SilvioCro
    2 days ago





    And does read action requires delay?

    – SilvioCro
    2 days ago




    1




    1





    the reading doesn't have the limitation of "page". you can read all the chip in one transaction (it can even rollover the memory bank and resend it). and it doesn't need a delay neither (it's as brief as microseconds so it's negligible). @SilvioCro

    – Tirdad Sadri Nejad
    yesterday





    the reading doesn't have the limitation of "page". you can read all the chip in one transaction (it can even rollover the memory bank and resend it). and it doesn't need a delay neither (it's as brief as microseconds so it's negligible). @SilvioCro

    – Tirdad Sadri Nejad
    yesterday




    1




    1





    the 32 bytes is all data. the address is set the way you set it before, but only for the first item. and remember, in the page write mode, you write to a whole page. as your chip has 32bytes pages ( 128 * 32 bytes = 4096 bytes = 32Kbits), you can write a whole 32 bytes at one of the pages (1~128). to write properly, first 32 bytes settle to address 0 to 31, the next batch at 32 to 63 … .

    – Tirdad Sadri Nejad
    yesterday





    the 32 bytes is all data. the address is set the way you set it before, but only for the first item. and remember, in the page write mode, you write to a whole page. as your chip has 32bytes pages ( 128 * 32 bytes = 4096 bytes = 32Kbits), you can write a whole 32 bytes at one of the pages (1~128). to write properly, first 32 bytes settle to address 0 to 31, the next batch at 32 to 63 … .

    – Tirdad Sadri Nejad
    yesterday




    1




    1





    and in the case you write to 18 bytes to address 24 (you don't have to send exactly 32 bytes. as I said, a maximum of 32 bytes), your data will rollover. byte0 -> 24 /byte1 -> 25 /byte2 -> 26 /byte3 -> 27 /byte4 -> 28 /byte5 -> 29 /byte6 -> 30 /byte7 -> 31 /byte8 -> 0 (still in the first page. it does not go to next page) /byte9 -> 1 (still in the first page. it does not go to next page)

    – Tirdad Sadri Nejad
    yesterday






    and in the case you write to 18 bytes to address 24 (you don't have to send exactly 32 bytes. as I said, a maximum of 32 bytes), your data will rollover. byte0 -> 24 /byte1 -> 25 /byte2 -> 26 /byte3 -> 27 /byte4 -> 28 /byte5 -> 29 /byte6 -> 30 /byte7 -> 31 /byte8 -> 0 (still in the first page. it does not go to next page) /byte9 -> 1 (still in the first page. it does not go to next page)

    – Tirdad Sadri Nejad
    yesterday












    1














    Mostly the best speed you get, is if you use the 'page' size, which is 32 bytes. It will take longer than 4 bytes, but less then 4 times 8 bytes.



    You could do a check to see if using one page write (of 32 bytes) is faster than 6 times a one byte write.



    However, it depends if you can change your design so it writes 32 bytes at a time.
    E.g. by writing 60 seconds 4 times 8 bytes (32 bytes) in one page write, instead of every 15 seconds 8 bytes. This will be much faster.






    share|improve this answer



























      1














      Mostly the best speed you get, is if you use the 'page' size, which is 32 bytes. It will take longer than 4 bytes, but less then 4 times 8 bytes.



      You could do a check to see if using one page write (of 32 bytes) is faster than 6 times a one byte write.



      However, it depends if you can change your design so it writes 32 bytes at a time.
      E.g. by writing 60 seconds 4 times 8 bytes (32 bytes) in one page write, instead of every 15 seconds 8 bytes. This will be much faster.






      share|improve this answer

























        1












        1








        1







        Mostly the best speed you get, is if you use the 'page' size, which is 32 bytes. It will take longer than 4 bytes, but less then 4 times 8 bytes.



        You could do a check to see if using one page write (of 32 bytes) is faster than 6 times a one byte write.



        However, it depends if you can change your design so it writes 32 bytes at a time.
        E.g. by writing 60 seconds 4 times 8 bytes (32 bytes) in one page write, instead of every 15 seconds 8 bytes. This will be much faster.






        share|improve this answer













        Mostly the best speed you get, is if you use the 'page' size, which is 32 bytes. It will take longer than 4 bytes, but less then 4 times 8 bytes.



        You could do a check to see if using one page write (of 32 bytes) is faster than 6 times a one byte write.



        However, it depends if you can change your design so it writes 32 bytes at a time.
        E.g. by writing 60 seconds 4 times 8 bytes (32 bytes) in one page write, instead of every 15 seconds 8 bytes. This will be much faster.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 10 at 20:03









        Michel KeijzersMichel Keijzers

        6,98751939




        6,98751939



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Arduino Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f63364%2fwrite-faster-on-at24c32%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?