Announcement

Collapse
No announcement yet.

I2C and efficient writing to EEPROM

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • I2C and efficient writing to EEPROM

    I wonder if you could offer any suggestions on the most efficient way to write character strings to the MicroChip 24LC65 using I2CWRITE.

    I am storing prompts destined for display on a 16x2 LCD display and plan to allocate a string of 24 bytes for HD44780 alpha bytes and control codes. Each 24 character string would have an eprom address assigned to it for easy retrieval and display in a PIC firmware application. I have read that the 24LC65 has a 64-Byte Input Cache for fast writes.

    I am trying to determine whether writing three 8-byte groups end to end in a for loop which increments the EPROM address by 8x24 bits within each loop is a workable solution.

    Another approach might be to represent each 8-bit element as a string of length 24 and write that in one I2CWRITE operation. I would then increment the address 8x24 and continue until the last input line had arrived.

    I am sending the 24-byte lines into the PIC hardware serial port from a PC. Some of the lines would not be 24-bytes long and would be null-terminated. With so much memory available on the 24LC65 I am able to waste some of the 24 bytes allocated at each address for shorter prompts. It seems easiest to keep the addressing consistant.

    My goal would be to make best use of the 24LC64 input cache.

    I spent some time looking for examples on the Crownhill forum and got some good ideas for other things but didn't find anything I could apply to this task.
Working...
X