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

  • My Advanced Realistic Humanoid Robots Project December 7, 2025
  • Looking for single photovoltaic cells for light gate December 7, 2025
  • I am ready to move from electrical and electronics field but confused where ? December 7, 2025
  • Hitachi SuperScan Elite 802 CRT Monitor Issues (Model CM802U) December 7, 2025
  • Sanity Check – Peltier "Cooler" for Heating and Cooling December 7, 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