Write faster on AT24C32 Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?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)

How to react to hostile behavior from a senior developer?

Sum letters are not two different

What do you call the main part of a joke?

What is the difference between globalisation and imperialism?

Is a ledger board required if the side of my house is wood?

How could we fake a moon landing now?

Take 2! Is this homebrew Lady of Pain warlock patron balanced?

Is it possible for SQL statements to execute concurrently within a single session in SQL Server?

Is it fair for a professor to grade us on the possession of past papers?

Crossing US/Canada Border for less than 24 hours

Can the Great Weapon Master feat's "Power Attack" apply to attacks from the Spiritual Weapon spell?

Is there hard evidence that the grant peer review system performs significantly better than random?

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

How does the math work when buying airline miles?

What's the meaning of "fortified infraction restraint"?

How do living politicians protect their readily obtainable signatures from misuse?

Is CEO the "profession" with the most psychopaths?

Should I use a zero-interest credit card for a large one-time purchase?

How come Sam didn't become Lord of Horn Hill?

Localisation of Category

What is a fractional matching?

How does light 'choose' between wave and particle behaviour?

As a beginner, should I get a Squier Strat with a SSS config or a HSS?

Why does the remaining Rebel fleet at the end of Rogue One seem dramatically larger than the one in A New Hope?



Write faster on AT24C32



Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?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
    Apr 12 at 13:04















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
    Apr 12 at 13:04













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
    Apr 12 at 13:04

















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

    – Mikael Patel
    Apr 12 at 13:04
















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

– Mikael Patel
Apr 12 at 13:04





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

– Mikael Patel
Apr 12 at 13:04










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
    Apr 11 at 19:12











  • And does read action requires delay?

    – SilvioCro
    Apr 11 at 19:48






  • 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
    Apr 12 at 6:58






  • 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
    Apr 12 at 22:17






  • 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
    Apr 12 at 22:19



















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
      Apr 11 at 19:12











    • And does read action requires delay?

      – SilvioCro
      Apr 11 at 19:48






    • 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
      Apr 12 at 6:58






    • 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
      Apr 12 at 22:17






    • 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
      Apr 12 at 22:19
















    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
      Apr 11 at 19:12











    • And does read action requires delay?

      – SilvioCro
      Apr 11 at 19:48






    • 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
      Apr 12 at 6:58






    • 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
      Apr 12 at 22:17






    • 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
      Apr 12 at 22:19














    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 Apr 12 at 6:59

























    answered Apr 10 at 20:02









    Tirdad Sadri NejadTirdad Sadri Nejad

    1913




    1913












    • Does exists "readpage" way to read faster?

      – SilvioCro
      Apr 11 at 19:12











    • And does read action requires delay?

      – SilvioCro
      Apr 11 at 19:48






    • 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
      Apr 12 at 6:58






    • 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
      Apr 12 at 22:17






    • 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
      Apr 12 at 22:19


















    • Does exists "readpage" way to read faster?

      – SilvioCro
      Apr 11 at 19:12











    • And does read action requires delay?

      – SilvioCro
      Apr 11 at 19:48






    • 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
      Apr 12 at 6:58






    • 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
      Apr 12 at 22:17






    • 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
      Apr 12 at 22:19

















    Does exists "readpage" way to read faster?

    – SilvioCro
    Apr 11 at 19:12





    Does exists "readpage" way to read faster?

    – SilvioCro
    Apr 11 at 19:12













    And does read action requires delay?

    – SilvioCro
    Apr 11 at 19:48





    And does read action requires delay?

    – SilvioCro
    Apr 11 at 19:48




    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
    Apr 12 at 6:58





    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
    Apr 12 at 6:58




    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
    Apr 12 at 22:17





    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
    Apr 12 at 22:17




    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
    Apr 12 at 22:19






    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
    Apr 12 at 22:19












    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

        7,03251939




        7,03251939



























            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

            រឿង រ៉ូមេអូ និង ហ្ស៊ុយលីយេ សង្ខេបរឿង តួអង្គ បញ្ជីណែនាំ

            Crop image to path created in TikZ? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Crop an inserted image?TikZ pictures does not appear in posterImage behind and beyond crop marks?Tikz picture as large as possible on A4 PageTransparency vs image compression dilemmaHow to crop background from image automatically?Image does not cropTikzexternal capturing crop marks when externalizing pgfplots?How to include image path that contains a dollar signCrop image with left size given

            Romeo and Juliet ContentsCharactersSynopsisSourcesDate and textThemes and motifsCriticism and interpretationLegacyScene by sceneSee alsoNotes and referencesSourcesExternal linksNavigation menu"Consumer Price Index (estimate) 1800–"10.2307/28710160037-3222287101610.1093/res/II.5.31910.2307/45967845967810.2307/2869925286992510.1525/jams.1982.35.3.03a00050"Dada Masilo: South African dancer who breaks the rules"10.1093/res/os-XV.57.1610.2307/28680942868094"Sweet Sorrow: Mann-Korman's Romeo and Juliet Closes Sept. 5 at MN's Ordway"the original10.2307/45957745957710.1017/CCOL0521570476.009"Ram Leela box office collections hit massive Rs 100 crore, pulverises prediction"Archived"Broadway Revival of Romeo and Juliet, Starring Orlando Bloom and Condola Rashad, Will Close Dec. 8"Archived10.1075/jhp.7.1.04hon"Wherefore art thou, Romeo? To make us laugh at Navy Pier"the original10.1093/gmo/9781561592630.article.O006772"Ram-leela Review Roundup: Critics Hail Film as Best Adaptation of Romeo and Juliet"Archived10.2307/31946310047-77293194631"Romeo and Juliet get Twitter treatment""Juliet's Nurse by Lois Leveen""Romeo and Juliet: Orlando Bloom's Broadway Debut Released in Theaters for Valentine's Day"Archived"Romeo and Juliet Has No Balcony"10.1093/gmo/9781561592630.article.O00778110.2307/2867423286742310.1076/enst.82.2.115.959510.1080/00138380601042675"A plague o' both your houses: error in GCSE exam paper forces apology""Juliet of the Five O'Clock Shadow, and Other Wonders"10.2307/33912430027-4321339124310.2307/28487440038-7134284874410.2307/29123140149-661129123144728341M"Weekender Guide: Shakespeare on The Drive""balcony"UK public library membership"romeo"UK public library membership10.1017/CCOL9780521844291"Post-Zionist Critique on Israel and the Palestinians Part III: Popular Culture"10.2307/25379071533-86140377-919X2537907"Capulets and Montagues: UK exam board admit mixing names up in Romeo and Juliet paper"Istoria Novellamente Ritrovata di Due Nobili Amanti2027/mdp.390150822329610820-750X"GCSE exam error: Board accidentally rewrites Shakespeare"10.2307/29176390149-66112917639"Exam board apologises after error in English GCSE paper which confused characters in Shakespeare's Romeo and Juliet""From Mariotto and Ganozza to Romeo and Guilietta: Metamorphoses of a Renaissance Tale"10.2307/37323537323510.2307/2867455286745510.2307/28678912867891"10 Questions for Taylor Swift"10.2307/28680922868092"Haymarket Theatre""The Zeffirelli Way: Revealing Talk by Florentine Director""Michael Smuin: 1938-2007 / Prolific dance director had showy career"The Life and Art of Edwin BoothRomeo and JulietRomeo and JulietRomeo and JulietRomeo and JulietEasy Read Romeo and JulietRomeo and Julieteeecb12003684p(data)4099369-3n8211610759dbe00d-a9e2-41a3-b2c1-977dd692899302814385X313670221313670221