Raspberry Pi SMBus support combined data transmission?
<p>I am trying to use the ACS764 Hall effect current sensor with Raspberry Pi. This sensor will sense the current and return its value via the chip built-in I2C interface. I had connected the circuit according to the specification. On my Raspberry Pi Python code I can write and read data to/from the sensor however the data I read alway the same value.</p>

<p>Below is my simple code to read the sensor:</p>

<pre><code>import datetime
import smbus
import time
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BOARD)
GPIO.setup(37, GPIO.OUT) #Connected to the ACS764 Freeze pin

bus=smbus.SMBus(1)

#Freeze the data
GPIO.output(37, True)

#Read the values
bus.write_byte(0x60, 0x00) #Simulate the combined data transmission format
data=bus.read_i2c_block_data(0x60, 0x00)
print data

#Unfreeze the data
GPIO.output(37, False)

GPIO.cleanup()
</code></pre>

<p>However when I run the script the value alway show the same even I had changed the current to be sensed value.</p>

<pre><code>pi@Raspberry:~ $ python i2cAcs764.py 
[0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0]
</code></pre>

<p>According to the ACS764 specification, to read the sensor value, I need to use the "combined data transmission" format. However, I didn't find any function in the Python SMBus library that allow me to use the combined data transmission, therefore at the moment I use the "bus.write_byte" function to simulate the "combined data transmission". Below is the screen capture of the specification.</p>

<p><a href="http://i.stack.imgur.com/fbno9.png" rel="nofollow">ACS764 Datasheet Snapshoot</a></p>

<p>My question now is how can I use the Python SMBus I2C library to perform the "combined data transmission" reading of the ACS764 chip?</p>

<p>Please advise, thank you.</p>