I2C EEprom interfacing

  1. What this example do?
  2. How I must configure my ORbit16™ to work with this example?
  3. Where I can learn more about this?
  4. Download this example!

What this example do?

In this example we’ll learn how to use the I2C EEprom library. This library is used for interfacing the ORbit16™ with I2C EEproms like 24LC32, 24LC64, 24LC128, 24LC256, 24LC512, 24LC1026 and so on.

This demo requires an LCD to show the results of eeprom operations. First a variable is set with value ‘A’. Then the values ‘A’+1 (‘B’) and ‘A’+2 (‘C’) are stored to eeprom in locations 0 and 1. So locations 0 and 1 are read and the result of reading is shown on the display. You can see ‘ABC’ on the display. This operations show the usage of functions ee_write and ee_read.

Second, an array is stored to the eeprom, starting from location 2. The locations are now read with the function ee_seq_read that performs a sequential reading. The values are stored to an array and then shown on the display.

How I must configure my ORbit16™ to work with this example?

Go to the PCD8544 library page and read the usage document. Here you will see the display pinout. Follow the instructions in the document. In particular you must connect the display IOs as showed here (left: display IO, right: ORbit16™ IO):

  1. VCC to 3.3V
  2. GND to GND
  3. SCE to GND
  4. RST to BP2
  5. D/C to BP1
  6. DN (MOSI) to BP0
  7. SCLK to A1/P6
  8. LED : is the backlight, you can leave it disconnected or you can connect it to 3.3V through a 220Ω resistor
The eeprom must to be connected as showed (resistors are both 4.7KΩ):
Note: please read the user’s manual of the I2C EEprom library for further informations on I2C eeprom usage.

Where I can learn more about this?

 

Download this example!

This file is in ZIP format
I2C EEprom library usage example
89.04 kB - Downloaded 28 times

Note: This example is made with the version 1.0 of the I2C EEprom Library. Please refer to I2C EEprom library page for the latest version of the library.