Giter VIP home page Giter VIP logo

Comments (4)

pasko-zh avatar pasko-zh commented on June 25, 2024 1

I will have a look at it, as soon as "my other work" let me to do so ;-)

from brzo_i2c.

pasko-zh avatar pasko-zh commented on June 25, 2024

Some questions from my side:

  1. What is the size of your pullup resistor on SDA and SCL?
  2. Which esp-board are you using?
  3. Which version of Arduino IDE and esp8266 core do you use?
  4. You don't get any brzo_i2c errors, right?
  5. Do you get back different values, or always the same, independant of what happens on the analog inputs of the MAX11615?
  6. Did you try different settings for status and configuration register? Did it work?
  7. Does i2c communication work in general in your setup, i.e. were you able to try it out with a different ic2c slave? Or is the problem only occuring with the MAX11615.
  8. Do you have a scope or logical anaylizer?

I had a (quick) look at the datasheet (wrong link in your comment, but don't worry, I found the correct one). AFAIK, there is no way to read out the configuration or status register, right? Otherwise, we could have checked that the values were written correctly (assuming there are no read errors).
Even if the the write, i.e. bits 6 and 5, was not successful (i.e. writing 0), the power-up values of these would be 0 0, so the SCAN selection mode should not be affected.

from brzo_i2c.

w0w avatar w0w commented on June 25, 2024
  1. What is the size of your pullup resistor on SDA and SCL?
    4.7k

  2. Which esp-board are you using?
    esp8266 nodemcu 1.0

  3. Which version of Arduino IDE and esp8266 core do you use?
    Latest

  4. You don't get any brzo_i2c errors, right?
    No brzo errros

  5. Do you get back different values, or always the same, independant of what happens on the analog inputs of the MAX11615?

I have figured out a way to work with wire as of now but i want to use brzo and i am trying to understand more about the code, if you can point me to any reading material it will be great.

  1. Did you try different settings for status and configuration register? Did it work?

I think it worked and i have narrowed down the error to bit shifting and noise from the power supply.

  1. Does i2c communication work in general in your setup, i.e. were you able to try it out with a different ic2c slave? Or is the problem only occuring with the MAX11615.

I don't have any other i2c setup as of now.

Do you have a scope or logical anaylizer?

Not yet, i am ordering one soon.

It must be a stupid question to ask but what is the console.log equivalent in assembly ?

from brzo_i2c.

pasko-zh avatar pasko-zh commented on June 25, 2024

Thanks for additional info. Just a small remark: I have not yet tested brzo_i2c with the latest Arduino core , i.e., 2.4-rc*. But normally this is not a problem...

So, if I understood you correctly, i2c communication is working?

Concerning assembly language question (which is not stupid question at all): Well, debugging is always a bit difficult with these microcontrollers. It strongly depends on the IDE you are using, how good or bad it is supported. This is also true for (inline) assembly language. At least from the docs, the Xtensa Xplorer IDE seems to give good support also for assembly, i.e. you can observe the contents of the registers etc; but I am not using it.

Otherwise, since you are on the instruction level with (inline) assembly, the only way to go is to think and think and think again before implementing something ;-) ....and to "debug" like this: If possible, split up inline assembly in parts, pass values from register to the outside world (i.e. c/c++) and then print them to the console.

A help for me to debug brzo_i2c was the rigol scope: I could know from the observed signals, where in the assembly code something probably went wrong.

from brzo_i2c.

Related Issues (20)

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.