I2C Application Note #1
Data logging with the 24LCxx EEPROMs.
This I2C Application Note demonstrates how to connect and use the 24LCxx series of EEPROMs to store data.

This Application Note is currently

Check back periodically for new information.


Introduction: The 24LCxx series of EEPROMs are inexpensive (~$1.50 to $4.00 in singles), 8-pin integrated circuits manufactured by Microchip ranging from 128 bits (16 bytes) to 256k bits (32k bytes).

The E1 socket on the OOPic is configured to handle an EEPROM of this type.

In this application note, we will plug a 24LC16 EEPROM into the OOPic's EEPROM socket and write a program to store numbers.

Code Listing
Dim E As New oi2c



Sub main()

  Call SetUp

  E.Location = 1  'The memory address to start at is 1.

  E = 16          'Put a 16 into the EEPROM at address 1.

  E = 5           'Put a 5 into the EEPROM at address 2.

  E = 255         'Put a 255 into the EEPROM at address 3.



End Sub



Sub SetUp()



  'Set the 24LC16's I2C address

  E.Node = 84

  

  'Set up the I2C parameters.

  E.Width = cv8bit        'Logging Data is 1-byte wide.

  E.Mode = cv10bit        'I2C mode is 10-Bit Addressing.

  ' Note: For 24LC32 and larger, use the following line.

  'E.Mode = cv23bit        'I2C mode is 23-Bit Addressing.

End Sub

Home   Send mail and comments to: Savage Innovations.