This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Communicating with bq20z80 via i2c from arduino

Other Parts Discussed in Thread: BQ20Z80

Hi, 

I am new to using this forum and I wasn't able to find the answer to my question in any of the threads that i read. I apologize if this question has already been answered. I am also new to both using i2c and the bq20z80.

 My goal is to read values of the bq20z80 (slave) via i2c from an Arduino (master); Specifically register 0x51 (Safety Status). After reading the Technical manual I know that the SMB address is 0x16. However, I wasn't able to connect to the device using this address . I used a scanning program to see if I can detect an address, I was able to read 0x0B. so my questions are as follows:

1) Can I communicate to the bq20z80 using an Arduino with i2c?

2) I read that for SMS to i2c the address must be right shifted for a 7 bit address. is this why the address is 0x0B?

3)Does this right shift also apply for pointing to the register that I want to read?

I appreciate any help that I can get on the matter.  

  • Hi Aaron,

    Answers to your question.

    1. Yes, but you must follow SMBus timing requirements for this to work on I2C. See attached doc.

    2. Yes.

    3. No it doesn't. Registers are 8-bit.

    8637.SMBus made simple_v6.pdf

     

    Onyx

  • Onyx,

    Thanks for your reply. After reading the document that you had attached I understand now about the speed of the information transfer between i2c and smbus. Do you know of any libraries for the Arduino that will work with the SMbus? I found after a little research that the wire.h library isn't going to work properly for this type of communication. I was reading that the Wire.h library sends a stop bit in between communications instead of the repeat start bit. I am not sure how to go about creating my own library to do this.  Any suggestions would be great. 

    Thanks in advance 

    Aaron 

  • Unfortunately, I haven't worked with Ardiuino before, so I can't say. Try reaching out to the device makers

    -Onyx