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 9 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

  • Lightbox circuit May 16, 2025
  • I want to make a CRT with some modifications But i have no Idea where to start May 16, 2025
  • Kawai KDP 80 Electronic Piano Dead May 16, 2025
  • LT3511 Isolated Flyback Converter May 16, 2025
  • Funny Images Thread! May 16, 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