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 / Need help for I2C/TWI article of engineers garage

Need help for I2C/TWI article of engineers garage

|

Microcontroller › AVR › Need help for I2C/TWI article of engineers garage

  • This topic has 16 replies, 6 voices, and was last updated 11 years, 10 months ago by AJISH ALFRED.
Viewing 15 posts - 1 through 15 (of 17 total)
1 2 →
  • Author
    Posts
  • April 17, 2012 at 6:57 am #1495
    Amit Kumar
    Participant

    Dear all,

     

    I am doing practical for TWI/I2C from engineers garage. I copied & pasted the programe.My hardware is in working condition as led programe is running on  hardware. I also connected SDA of master to SDA of slave & SCL of master to SCL of slave. Still the programe is not running. LEDs are in ON condition as they are connected in active low configuration.

     

    I am using atmega16 instead of atmega32. Am i supposed to configure fuse bits for I2C/TWI. I am using serial programmer/Pony Prog to brn controller.

     

    Please help.

    June 29, 2012 at 1:52 pm #8153
    AJISH ALFRED
    Participant

     

    Hi,

    Please share the link of the code. Have you pulled up SDA and SCL lines to VCC?

    June 30, 2012 at 12:47 am #8161
    Amrith
    Participant

    Hi Amit,

    Did you add pull up resistors on SDA & SCL Lines. For TWI/I2C communication, with out pull up resistors controller will not able communicate with the external component.

    Try to debug your code by manual method.

    December 30, 2012 at 9:41 pm #8886
    Harsh Deshpande
    Participant

    Hello,

     

    Even I am having the same problem.

    I have 4.7k pull up resistor on SCL and SDA.

     

    The start condition is being transmitted, but the code hangs while receiving the ACK.

     

    What might be the problem?

     

    Regards

    Harsh

    January 2, 2013 at 3:01 pm #8896
    Harsh Deshpande
    Participant

    I finally got the acknowlegdement from the slave after sending the address.

    But the data transfer is not happening.

     

    What can be the issue?

    January 5, 2013 at 6:22 pm #8904
    AJISH ALFRED
    Participant

    Make sure that you really have aknowledgement from the slave. Change the slave address and observe wheather you are still getting the acknowledgement.

    What is your slave device actually?

    July 4, 2013 at 9:47 pm #10098
    Yash Tambi
    Participant

    Even i am facing the same problem. I tried changing the address, but it didnt work.. what could be the issue?

     

    July 5, 2013 at 4:20 am #10100
    AJISH ALFRED
    Participant

    Hi,

    The hardware set up is very important. you should pull up the SDA and SCL pins. Also check the port direction of the pins.

    If you can get a CRO, check the waveforms on both SDA and SCL. Make sure that the clock appears on the SCL.

    July 5, 2013 at 9:36 pm #10105
    Yash Tambi
    Participant

    Hi!

    I was Finally able to figure out the problem.. that is: the slave is not matching the incoming address with its own address. when i removed the while loop to check the status after own slave address has been received, the slave received the data and responded accordingly. Please help me with this issue!

     

    Thanks in advance!

    July 6, 2013 at 9:03 am #10106
    AJISH ALFRED
    Participant

    Hi, 

    Suggest you to go through the data sheet of the slave device and find the unique address of your slave device.

    July 6, 2013 at 10:58 am #10109
    Yash Tambi
    Participant

    I am trying to Communicate between two Atmega8

    July 22, 2013 at 5:37 pm #10180
    pouria
    Participant

    HI

     

    1-what is your compiler?

    2-what is the version of it?

     

    July 24, 2013 at 4:36 am #10185
    AJISH ALFRED
    Participant

    Hi Pouria,

    From the code written, I think the compiler is AVR Studio. Try to download the latest version.

    July 24, 2013 at 8:53 pm #10193
    pouria
    Participant

     hi

     

     

    i don’t think this code compiled in avr studio?

    July 25, 2013 at 4:23 am #10194
    AJISH ALFRED
    Participant

    Hi Pouria,

    Please post the link of your reference or give me some hint of the location where you find the code. I’ll confirm it and let you know.

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 17 total)
1 2 →
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • PIC KIT 3 not able to program dsPIC June 15, 2025
  • Siemens large industrial PLC parts June 15, 2025
  • Parts required for a personal project June 15, 2025
  • Cant log in to Easy PC forum June 15, 2025
  • Failure of polypropylene motor-run capacitors June 15, 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