Git Product home page Git Product logo

Comments (3)

electronicayciencia avatar electronicayciencia commented on May 31, 2024

Hi, thank you.

You are right, loop in i2c_reset has no exit condition. I will change that part of code.

Anyways, I can think of two reasons that keep you reading 0 after a reset sequence:

  • Your i2c bus is not pulled-up, check your pull-up resistors.
  • There is another device that maintains the clock line down, it may be busy or defective.

Regards.

from wpi_soft_i2c.

MalcolmReynlods avatar MalcolmReynlods commented on May 31, 2024

My circuit was a bit defective and now I have corrected it. Also, I tried pulling up the bus with different resistors, but I got a reading of '255' for all the cases throughout without any change.

I only have a Raspberry Pi and a single PCF8591, so I guess no other device could interfere.

Also, when I connect an oscilloscope to the SCL and SDA line, I did not see any signals.

from wpi_soft_i2c.

electronicayciencia avatar electronicayciencia commented on May 31, 2024

Hello. I commited a fix to solve the infinite loop. Now it waits for some time for the bus to be released. After that time it returns and shows a warning message.

$ ./i2cli 25 24
I2C Command Line Interface
Warning: I2C Bus busy or defective.
...
i2cli> R
Warning: I2C Bus busy or defective.
i2cli>

Best regards.

from wpi_soft_i2c.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.