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 / TWI question

TWI question

|

Miscellaneous › Others › TWI question

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 2 months ago by GANEEV SINGH.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 10, 2015 at 9:24 pm #4153
    ste
    Participant

    Hello I am trying to take data from ads1100 using atmega32. I tried with http://www.engineersgarage.com/embedded/avr-microcontroller-projects/atmega32-twi-two-wire-interface?destination=node/1040, code from here. I have set the propper address and so no but it doesn't work. It fails just on start.

    void TWI_start(void)
    {
        // Clear TWI interrupt flag, Put start condition on SDA, Enable TWI
        TWCR= (1<<TWINT)|(1<<TWSTA)|(1<<TWEN);
        while(!(TWCR & (1<<TWINT))); // Wait till start condition is transmitted
        while((TWSR & 0xF8)!= 0x08) // Check for the acknowledgement
        {
            uart_send_str( "error on start" );
        }
    }

    Can anyone advice me?

    Thanks in advance!

    March 14, 2018 at 7:19 am #14792
    GANEEV SINGH
    Participant

    Hi

    This kind of thing generally happens when you do not pull up SDA and SCL pins. Recheck your circuit once.

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

RSS Recent Posts

  • Refrigeration System Reliability in Harsh Aussie Conditions May 21, 2025
  • Chinese Tarrifs – 104%!?! May 21, 2025
  • can a AT89C51 be used as a rom? May 21, 2025
  • Telegram Based Alarm - Sensor cable protection May 21, 2025
  • An Update On Tarrifs May 21, 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