Tags: EEPROM, Memory, Module, I2C, Interface, AT24C256, SMD

EEPROM Memory Module I2C Interface AT24C256 SMD

  • 15.00 AED
    • Ex Tax:15.00 AED
    • Brands China
    • Product Code: AT24C256 SMD
    • Availability: In Stock
    The AT24C256 EEPROM allows us to add external storage for Arduino with a write capacity of 32,768 bytes or characters. It can be used, for example, for storing various configurations or as a backup of stored data in the event of a wireless connection to the main system. The big advantage i..

    The AT24C256 EEPROM allows us to add external storage for Arduino with a write capacity of 32,768 bytes or characters. It can be used, for example, for storing various configurations or as a backup of stored data in the event of a wireless connection to the main system. The big advantage is also the possibility to set the address using three address jumpers and thus connect up to 8 memories on one Arduino or the possibility of blocking the next write data.


    DataSheet


    Description:

    Mainly Compatible with: Arduino

    Batteries Included: No

    Package Size(L x W x H): 6.00 x 6.00 x 1.00 cm / 2.36 x 2.36 x 0.39 inches

    Package Weight: 0.034 kg

    Package Contents: a 1X storage module

    All pins leads marked,

    Wiring 
    EEPROM Memory Module I2C Interface AT24C256 SMD with Arduino and code for it:


    AT2C256 I2C EEPROM wiring diagram


    // Arduino I2C EEPROM AT24C256
    
    // 
    add the necessary library # include  <Wire.h>
     // define the EEPROM memory 
    address 
    , // use the i2c scanner sketch to identify the address link # define eeprom B1010000 
    // create a variable to store a message in a 
    char array from rightChar [ 30 ] ;
    
    void  setup () {
       // start serial communication at 9600 baud 
      Serial . begin ( 9600 );
      // start communication via I2C 
      Wire . begin ();
      // write one character on eeprom, to address 32767 (maximum) 
      eeprom_zapis_znak (eeprom, 32767 , '!' );
      // short pause after writing 
      delay ( 10 );
      // create a character type variable and retrieve one character 
      // on the eeprom, starting at 0 
      byte character = eeprom_precti_character (eeprom, 32767 );
      // print the contents of the variable with the last 
      Serial character read . print ( "Loading one character from EEPROM:" );
      Serial . println (( char ) character);
      // create sample 
      char message from right [ 30 ] = "Arduino tutorials" ;
      // writing the created message to the eeprom, starting at address 100, 
      // data from the "right" variable of the size of the "right" variable 
      eeprom_report_report (eeprom, 100 , ( byte *) from the right, sizeof (from the right));
      // short pause after writing 
      delay ( 10);
      // read from a higher 
      Serial address . print ( "Read from address 100:" );
      // retrieve the message from the eeprom device, from address 100, 
      // save the data in the "rightChar" variable of the size of the "rightChar" variable 
      eeprom_precti_report (eeprom, 100 , rightChar, sizeof (rightChar));
      // print the entire report over the serial line 
      Serial . print (from rightChar);
      Serial . println ( "" );
    }
    
    void  loop () {
       // create a variable with read time since 
      arduino armed long time = millis () / 1000 ;
      // create message in String variable 
      String from rightString = "Time:" ;
      messageString + = time;
      // convert message from String to character array from 
      rightString.toCharArray (from rightChar, sizeof (from rightChar));
      // writing the created message to the eeprom, starting at address 100, 
      // data from the "right" variable of the size of the "right" variable 
      eeprom_report_report (eeprom, 0 , ( byte *) from rightChar, sizeof (from rightChar));
      // short pause after writing 
      delay ( 10 );
      // create a read address variable 
      int addr = 0 ;
      // create a character type variable and retrieve one character 
      // on the eeprom, starting at 0 
      bytecharacter = eeprom_precti_znak (eeprom, 0 );
      // until we find a zero character reading, 
      // we will be in this while loop 
      while (character! = 0 ) {
         // print the contents of the variable with the last 
        Serial character retrieved . print (( char ) character);
        // increment the address to retrieve the next character
        addr ++;
        // retrieve one character per eeprom, from the address that is in the addr variable
        character = eeprom_precti_character (eeprom, addr);
      }
      // continue listing on new 
      Serial line . println ();
      // pause for 2 seconds 
      delay ( 2000 );
    }
    // single character subroutine 
    void eeprom_write_character ( int device address, unsigned  int read address, byte data) {
       int rdata = data;
      Wire . beginTransmission (Device Address);
      Wire . write (( int ) (ReadAddress >> 8 )); // MSB 
      Wire . write (( int ) (Read & 0xFF address )); // LSB 
      Wire . write (rdata);
      Wire . endTransmission();
    }
    // subroutine to write a message of up to 30 characters 
    void eeprom_write_report ( int device address, unsigned  int messageReading, byte * data, byte lengthDat) {
       Wire . beginTransmission (Device Address);
      Wire . write (( int ) (ReadMessageAddress >> 8 )); // MSB 
      Wire . write (( int ) (NewsReader & 0xFF address )); // LSB 
      byte c;
      for (c = 0); c <lengthDat; (c ++)
         Wire . write (data [c]);
      Wire . endTransmission ();
    }
    // subroutine for reading one character 
    byte eeprom_precti_character ( int device address, unsigned  int read address) {
       byte rdata = 0xFF ;
      Wire . beginTransmission (Device Address);
      Wire . write (( int ) (ReadAddress >> 8 )); // MSB 
      Wire . write (( int ) (Read & 0xFF address )); // LSB 
      Wire . endTransmission ();
      Wire . requestFrom(Device Address, 1 );
      if ( Wire . available ) rdata = Wire . read ();
      return rdata;
    }
    
    // subroutine to read message up to 30 characters 
    void eeprom_precti_pravu ( int device address, unsigned  int read address, byte * buffer , int lengthDat) {
       Wire . beginTransmission (Device Address);
      Wire . write (( int ) (ReadAddress >> 8 )); // MSB 
      Wire . write
                  

    There are no reviews for this product.

    Write a review

    Please login or register to review

    FREE RETURNS

    *for faulty items and in-store drop off for unused items. T&C applies.

    Customer Support

    We really care about you and your order as much as you do. Please contact us without hesitation.

    INTERNATIONAL SHIPPING

    We can ship your order internationally. Please contact us first before proceeding with your order.

    Fast Delivery

    You want your item next day? No problem! We advise contacting us ASAP to insure smooth delivery experience