Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/22/10 12:14
Read: times


 
#175267 - Write a generic function.
Responding to: ???'s previous message
As Michael has explained, you must write the current page before crossing a page boundary.

So you design your function for ease of calling:

int16_t eeprom_writebuf(uint8_t slave, uint8_t *buf, uint16_t n);

and let the function handle the boundaries. You either have a Compile-Time constant for the page size, or you pass an extra argument to the function.

As you can see from my example timings, your worst case is only the extra page-writes for straddled boundaries. 256 bytes with maximum time of 6 + 5 + 5 ms.

David.

List of 17 messages in thread
TopicAuthorDate
I2C page write and interrupts            01/01/70 00:00      
   Some Important Things to Consider            01/01/70 00:00      
      Re: Some Important Things to Consider            01/01/70 00:00      
         You just buffer things            01/01/70 00:00      
            ISR + superloop normally enough            01/01/70 00:00      
         A Quick Reply            01/01/70 00:00      
            Re: A Quick Reply            01/01/70 00:00      
            Confirmation            01/01/70 00:00      
               The Atmel Scheduler            01/01/70 00:00      
                  Re: The Atmel Scheduler            01/01/70 00:00      
                     Your times seem quite long            01/01/70 00:00      
                        Re: Your times seem quite long            01/01/70 00:00      
   The problem seems to be different            01/01/70 00:00      
      Time to closely read data sheet.            01/01/70 00:00      
         Re: Time to closely read data sheet.            01/01/70 00:00      
            Write a generic function.            01/01/70 00:00      
         Paged operation very common            01/01/70 00:00      

Back to Subject List