I have tried this alternative solution - this fixes the issue. I am able to successfully configure the BV4205 and read back ADC data (single values or multiple values with auto scan). Note, I did need to use the -q option for i2cdetect to identify the BV4205: i2cdetect -q -y 0. I have tried this with a number of other I2C devices (port expanders, LCD backpack) and these seem to be unaffectedby Ken - Serial & I2C Devices
Hi Jimeer Thanks for all your effort to try and diagnose the issue. I have only a little experience with I2C and even less writing linux kernel drivers. I can't find anything directly useful on the Raspberry PI forums other than the article you have already identified (I initially suspected it was a clock stretching issue but I was not able to confirm this). There are some posts requestingby Ken - Serial & I2C Devices
I have been experimenting with the Quick2Wire python API for the Raspberry Pi (see: Quick2Wire). This provides much better transactional control over reads / writes than the SMBus API. Using this I have been able to successfully use the BV4213 to control a stepper motor. However, when I try and apply this to the BV4205 I run into problems. I have verified the address of the BV4205 (0x31):by Ken - Serial & I2C Devices
For example, the following will reset the BV4213: Python 2.7.3rc2 (default, May 6 2012, 20:02:25) on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from smbus import SMBus >>> b=SMBus(0) >>> b.write_byte_data(0x21, 0x95, 0) >>> If I try the same reset command with the BV42by Ken - Serial & I2C Devices
Limited success with i2cdump -q option: pi@raspberrypi ~ $ i2cdetect -y -q 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- 21 -- 23 -- -- 26 -- -- -- -- -- -- -- -- -- 30: -- 31 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --by Ken - Serial & I2C Devices
Without i2cdetect I can't be sure what address to use. Assuming 7-bit addressing (as seems to be the case from the BV4213) I have attempted to send commands to address 0x22 (7-bit equivalent of default address: 0x62). However, this results in an i/o error: Python 2.7.3rc2 (default, May 6 2012, 20:02:25) on linux2 Type "help", "copyright", "credits" or &qby Ken - Serial & I2C Devices
NOTE The BV4205 has now been replaced with the P011/2 see There are two solution for running I2C devices that require clock stretching at the bottom of this thread A Summary with downloads is here I am trying to use a BV4205 (I2C ADC converter) from a Raspberry PI - but I am unable to "see" this device on the I2C bus. On my prototyping board I have added pullup resistors to thby Ken - Serial & I2C Devices