EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / Reg-EEPROM

Reg-EEPROM

|

Microcontroller › PIC › Reg-EEPROM

  • This topic has 0 replies, 1 voice, and was last updated 10 years, 8 months ago by karthick.v.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • August 28, 2015 at 2:44 pm #3938
    karthick.v
    Participant

    Hai everyone,

                      I have some doubt in the following program

    * In both read and write mode why we are using  I2CSend(0x00); I2CSend(0x00);

    * In read mode why we are using   I2CAck(); I2CNak();.In I2c Ack has been automatically generated by slave then why should we are giving Ack and Nak

        
       

     

    ////////////////EEPROM READ and WRITE\\\\\\\\
        
        I2CInit();
        
        I2CStart();
        
        I2CSend(0xA0);
        
        I2CSend(0x00);
        
        I2CSend(0x00);
        
        for(j=0;j<6;j++)
        {
        I2CSend(I2CData[j]);
        }
        
        I2CStop();
        
        __delay_ms(100);
        
        I2CStart();
        
        I2CSend(0xA0);
        
        I2CSend(0x00);
        
        I2CSend(0x00);
        
        I2CRestart();
        
        I2CSend(0xA1);
        
        for(j=0;j<6;j++)
        {

        rcdata[ j]= I2CRead();
        
        I2CAck();
        }
        
        if ( i – 1)

        I2CAck();

        else

        I2CNak();

        I2CStop();

        LCD_OUT(2,7,rcdata);

    while(1);
      
    }

  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Phone Charger 5v to 12v May 17, 2026
  • reviving old swordfish program but? May 17, 2026
  • Assistance locating a 'trail' camera gadget, please ? May 16, 2026
  • Analog multiplexer has gone obselete May 16, 2026
  • Difference between TTL, RS232 and RS485 May 16, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise