Menu

I2C

Help
Anobium
2014-03-28
2014-03-28
<< < 1 2 (Page 2 of 2)
  • Anobium

    Anobium - 2014-03-28

    And, a question.

    You do have pullup resistors on the SCL/SDA lines? If the lines are floating then you may get odd results.

     
  • joe rocci

    joe rocci - 2014-03-28

    Anobium

    I really appreciate your effort to help out but I think you're into it way to deep and you're solving problems that don't exist. I already have the hardware receiving and ACKing my address polls & registers polls. There's no issue with interfaces or pullups. The only part I don't have working is actually getting it to send back data. As to the calculations, please understand that it's well-known that the description for how to do this in the SI570 data sheet is overly complicated and convoluted. Once you understand how the chip actually works, it's a very simple calculation that can be done with GCB LONG's. I have that part, as well as the HSDIV & N1 calculations and bit stuffing working already in some very compact code.

    All I really need is guidance on how to get a single I2C byte read working with the native GCB I2C library. However, I'm about to give up on that and write my own functions that handle this in a way that's optimized for this part and easy to use. My functions will receive the slave address, the register address, a read/write flag, a byte counter and a pointer to a data structure. It will the do the all required I2C operations and return with an ACK indication.

    I'm pretty much there with the exception that I'm not getting data back on my read operations. I was hoping to get that part working with GCB's I2C read functions so I could observe the sequence of steps and then figure out what I'm doing wrong in my own function. So, the only thing I need is an example of making a single-byte data-read work properly on this part. Once I get everything working, I'd be happy to share with the community, but the end product probably won't use the native handlers, which I find to be clunky, obtuse, bloated and poorly commented & documented.

    Joe

     

    Last edit: joe rocci 2014-03-28
  • Anobium

    Anobium - 2014-03-28

    I am trying to help.

    I understand you have the calcs working.

    My advice would be to get a protocol analyser. It is how I have written the other handlers.

    Let us know how you get on.

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.