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, 2 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

  • WTB: "The Theory Of Servicing AM, FM, And FM Receivers" by Clarence R. Green and Robert M. Bourque November 10, 2025
  • Anyone In The US Ordered From AliExpress Recently? November 10, 2025
  • Calculation of A Class amplifier November 10, 2025
  • strange laptop problem November 10, 2025
  • restarting this Christmas project November 10, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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