Quantcast
Channel: Motor drivers forum - Recent Threads
Viewing all articles
Browse latest Browse all 14309

DRV10987EVM: I2C read and write

$
0
0

Part Number:DRV10987EVM

Hi,

I'm using raspberry pi. I connected SDA,SCL and GND of DRV10987EVM (J3) to SDA,SCL and GND of raspberry pi. VCC 15V is given to pin1 of P1. I tried to read and write the configuration registers (0x90 to 0x96) using python program.

For writing to register, I used

slave = 0x52

bus = 1

i2c_handle = I2C.get_i2c_device(slave,bus)  

i2c_handle.write16(reg,value)

For reading, I used

length = 2

i2c_handle = I2C.get_i2c_device(slave,bus)

reg_read = i2c_handle.readList(reg,length)
return reg_read

Is this format correct ?

Thanks

- Archana


Viewing all articles
Browse latest Browse all 14309

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>