Part Number: DRV2667
Hello, I am trying to output a square wave (50Hz) while changing the amplitude in the range of maximum -50~50V from DRV2667 using a raspberrypi4+. I have set up the drv2667 in analog playback mode with the following program, but I found out that it enters standby mode when I check the STANDBY bit 1 second after executing the setup. What could be causing it to enter standby mode?
Here is the program for setup:
import smbus
import time
drv2667_adrrs = [0x59]
# I2C write
def i2c_write(slave_adress :int, reg_adress :int, data :int):
i2c.write_byte_data(slave_adress, reg_adress, data)
check = i2c.read_byte_data(slave_adress, reg_adress)
print("written to "+ str(slave_adress) +", register"+str(reg_adress)+ "=" + str(check))
return
# I2C read
def i2c_read(slave_adress :int, reg_adress):
data = i2c.read_byte_data(slave_adress, reg_adress)
print("Device: "+ str(slave_adress) +", register"+str(reg_adress)+ "=" + str(data))
return
def drv2667_setup(slave_adress):
# Control
i2c_write(slave_adress, 0x02, 0x00) # Exit STNBY mode
i2c_write(slave_adress, 0x01, 0x3D) # DRV2667, Analog Mode, Gain: Vpp=100V
i2c_write(slave_adress, 0x02, 0x02) # EN_OVERRIDE=1
print("DRV2667 @" + str(slave_adress) + "is ready on Analog Amplifier Mode, Vout=50V when Vdd=3.6V")
return
if __name__ == "__main__":
# I2C Setting
i2c = smbus.SMBus(1)
# DRV2667のAnalog Mode Setup
for addr in drv2667_adrrs:
drv2667_setup(addr)
time.sleep(1)
# Check STANDBY bit
i2c_read(drv2667_adrrs[0], 0x02)
During the analog mode test, GND is input to IN-, and 5V is input to IN+. Ultimately, to set the reference of the square wave to 0V, a PWM wave output from the Raspberry Pi is input to IN+ through a low-pass filter. 2.5V obtained by voltage division is input to IN-.
Any help would be appreciated.
Naoki








